New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fundamental-constants

Package Overview
Dependencies
Maintainers
0
Versions
15
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.3.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
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

Computer Networking

Constant NameValue
HTTP_DEFAULT_PORT80
HTTPS_DEFAULT_PORT443
NETWORK_PORT_MAXIMAL_VALUE65535
NETWORK_PORT_MINIMAL_VALUE1
Enumerations
HTTP_Methods
KeyValue
get"GET"
post"POST"
create"CREATE"
put"PUT"
delete"DELETE"
options"OPTIONS"
head"HEAD"
connect"CONNECT"
trace"TRACE"
patch"PATCH"
HTTP Status Codes
HTTP_StatusCodes — All HTTP Status Codes
KeyValue
continue100
switchingProtocols101
processing102
earlyHints103
OK200
created201
accepted202
nonAuthoritativeInformation203
noContent204
resetContent205
partialContent206
multiStatus207
alreadyReported208
IM_Used226
multipleChoices300
movedPermanently301
found302
seeOther303
notModified304
useProxy305
unused306
temporaryRedirect307
permanentRedirect308
badRequest400
unauthorized401
paymentRequired402
forbidden403
notFound404
methodNotAllowed405
notAcceptable406
proxyAuthenticationRequired407
requestTimeout408
conflict409
gone410
lengthRequired411
preconditionFailed412
payloadTooLarge413
URI_TooLong414
unsupportedMediaType415
rangeNotSatisfiable416
expectationFailed417
IAmATeapot418
misdirectedRequest421
unprocessableEntity422
locked423
failedDependency424
tooEarly425
upgradeRequired426
preconditionRequired428
tooManyRequests429
requestHeaderFieldsTooLarge431
unavailableForLegalReasons451
internalServerError500
notImplemented501
badGateway502
serviceUnavailable503
gatewayTimeout504
HTTP_VersionNotSupported505
variantAlsoNegotiates506
insufficientStorage507
loopDetected508
notExtended510
networkAuthenticationRequired511
InformationalResponsesHTTP_StatusCodes — Information Responses
KeyValue
continue100
switchingProtocols101
processing102
earlyHints103
SuccessfulResponsesHTTP_StatusCodes — Successful Responses
KeyValue
OK200
created201
accepted202
nonAuthoritativeInformation203
noContent204
resetContent205
partialContent206
multiStatus207
alreadyReported208
IM_Used226
RedirectionResponsesHTTP_StatusCodes — Redirection Messages
KeyValue
multipleChoices300
movedPermanently301
found302
seeOther303
notModified304
useProxy305
unused306
temporaryRedirect307
permanentRedirect308
ClientErrorsHTTP_StatusCodes — Client Error Responses
KeyValue
badRequest400
unauthorized401
paymentRequired402
forbidden403
notFound404
methodNotAllowed405
notAcceptable406
proxyAuthenticationRequired407
requestTimeout408
conflict409
gone410
lengthRequired411
preconditionFailed412
payloadTooLarge413
URI_TooLong414
unsupportedMediaType415
rangeNotSatisfiable416
expectationFailed417
IAmATeapot418
misdirectedRequest421
unprocessableEntity422
locked423
failedDependency424
tooEarly425
upgradeRequired426
preconditionRequired428
tooManyRequests429
requestHeaderFieldsTooLarge431
unavailableForLegalReasons451
ServerErrorsHTTP_StatusCodes — Server Error Responses
KeyValue
internalServerError500
notImplemented501
badGateway502
serviceUnavailable503
gatewayTimeout504
HTTP_VersionNotSupported505
variantAlsoNegotiates506
insufficientStorage507
loopDetected508
notExtended510
networkAuthenticationRequired511

DataTypes

IntegerDataTypes
KeyValue
OneByte\_\_8\_Bits"1_BYTE__8_BITS"
TwoBytes\_\_16\_Bits"2_BYTES__16_BITS"
ThreeBytes\_\_24\_Bits"3_BYTES__24_BITS"
FourBytes\_\_32\_Bits"4_BYTES__32_BITS"
EightBytes\_\_64\_Bits"8_BYTES__64_BITS"

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
MAXIMAL_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 27 Sep 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