initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
30
github/codeql-action-v2/node_modules/parse-ms/index.d.ts
generated
vendored
Normal file
30
github/codeql-action-v2/node_modules/parse-ms/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
export interface TimeComponents {
|
||||
days: number;
|
||||
hours: number;
|
||||
minutes: number;
|
||||
seconds: number;
|
||||
milliseconds: number;
|
||||
microseconds: number;
|
||||
nanoseconds: number;
|
||||
}
|
||||
|
||||
/**
|
||||
Parse milliseconds into an object.
|
||||
|
||||
@example
|
||||
```
|
||||
import parseMilliseconds from 'parse-ms';
|
||||
|
||||
parseMilliseconds(1337000001);
|
||||
// {
|
||||
// days: 15,
|
||||
// hours: 11,
|
||||
// minutes: 23,
|
||||
// seconds: 20,
|
||||
// milliseconds: 1,
|
||||
// microseconds: 0,
|
||||
// nanoseconds: 0
|
||||
// }
|
||||
```
|
||||
*/
|
||||
export default function parseMilliseconds(milliseconds: number): TimeComponents;
|
||||
17
github/codeql-action-v2/node_modules/parse-ms/index.js
generated
vendored
Normal file
17
github/codeql-action-v2/node_modules/parse-ms/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
export default function parseMilliseconds(milliseconds) {
|
||||
if (typeof milliseconds !== 'number') {
|
||||
throw new TypeError('Expected a number');
|
||||
}
|
||||
|
||||
const roundTowardsZero = milliseconds > 0 ? Math.floor : Math.ceil;
|
||||
|
||||
return {
|
||||
days: roundTowardsZero(milliseconds / 86400000),
|
||||
hours: roundTowardsZero(milliseconds / 3600000) % 24,
|
||||
minutes: roundTowardsZero(milliseconds / 60000) % 60,
|
||||
seconds: roundTowardsZero(milliseconds / 1000) % 60,
|
||||
milliseconds: roundTowardsZero(milliseconds) % 1000,
|
||||
microseconds: roundTowardsZero(milliseconds * 1000) % 1000,
|
||||
nanoseconds: roundTowardsZero(milliseconds * 1e6) % 1000
|
||||
};
|
||||
}
|
||||
9
github/codeql-action-v2/node_modules/parse-ms/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/parse-ms/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.
|
||||
43
github/codeql-action-v2/node_modules/parse-ms/package.json
generated
vendored
Normal file
43
github/codeql-action-v2/node_modules/parse-ms/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "parse-ms",
|
||||
"version": "3.0.0",
|
||||
"description": "Parse milliseconds into an object",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/parse-ms",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"browser",
|
||||
"parse",
|
||||
"time",
|
||||
"ms",
|
||||
"milliseconds",
|
||||
"microseconds",
|
||||
"nanoseconds",
|
||||
"duration",
|
||||
"period",
|
||||
"range",
|
||||
"interval"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
}
|
||||
}
|
||||
33
github/codeql-action-v2/node_modules/parse-ms/readme.md
generated
vendored
Normal file
33
github/codeql-action-v2/node_modules/parse-ms/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# parse-ms
|
||||
|
||||
> Parse milliseconds into an object
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install parse-ms
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import parseMilliseconds from 'parse-ms';
|
||||
|
||||
parseMilliseconds(1337000001);
|
||||
/*
|
||||
{
|
||||
days: 15,
|
||||
hours: 11,
|
||||
minutes: 23,
|
||||
seconds: 20,
|
||||
milliseconds: 1,
|
||||
microseconds: 0,
|
||||
nanoseconds: 0
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [to-milliseconds](https://github.com/sindresorhus/to-milliseconds) - The inverse of this module
|
||||
- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string
|
||||
Loading…
Add table
Add a link
Reference in a new issue