mirror of
https://github.com/bcomnes/deploy-to-neocities.git
synced 2026-01-16 22:56:28 +00:00
0.0.11
This commit is contained in:
parent
8b470dbfd8
commit
74e6c4a57e
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
## [v0.0.11](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.10...v0.0.11) - 2020-02-13
|
||||
|
||||
### Commits
|
||||
|
||||
- bug: fix time formatting [`8b470db`](https://github.com/bcomnes/deploy-to-neocities/commit/8b470dbfd876d61b6bd72327952bd1d9b0b49c9b)
|
||||
|
||||
## [v0.0.10](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.9...v0.0.10) - 2020-02-13
|
||||
|
||||
### Commits
|
||||
|
||||
162
node_modules/ms/index.js
generated
vendored
Normal file
162
node_modules/ms/index.js
generated
vendored
Normal file
@ -0,0 +1,162 @@
|
||||
/**
|
||||
* Helpers.
|
||||
*/
|
||||
|
||||
var s = 1000;
|
||||
var m = s * 60;
|
||||
var h = m * 60;
|
||||
var d = h * 24;
|
||||
var w = d * 7;
|
||||
var y = d * 365.25;
|
||||
|
||||
/**
|
||||
* Parse or format the given `val`.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `long` verbose formatting [false]
|
||||
*
|
||||
* @param {String|Number} val
|
||||
* @param {Object} [options]
|
||||
* @throws {Error} throw an error if val is not a non-empty string or a number
|
||||
* @return {String|Number}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function(val, options) {
|
||||
options = options || {};
|
||||
var type = typeof val;
|
||||
if (type === 'string' && val.length > 0) {
|
||||
return parse(val);
|
||||
} else if (type === 'number' && isFinite(val)) {
|
||||
return options.long ? fmtLong(val) : fmtShort(val);
|
||||
}
|
||||
throw new Error(
|
||||
'val is not a non-empty string or a valid number. val=' +
|
||||
JSON.stringify(val)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse the given `str` and return milliseconds.
|
||||
*
|
||||
* @param {String} str
|
||||
* @return {Number}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function parse(str) {
|
||||
str = String(str);
|
||||
if (str.length > 100) {
|
||||
return;
|
||||
}
|
||||
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
||||
str
|
||||
);
|
||||
if (!match) {
|
||||
return;
|
||||
}
|
||||
var n = parseFloat(match[1]);
|
||||
var type = (match[2] || 'ms').toLowerCase();
|
||||
switch (type) {
|
||||
case 'years':
|
||||
case 'year':
|
||||
case 'yrs':
|
||||
case 'yr':
|
||||
case 'y':
|
||||
return n * y;
|
||||
case 'weeks':
|
||||
case 'week':
|
||||
case 'w':
|
||||
return n * w;
|
||||
case 'days':
|
||||
case 'day':
|
||||
case 'd':
|
||||
return n * d;
|
||||
case 'hours':
|
||||
case 'hour':
|
||||
case 'hrs':
|
||||
case 'hr':
|
||||
case 'h':
|
||||
return n * h;
|
||||
case 'minutes':
|
||||
case 'minute':
|
||||
case 'mins':
|
||||
case 'min':
|
||||
case 'm':
|
||||
return n * m;
|
||||
case 'seconds':
|
||||
case 'second':
|
||||
case 'secs':
|
||||
case 'sec':
|
||||
case 's':
|
||||
return n * s;
|
||||
case 'milliseconds':
|
||||
case 'millisecond':
|
||||
case 'msecs':
|
||||
case 'msec':
|
||||
case 'ms':
|
||||
return n;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Short format for `ms`.
|
||||
*
|
||||
* @param {Number} ms
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function fmtShort(ms) {
|
||||
var msAbs = Math.abs(ms);
|
||||
if (msAbs >= d) {
|
||||
return Math.round(ms / d) + 'd';
|
||||
}
|
||||
if (msAbs >= h) {
|
||||
return Math.round(ms / h) + 'h';
|
||||
}
|
||||
if (msAbs >= m) {
|
||||
return Math.round(ms / m) + 'm';
|
||||
}
|
||||
if (msAbs >= s) {
|
||||
return Math.round(ms / s) + 's';
|
||||
}
|
||||
return ms + 'ms';
|
||||
}
|
||||
|
||||
/**
|
||||
* Long format for `ms`.
|
||||
*
|
||||
* @param {Number} ms
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function fmtLong(ms) {
|
||||
var msAbs = Math.abs(ms);
|
||||
if (msAbs >= d) {
|
||||
return plural(ms, msAbs, d, 'day');
|
||||
}
|
||||
if (msAbs >= h) {
|
||||
return plural(ms, msAbs, h, 'hour');
|
||||
}
|
||||
if (msAbs >= m) {
|
||||
return plural(ms, msAbs, m, 'minute');
|
||||
}
|
||||
if (msAbs >= s) {
|
||||
return plural(ms, msAbs, s, 'second');
|
||||
}
|
||||
return ms + ' ms';
|
||||
}
|
||||
|
||||
/**
|
||||
* Pluralization helper.
|
||||
*/
|
||||
|
||||
function plural(ms, msAbs, n, name) {
|
||||
var isPlural = msAbs >= n * 1.5;
|
||||
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
||||
}
|
||||
10
node_modules/pretty-time/LICENSE → node_modules/ms/license.md
generated
vendored
10
node_modules/pretty-time/LICENSE → node_modules/ms/license.md
generated
vendored
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-present, Jon Schlinkert.
|
||||
Copyright (c) 2016 Zeit, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@ -9,13 +9,13 @@ 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 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.
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
70
node_modules/ms/package.json
generated
vendored
Normal file
70
node_modules/ms/package.json
generated
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"_from": "ms@^2.1.2",
|
||||
"_id": "ms@2.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"_location": "/ms",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ms@^2.1.2",
|
||||
"name": "ms",
|
||||
"escapedName": "ms",
|
||||
"rawSpec": "^2.1.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.1.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/",
|
||||
"/debug"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
|
||||
"_spec": "ms@^2.1.2",
|
||||
"_where": "/Users/bret/repos/deploy-to-neocities",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zeit/ms/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Tiny millisecond conversion utility",
|
||||
"devDependencies": {
|
||||
"eslint": "4.12.1",
|
||||
"expect.js": "0.3.1",
|
||||
"husky": "0.14.3",
|
||||
"lint-staged": "5.0.0",
|
||||
"mocha": "4.0.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "eslint:recommended",
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/zeit/ms#readme",
|
||||
"license": "MIT",
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"npm run lint",
|
||||
"prettier --single-quote --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"main": "./index",
|
||||
"name": "ms",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zeit/ms.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint lib/* bin/*",
|
||||
"precommit": "lint-staged",
|
||||
"test": "mocha tests.js"
|
||||
},
|
||||
"version": "2.1.2"
|
||||
}
|
||||
60
node_modules/ms/readme.md
generated
vendored
Normal file
60
node_modules/ms/readme.md
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
# ms
|
||||
|
||||
[](https://travis-ci.org/zeit/ms)
|
||||
[](https://spectrum.chat/zeit)
|
||||
|
||||
Use this package to easily convert various time formats to milliseconds.
|
||||
|
||||
## Examples
|
||||
|
||||
```js
|
||||
ms('2 days') // 172800000
|
||||
ms('1d') // 86400000
|
||||
ms('10h') // 36000000
|
||||
ms('2.5 hrs') // 9000000
|
||||
ms('2h') // 7200000
|
||||
ms('1m') // 60000
|
||||
ms('5s') // 5000
|
||||
ms('1y') // 31557600000
|
||||
ms('100') // 100
|
||||
ms('-3 days') // -259200000
|
||||
ms('-1h') // -3600000
|
||||
ms('-200') // -200
|
||||
```
|
||||
|
||||
### Convert from Milliseconds
|
||||
|
||||
```js
|
||||
ms(60000) // "1m"
|
||||
ms(2 * 60000) // "2m"
|
||||
ms(-3 * 60000) // "-3m"
|
||||
ms(ms('10 hours')) // "10h"
|
||||
```
|
||||
|
||||
### Time Format Written-Out
|
||||
|
||||
```js
|
||||
ms(60000, { long: true }) // "1 minute"
|
||||
ms(2 * 60000, { long: true }) // "2 minutes"
|
||||
ms(-3 * 60000, { long: true }) // "-3 minutes"
|
||||
ms(ms('10 hours'), { long: true }) // "10 hours"
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Works both in [Node.js](https://nodejs.org) and in the browser
|
||||
- If a number is supplied to `ms`, a string with a unit is returned
|
||||
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
|
||||
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
|
||||
|
||||
## Related Packages
|
||||
|
||||
- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
|
||||
|
||||
## Caught a Bug?
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
||||
2. Link the package to the global module directory: `npm link`
|
||||
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
|
||||
|
||||
As always, you can run the tests using: `npm test`
|
||||
169
node_modules/pretty-time/README.md
generated
vendored
169
node_modules/pretty-time/README.md
generated
vendored
@ -1,169 +0,0 @@
|
||||
# pretty-time [](https://www.npmjs.com/package/pretty-time) [](https://npmjs.org/package/pretty-time) [](https://npmjs.org/package/pretty-time) [](https://travis-ci.org/jonschlinkert/pretty-time)
|
||||
|
||||
> Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save pretty-time
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var pretty = require('pretty-time');
|
||||
|
||||
var start = process.hrtime();
|
||||
var time = process.hrtime(start);
|
||||
console.log(pretty(time));
|
||||
//=> 3μs
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
By default, when no time increment is given as the second argument, the closest timescale is used (e.g. _most granular without being less than zero_).
|
||||
|
||||
**Examples:**
|
||||
|
||||
```js
|
||||
pretty([1200708, 795428088]);
|
||||
//=> '2w'
|
||||
|
||||
pretty([800708, 795428088]);
|
||||
//=> '1w'
|
||||
|
||||
pretty([400708, 795428088]);
|
||||
//=> '5d'
|
||||
|
||||
pretty([70708, 795428088]);
|
||||
//=> '20h'
|
||||
|
||||
pretty([12708, 795428088]);
|
||||
//=> '4h'
|
||||
|
||||
pretty([3708, 795428088]);
|
||||
//=> '1h'
|
||||
|
||||
pretty([208, 795428088]);
|
||||
//=> '3m'
|
||||
|
||||
pretty([20, 795428088]);
|
||||
//=> '21s'
|
||||
|
||||
pretty([0, 795428088]);
|
||||
//=> '795ms'
|
||||
|
||||
pretty([0, 000428088]);
|
||||
//=> '428μs'
|
||||
|
||||
pretty([0, 000000088]);
|
||||
//=> '88ns'
|
||||
|
||||
pretty([0, 000000018]);
|
||||
//=> '18ns'
|
||||
```
|
||||
|
||||
### Minimum time increment
|
||||
|
||||
_(All of the following examples use `[6740, 795428088]` as the hrtime array.)_
|
||||
|
||||
This value is passed as the second argument and determines how granular to make the time.
|
||||
|
||||
**Examples**
|
||||
|
||||
```js
|
||||
pretty(time, 'h');
|
||||
//=> '2h'
|
||||
|
||||
pretty(time, 'm');
|
||||
//=> '1h 52m'
|
||||
|
||||
pretty(time, 's');
|
||||
//=> '1h 52m 21s'
|
||||
```
|
||||
|
||||
**Valid time increments**
|
||||
|
||||
Any of the following may be used:
|
||||
|
||||
* `ns` | `nano` | `nanosecond` | `nanoseconds`
|
||||
* `μs` | `micro` | `microsecond` | `microseconds`
|
||||
* `ms` | `milli` | `millisecond` | `milliseconds`
|
||||
* `s` | `sec` | `second` | `seconds`
|
||||
* `m` | `min` | `minute` | `minutes`
|
||||
* `h` | `hr` | `hour` | `hours`
|
||||
* `d` | `day` | `days`
|
||||
* `w` | `wk` | `week` | `weeks`
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [o-clock](https://www.npmjs.com/package/o-clock): Simple javascript utility for displaying the time in 12-hour clock format. | [homepage](https://github.com/jonschlinkert/o-clock "Simple javascript utility for displaying the time in 12-hour clock format.")
|
||||
* [seconds](https://www.npmjs.com/package/seconds): Get the number of seconds for a minute, hour, day and week. | [homepage](https://github.com/jonschlinkert/seconds "Get the number of seconds for a minute, hour, day and week.")
|
||||
* [time-stamp](https://www.npmjs.com/package/time-stamp): Get a formatted timestamp. | [homepage](https://github.com/jonschlinkert/time-stamp "Get a formatted timestamp.")
|
||||
* [timescale](https://www.npmjs.com/package/timescale): Convert from one time scale to another. Nanosecond is the most atomic unit, week is… [more](https://github.com/jonschlinkert/timescale) | [homepage](https://github.com/jonschlinkert/timescale "Convert from one time scale to another. Nanosecond is the most atomic unit, week is the largest unit.")
|
||||
* [week](https://www.npmjs.com/package/week): Get the current week number. | [homepage](https://github.com/datetime/week "Get the current week number.")
|
||||
* [weekday](https://www.npmjs.com/package/weekday): Get the name and number of the current weekday. Or get the name of the… [more](https://github.com/datetime/weekday) | [homepage](https://github.com/datetime/weekday "Get the name and number of the current weekday. Or get the name of the weekday for a given number.")
|
||||
* [year](https://www.npmjs.com/package/year): Simple utility to get the current year with 2 or 4 digits. | [homepage](https://github.com/jonschlinkert/year "Simple utility to get the current year with 2 or 4 digits.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 14 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 5 | [doowb](https://github.com/doowb) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
* [GitHub Profile](https://github.com/jonschlinkert)
|
||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 12, 2018._
|
||||
56
node_modules/pretty-time/index.js
generated
vendored
56
node_modules/pretty-time/index.js
generated
vendored
@ -1,56 +0,0 @@
|
||||
/*!
|
||||
* pretty-time <https://github.com/jonschlinkert/pretty-time>
|
||||
*
|
||||
* Copyright (c) 2015-2018, present, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const utils = require('./utils');
|
||||
|
||||
module.exports = (time, smallest, digits) => {
|
||||
const isNumber = /^[0-9]+$/.test(time);
|
||||
if (!isNumber && !Array.isArray(time)) {
|
||||
throw new TypeError('expected an array or number in nanoseconds');
|
||||
}
|
||||
if (Array.isArray(time) && time.length !== 2) {
|
||||
throw new TypeError('expected an array from process.hrtime()');
|
||||
}
|
||||
|
||||
if (/^[0-9]+$/.test(smallest)) {
|
||||
digits = smallest;
|
||||
smallest = null;
|
||||
}
|
||||
|
||||
let num = isNumber ? time : utils.nano(time);
|
||||
let res = '';
|
||||
let prev;
|
||||
|
||||
for (const uom of Object.keys(utils.scale)) {
|
||||
const step = utils.scale[uom];
|
||||
let inc = num / step;
|
||||
|
||||
if (smallest && utils.isSmallest(uom, smallest)) {
|
||||
inc = utils.round(inc, digits);
|
||||
if (prev && (inc === (prev / step))) --inc;
|
||||
res += inc + uom;
|
||||
return res.trim();
|
||||
}
|
||||
|
||||
if (inc < 1) continue;
|
||||
if (!smallest) {
|
||||
inc = utils.round(inc, digits);
|
||||
res += inc + uom;
|
||||
return res;
|
||||
}
|
||||
|
||||
prev = step;
|
||||
|
||||
inc = Math.floor(inc);
|
||||
num -= (inc * step);
|
||||
res += inc + uom + ' ';
|
||||
}
|
||||
|
||||
return res.trim();
|
||||
};
|
||||
99
node_modules/pretty-time/package.json
generated
vendored
99
node_modules/pretty-time/package.json
generated
vendored
@ -1,99 +0,0 @@
|
||||
{
|
||||
"_from": "pretty-time@1.1.0",
|
||||
"_id": "pretty-time@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==",
|
||||
"_location": "/pretty-time",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "pretty-time@1.1.0",
|
||||
"name": "pretty-time",
|
||||
"escapedName": "pretty-time",
|
||||
"rawSpec": "1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
|
||||
"_shasum": "ffb7429afabb8535c346a34e41873adf3d74dd0e",
|
||||
"_spec": "pretty-time@1.1.0",
|
||||
"_where": "/Users/bret/repos/deploy-to-neocities",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/pretty-time/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.",
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"utils.js"
|
||||
],
|
||||
"homepage": "https://github.com/jonschlinkert/pretty-time",
|
||||
"keywords": [
|
||||
"convert",
|
||||
"date",
|
||||
"format",
|
||||
"formatting",
|
||||
"hour",
|
||||
"hrtime",
|
||||
"micro",
|
||||
"milli",
|
||||
"minute",
|
||||
"nano",
|
||||
"nanosecond",
|
||||
"pretty",
|
||||
"second",
|
||||
"time",
|
||||
"week"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "pretty-time",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/pretty-time.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"o-clock",
|
||||
"seconds",
|
||||
"time-stamp",
|
||||
"timescale",
|
||||
"week",
|
||||
"weekday",
|
||||
"year"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
||||
32
node_modules/pretty-time/utils.js
generated
vendored
32
node_modules/pretty-time/utils.js
generated
vendored
@ -1,32 +0,0 @@
|
||||
exports.nano = time => +time[0] * 1e9 + +time[1];
|
||||
|
||||
exports.scale = {
|
||||
'w': 6048e11,
|
||||
'd': 864e11,
|
||||
'h': 36e11,
|
||||
'm': 6e10,
|
||||
's': 1e9,
|
||||
'ms': 1e6,
|
||||
'μs': 1e3,
|
||||
'ns': 1,
|
||||
};
|
||||
|
||||
exports.regex = {
|
||||
'w': /^(w((ee)?k)?s?)$/,
|
||||
'd': /^(d(ay)?s?)$/,
|
||||
'h': /^(h((ou)?r)?s?)$/,
|
||||
'm': /^(min(ute)?s?|m)$/,
|
||||
's': /^((sec(ond)?)s?|s)$/,
|
||||
'ms': /^(milli(second)?s?|ms)$/,
|
||||
'μs': /^(micro(second)?s?|μs)$/,
|
||||
'ns': /^(nano(second)?s?|ns?)$/,
|
||||
};
|
||||
|
||||
exports.isSmallest = function(uom, unit) {
|
||||
return exports.regex[uom].test(unit);
|
||||
};
|
||||
|
||||
exports.round = function(num, digits) {
|
||||
const n = Math.abs(num);
|
||||
return /[0-9]/.test(digits) ? n.toFixed(digits) : Math.round(n);
|
||||
};
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "deploy-to-neocities",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11",
|
||||
"description": "Github Action to deplpoy a folder to Neocities.org",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user