mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 10:54:44 +00:00
feat(packages/stdlib): add timestamp and noop utils
This commit is contained in:
@@ -5,3 +5,4 @@ export * from './bits';
|
|||||||
export * from './structs';
|
export * from './structs';
|
||||||
export * from './arrays';
|
export * from './arrays';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
|
export * from './utils'
|
||||||
|
|||||||
13
packages/stdlib/src/utils/index.ts
Normal file
13
packages/stdlib/src/utils/index.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* Returns the current timestamp
|
||||||
|
*
|
||||||
|
* @returns {number} The current timestamp
|
||||||
|
*/
|
||||||
|
export const timestamp = () => Date.now();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No operation function
|
||||||
|
*
|
||||||
|
* @returns {void} Nothing
|
||||||
|
*/
|
||||||
|
export const noop = () => {};
|
||||||
Reference in New Issue
Block a user