0.1.0 • Published 3 days ago

fundamental-constants v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

Fundamental constants and enumerations.

Some of their values are commonly known, for example the HOURS_COUNT_IN_STELLAR_DAY is 24 and MAXIMAL_DAYS_IN_MONTH is 31. However, without being stored to the constants with clear names, it will be the magic numbers.

Installation

npm i fundamental-constants -E

Content

Compute networking

Constant nameValue
HTTP_DEFAULT_PORT80
HTTPS_DEFAULT_PORT443
NETWORK_PORT_MAXIMAL_VALUE65535
NETWORK_PORT_MINIMAL_VALUE1

Date and Time

Constant nameValue
DAYS_COUNT_IN_WEEK7
HOURS_COUNT_IN_STELLAR_DAY24
MAXIMAL_DAYS_IN_MONTH31
MINUTES_COUNT_IN_HOUR60
MONTHS_COUNT_IN_YEAR12
SECONDS_COUNT_IN_MINUTE60

Enumerations

DaysOfWeekNames
KeyValue
sunday"SUNDAY"
monday"MONDAY"
tuesday"TUESDAY"
wednesday"WEDNESDAY"
thursday"THURSDAY"
friday"FRIDAY"
saturday"SATURDAY"
MonthsNames
KeyValue
january"JANUARY"
february"FEBRUARY"
march"MARCH"
april"APRIL"
may"MAY"
june"JUNE"
july"JULY"
august"AUGUST"
september"SEPTEMBER"
october"OCTOBER"
november"NOVEMBER"
december"DECEMBER"

ISO8601

Constant nameValue
CHARACTERS_COUNT_IN_DATE_PART_OF_ISO8601_STRING10
CHARACTERS_COUNT_IN_FULL_ISO8601_STRING24

Email

Constant nameValue
EMAIL_ADDRESS_VALID_PATTERN/^\w+(?:[.-]?\w+)*@\w+(?:[.-]?\w+)*(?:\.\w{2,3})+$/u
MINIMAL_CHARACTERS_COUNT_OF_EMAIL_ADDRESS3
0.1.0

3 days ago

0.0.6

5 days ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago

0.0.0

7 months ago