This commit is contained in:
arnaucode
2017-02-03 08:56:51 +01:00
parent c4b7414770
commit 112745d6fa
1585 changed files with 450241 additions and 0 deletions

5
server/node_modules/ms/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
node_modules
test
History.md
Makefile
component.json

20
server/node_modules/ms/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
(The MIT License)
Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.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.

35
server/node_modules/ms/README.md generated vendored Normal file
View File

@@ -0,0 +1,35 @@
# ms.js: miliseconds conversion utility
```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('100') // 100
```
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
ms(ms('10 hours')) // "10h"
```
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](nodejs.org/download).
- 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 ms is returned.
## License
MIT

123
server/node_modules/ms/index.js generated vendored Normal file
View File

@@ -0,0 +1,123 @@
/**
* Helpers.
*/
var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var y = d * 365.25;
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} options
* @return {String|Number}
* @api public
*/
module.exports = function(val, options){
options = options || {};
if ('string' == typeof val) return parse(val);
return options.long
? long(val)
: short(val);
};
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|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 '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;
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function short(ms) {
if (ms >= d) return Math.round(ms / d) + 'd';
if (ms >= h) return Math.round(ms / h) + 'h';
if (ms >= m) return Math.round(ms / m) + 'm';
if (ms >= s) return Math.round(ms / s) + 's';
return ms + 'ms';
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function long(ms) {
return plural(ms, d, 'day')
|| plural(ms, h, 'hour')
|| plural(ms, m, 'minute')
|| plural(ms, s, 'second')
|| ms + ' ms';
}
/**
* Pluralization helper.
*/
function plural(ms, n, name) {
if (ms < n) return;
if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
return Math.ceil(ms / n) + ' ' + name + 's';
}

81
server/node_modules/ms/package.json generated vendored Normal file
View File

@@ -0,0 +1,81 @@
{
"_args": [
[
{
"raw": "ms@0.7.0",
"scope": null,
"escapedName": "ms",
"name": "ms",
"rawSpec": "0.7.0",
"spec": "0.7.0",
"type": "version"
},
"/home/nau/MEGA/CODI/githubRepos/colspace/node_modules/debug"
]
],
"_from": "ms@0.7.0",
"_id": "ms@0.7.0",
"_inCache": true,
"_location": "/ms",
"_npmUser": {
"name": "rauchg",
"email": "rauchg@gmail.com"
},
"_npmVersion": "1.4.21",
"_phantomChildren": {},
"_requested": {
"raw": "ms@0.7.0",
"scope": null,
"escapedName": "ms",
"name": "ms",
"rawSpec": "0.7.0",
"spec": "0.7.0",
"type": "version"
},
"_requiredBy": [
"/debug"
],
"_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz",
"_shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
"_shrinkwrap": null,
"_spec": "ms@0.7.0",
"_where": "/home/nau/MEGA/CODI/githubRepos/colspace/node_modules/debug",
"bugs": {
"url": "https://github.com/guille/ms.js/issues"
},
"component": {
"scripts": {
"ms/index.js": "index.js"
}
},
"dependencies": {},
"description": "Tiny ms conversion utility",
"devDependencies": {
"expect.js": "*",
"mocha": "*",
"serve": "*"
},
"directories": {},
"dist": {
"shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83",
"tarball": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz"
},
"gitHead": "1e9cd9b05ef0dc26f765434d2bfee42394376e52",
"homepage": "https://github.com/guille/ms.js",
"main": "./index",
"maintainers": [
{
"name": "rauchg",
"email": "rauchg@gmail.com"
}
],
"name": "ms",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/guille/ms.js.git"
},
"scripts": {},
"version": "0.7.0"
}