Shared utilities for Hawk packages.
- hasValue(v) — returns
trueif the value is notundefined, notnull, and not an empty string; otherwisefalse. - TimeMs — enum of time intervals in milliseconds:
Millisecond,Second,Minute,Hour,Day,Week
yarn add @hawk.so/utilsimport { hasValue, TimeMs } from '@hawk.so/utils';
if (hasValue(process.env.API_KEY)) {
// ...
}
const fiveMinutes = 5 * TimeMs.Minute;AGPL-3.0
CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.
| 🌐 | Join 👋 | ||
|---|---|---|---|
| codex.so | codex.so/join | @codex_team | @codex_team |