![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@ariesclark/number
Advanced tools
Fast, efficient, and easy-to-use number extensions for TypeScript.
npm install @ariesclark/extensions
# Or directly, if you only need the number extension.
npm install @ariesclark/number
MaybeSuffix
(type)Milliseconds
(type)A duration in milliseconds.
RandomFunction
(type)A random number generator function that returns a float between 0 and 1.
Duration
(type)A duration value.
Supports the following formats in both short and long form:
ms
(milliseconds) e.g. 20ms
s
(seconds) e.g. 1s
or 1 second
m
(minutes) e.g. 2m
or 2 minutes
h
(hours) e.g. 3h
or 3 hours
d
(days) e.g. 4d
or 4 days
w
(weeks) e.g. 5w
or 5 weeks
y
(years) e.g. 6y
or 6 years
milliseconds
(function)[object Object],[object Object],[object Object]
Parameters:
Duration
)returns: number
ms('5m'); // 300000, 5 minutes in milliseconds, short form.
ms(300000); // 300000, 5 minutes in milliseconds, pass-through.
ms('2 hours'); // 7200000, 2 hours in milliseconds, long form.
ms
(variable)[object Object],[object Object],[object Object]
pseudoRandomFloat
(function)Create a pseudo-random number generator from a seed.
Parameters:
string
)returns: RandomFunction
randomFloat
(function)[object Object],[object Object],[object Object]
randomInt
(function)Get a random value between minimum
and maximum
.
Parameters:
number
) - The minimum value, inclusive, defaults to 0
.number
) - The maximum value, inclusive, defaults to 100
.RandomFunction
)returns: number
Timestamp
(type)[object Object],[object Object],[object Object],[object Object],[object Object]
InvalidTimestampError
(variable)timestamp
(function)[object Object],[object Object],[object Object]
Parameters:
Timestamp
)returns: number
// eslint-disable-next-line no-shadow-restricted-names NaN, POSITIVE_INFINITY, isFinite, isInteger, isNaN, isSafeInteger, parseFloat, parseInt }` (variable)
FAQs
Fast, efficient, and easy-to-use number extensions for TypeScript.
We found that @ariesclark/number demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.