Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Elapsy is a singleton class that calculates the elapsed time from the moment the first instance until the moment one of the possible functions is called.
Elapsy is a singleton class that calculates the elapsed time from the moment the first instance until the moment one of the possible functions is called.
npm install --save elapsy
In order to use elapsy, you need to instantiate the class when you want to start counting the time. EG right after you start your application
const Elapsy = require('elapsy');
// This will mark the current time for the next calls
const elapsy = new Elapsy();
When you want to check the execution time, you can use one of the following functions:
Returns the number of the execution time in miliseconds
const elapsy = new Elapsy();
const elapsed = elapsy.time();
console.log(elapsed);
Returns a formated string of the execution time in the format hh:mm:ss:ms.
If the elapsed time is more than a day, the number of days is show in the start of the string.
Examples:
00:13:08.324
03:00:59.999
1 day, 12:43:17.385
428 days, 04:58:23.032
const elapsy = new Elapsy();
const formatedElapsed = elapsy.formated();
console.log(formatedElapsed);
Insert the formated (hh:mm:ss.ms) string of the current elapsed time in the right end of the terminal.
You can pass a chalk color to the method (default is blue) and if you want to show the miliseconds;
Example:
const elapsy = new Elapsy();
elapsy.log('white', false);
FAQs
Elapsy is a singleton class that calculates the elapsed time from the moment the first instance until the moment one of the possible functions is called.
The npm package elapsy receives a total of 7 weekly downloads. As such, elapsy popularity was classified as not popular.
We found that elapsy demonstrated a not healthy version release cadence and project activity because the last version was released 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.