Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fundamental-constants

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fundamental-constants

Fundamental constants and enumerations

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68
decreased by-19.05%
Maintainers
0
Weekly downloads
 
Created
Source

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
MAXIMAL_SUPPORTED_UNIX_MILLISECONDS_AMOUNT8640000000000000
MINIMAL_SUPPORTED_UNIX_MILLISECONDS_AMOUNT-8640000000000000
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

Keywords

FAQs

Package last updated on 12 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc