Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
50
node_modules/time-span/index.d.ts
generated
vendored
Normal file
50
node_modules/time-span/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
declare namespace timeSpan {
|
||||
interface TimeEndFunction {
|
||||
/**
|
||||
@returns Elapsed milliseconds.
|
||||
*/
|
||||
(): number;
|
||||
|
||||
/**
|
||||
@returns Elapsed milliseconds rounded.
|
||||
*/
|
||||
rounded(): number;
|
||||
|
||||
/**
|
||||
@returns Elapsed seconds.
|
||||
*/
|
||||
seconds(): number;
|
||||
|
||||
/**
|
||||
@returns Elapsed nanoseconds.
|
||||
*/
|
||||
nanoseconds(): number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Simplified high resolution timing.
|
||||
|
||||
@returns A function that returns the time difference.
|
||||
|
||||
@example
|
||||
```
|
||||
import timeSpan = require('time-span');
|
||||
|
||||
const end = timeSpan();
|
||||
|
||||
timeConsumingFn();
|
||||
|
||||
console.log(end());
|
||||
//=> 1745.3186
|
||||
|
||||
console.log(end.rounded());
|
||||
//=> 1745
|
||||
|
||||
console.log(end.seconds());
|
||||
//=> 1.7453186
|
||||
```
|
||||
*/
|
||||
declare function timeSpan(): timeSpan.TimeEndFunction;
|
||||
|
||||
export = timeSpan;
|
||||
14
node_modules/time-span/index.js
generated
vendored
Normal file
14
node_modules/time-span/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
const convertHrtime = require('convert-hrtime');
|
||||
|
||||
module.exports = () => {
|
||||
const start = process.hrtime();
|
||||
const end = type => convertHrtime(process.hrtime(start))[type];
|
||||
|
||||
const returnValue = () => end('milliseconds');
|
||||
returnValue.rounded = () => Math.round(end('milliseconds'));
|
||||
returnValue.seconds = () => end('seconds');
|
||||
returnValue.nanoseconds = () => end('nanoseconds');
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
9
node_modules/time-span/license
generated
vendored
Normal file
9
node_modules/time-span/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
51
node_modules/time-span/package.json
generated
vendored
Normal file
51
node_modules/time-span/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "time-span",
|
||||
"version": "4.0.0",
|
||||
"description": "Simplified high resolution timing",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/time-span",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"time",
|
||||
"span",
|
||||
"elapsed",
|
||||
"process",
|
||||
"hrtime",
|
||||
"highres",
|
||||
"timing",
|
||||
"perf",
|
||||
"performance",
|
||||
"bench",
|
||||
"benchmark",
|
||||
"profiling",
|
||||
"measure",
|
||||
"seconds",
|
||||
"milliseconds",
|
||||
"nanoseconds"
|
||||
],
|
||||
"dependencies": {
|
||||
"convert-hrtime": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"delay": "^4.1.0",
|
||||
"in-range": "^2.0.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
50
node_modules/time-span/readme.md
generated
vendored
Normal file
50
node_modules/time-span/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# time-span [](https://travis-ci.org/sindresorhus/time-span)
|
||||
|
||||
> Simplified high resolution timing
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install time-span
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const timeSpan = require('time-span');
|
||||
|
||||
const end = timeSpan();
|
||||
|
||||
timeConsumingFn();
|
||||
|
||||
console.log(end());
|
||||
//=> 1745.3186
|
||||
|
||||
console.log(end.rounded());
|
||||
//=> 1745
|
||||
|
||||
console.log(end.seconds());
|
||||
//=> 1.7453186
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `const end = timeSpan()`
|
||||
|
||||
Returns a function, that when called, returns the time difference.
|
||||
|
||||
#### end()
|
||||
|
||||
Elapsed milliseconds.
|
||||
|
||||
#### end.rounded()
|
||||
|
||||
Elapsed milliseconds rounded.
|
||||
|
||||
#### end.seconds()
|
||||
|
||||
Elapsed seconds.
|
||||
|
||||
#### end.nanoseconds()
|
||||
|
||||
Elapsed nanoseconds.
|
||||
Loading…
Add table
Add a link
Reference in a new issue