Skip to main content

Ready to Use Constants

Along with utilities, classes and types, nhb-toolbox exports a collection of ready-to-use constants for common development needs.

📦 Import

All (20+) constants can be imported using this pattern:

import { CONSTANT_NAME } from 'nhb-toolbox/constants';

Available Constants

ConstantDescription
WEEK_DAYSArray of weekday names (Sunday-Saturday)
MONTHSArray of month names (January-December)
TIME_ZONESStandard timezone identifiers
TIME_ZONE_LABELSHuman-readable timezone labels
VEDIC_ZODIAC_SIGNSTraditional Indian/Vedic zodiac signs
WESTERN_ZODIAC_SIGNSWestern astrology zodiac signs
AUSTRALIA_SEASONSSeasonal definitions for Australia
BANGLADESH_SEASONSSeasonal definitions for Bangladesh
ETHIOPIA_SEASONSSeasonal definitions for Ethiopia
INDIA_IMD_SEASONSIndian Meteorological Department seasons
INDIA_TAMIL_SEASONSTraditional Tamil seasonal calendar
INDIA_VEDIC_SEASONSAncient Vedic seasonal divisions
JAPAN_SEASONSTraditional Japanese seasons
PHILIPPINES_SEASONSSeasonal patterns for the Philippines
SEASON_PRESETSCollection of all seasonal definitions
US_ACADEMIC_SEASONSU.S. academic season names
WESTERN_SEASONSStandard four-season model (Spring, Summer, Fall, Winter)
ALPHABET_COLOR_PALETTEColor palette mapped to letters A-Z
NUMBER_COLOR_PALETTEColor palette mapped to numbers 0-9
CSS_COLORSStandard CSS color names and hex values
CURRENCY_CODESISO 4217 currency codes (e.g., USD, EUR)
CURRENCY_LOCALESDefault locales for currency formatting
FRANKFURTER_CURRENCIESCurrencies supported by Frankfurter API
LOCALE_CODESStandard locale identifiers (e.g., en-US, fr-FR)
LOWERCASED_WORDSCommon lowercase words (articles, prepositions etc.) for text processing
HTTP_STATUS_CODESComplete set of HTTP status codes with with jsdoc
HTTP_STATUSAlias for HTTP_STATUS_CODES
HTTP_CODESAlias for HTTP_STATUS_CODES
STATUS_CODESAlias for HTTP_STATUS_CODES

Usage Examples

import { MONTHS, CSS_COLORS, HTTP_STATUS_CODES } from 'nhb-toolbox/constants';

console.log(MONTHS[0]); // "January"
console.log(CSS_COLORS.white); // "#FFFFFF"
console.log(HTTP_STATUS_CODES.NOT_FOUND); // 404
tip

All constants are fully typed and include IntelliSense support in TypeScript-enabled editors.