Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
fundamental-constants
Advanced tools
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.
npm i fundamental-constants -E
Constant name | Value |
---|---|
HTTP_DEFAULT_PORT | 80 |
HTTPS_DEFAULT_PORT | 443 |
NETWORK_PORT_MAXIMAL_VALUE | 65535 |
NETWORK_PORT_MINIMAL_VALUE | 1 |
Constant name | Value |
---|---|
DAYS_COUNT_IN_WEEK | 7 |
HOURS_COUNT_IN_STELLAR_DAY | 24 |
MAXIMAL_DAYS_IN_MONTH | 31 |
MAXIMAL_SUPPORTED_UNIX_MILLISECONDS_AMOUNT | 8640000000000000 |
MINIMAL_SUPPORTED_UNIX_MILLISECONDS_AMOUNT | -8640000000000000 |
MINUTES_COUNT_IN_HOUR | 60 |
MONTHS_COUNT_IN_YEAR | 12 |
SECONDS_COUNT_IN_MINUTE | 60 |
DaysOfWeekNames
Key | Value |
---|---|
sunday | "SUNDAY" |
monday | "MONDAY" |
tuesday | "TUESDAY" |
wednesday | "WEDNESDAY" |
thursday | "THURSDAY" |
friday | "FRIDAY" |
saturday | "SATURDAY" |
MonthsNames
Key | Value |
---|---|
january | "JANUARY" |
february | "FEBRUARY" |
march | "MARCH" |
april | "APRIL" |
may | "MAY" |
june | "JUNE" |
july | "JULY" |
august | "AUGUST" |
september | "SEPTEMBER" |
october | "OCTOBER" |
november | "NOVEMBER" |
december | "DECEMBER" |
Constant name | Value |
---|---|
CHARACTERS_COUNT_IN_DATE_PART_OF_ISO8601_STRING | 10 |
CHARACTERS_COUNT_IN_FULL_ISO8601_STRING | 24 |
Constant name | Value |
---|---|
EMAIL_ADDRESS_VALID_PATTERN | /^\w+(?:[.-]?\w+)*@\w+(?:[.-]?\w+)*(?:\.\w{2,3})+$/u |
MINIMAL_CHARACTERS_COUNT_OF_EMAIL_ADDRESS | 3 |
FAQs
Fundamental constants and enumerations
The npm package fundamental-constants receives a total of 52 weekly downloads. As such, fundamental-constants popularity was classified as not popular.
We found that fundamental-constants demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.