feat: ✨ Created a mini nodeJS server with NewMan for testing without PostMan GUI.
This will mimic a run in a CD/CI environment or docker container.
This commit is contained in:
28
node_modules/filesize/LICENSE
generated
vendored
Normal file
28
node_modules/filesize/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
Copyright (c) 2021, Jason Mulligan
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of filesize nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
101
node_modules/filesize/README.md
generated
vendored
Normal file
101
node_modules/filesize/README.md
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
# filesize.js
|
||||
|
||||
[](http://travis-ci.org/avoidwork/filesize.js) [](https://www.npmjs.com/package/filesize) [](https://cdnjs.com/libraries/filesize)
|
||||
|
||||
filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string.
|
||||
|
||||
## Optional settings
|
||||
|
||||
`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output.
|
||||
|
||||
### base
|
||||
_*(number)*_ Number base, default is `10`
|
||||
|
||||
### bits
|
||||
_*(boolean)*_ Enables `bit` sizes, default is `false`
|
||||
|
||||
### exponent
|
||||
_*(number)*_ Specifies the symbol via exponent, e.g. `2` is `MB` for base 2, default is `-1`
|
||||
|
||||
### fullform
|
||||
_*(boolean)*_ Enables full form of unit of measure, default is `false`
|
||||
|
||||
### fullforms
|
||||
_*(array)*_ Array of full form overrides, default is `[]`
|
||||
|
||||
### locale (overrides 'separator')
|
||||
_*(string || boolean)*_ BCP 47 language tag to specify a locale, or `true` to use default locale, default is `""`
|
||||
|
||||
### localeOptions (overrides 'separator', requires string for 'locale' option)
|
||||
_*(object)*_ Dictionary of options defined by ECMA-402 ([Number.prototype.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString)). Requires locale option to be explicitly passed as a string, otherwise is ignored.
|
||||
|
||||
### output
|
||||
_*(string)*_ Output of function (`array`, `exponent`, `object`, or `string`), default is `string`
|
||||
|
||||
### pad
|
||||
_*(boolean)*_ Decimal place end padding, default is `false`
|
||||
|
||||
### precision
|
||||
_*(number)*_ Sets precision of numerical output, default is `0`
|
||||
|
||||
### round
|
||||
_*(number)*_ Decimal place, default is `2`
|
||||
|
||||
### roundingMethod
|
||||
_*(string)*_ Rounding method, can be `round`, `floor`, or `ceil`, default is `round`
|
||||
|
||||
### separator
|
||||
_*(string)*_ Decimal separator character, default is `.`
|
||||
|
||||
### spacer
|
||||
_*(string)*_ Character between the `result` and `symbol`, default is `" "`
|
||||
|
||||
### standard
|
||||
_*(string)*_ Standard unit of measure, can be `iec` or `jedec`, default is `iec`; can be overruled by `base`
|
||||
|
||||
### symbols
|
||||
_*(object)*_ Dictionary of SI/IEC/JEDEC symbols to replace for localization, defaults to english if no match is found
|
||||
|
||||
### unix
|
||||
_*(boolean)*_ Enables unix style human readable output, e.g `ls -lh`, default is `false`
|
||||
|
||||
## Examples
|
||||
|
||||
```javascript
|
||||
filesize(500); // "500 B"
|
||||
filesize(500, {bits: true}); // "4 kbit"
|
||||
filesize(265318, {base: 2}); // "259.1 KiB"
|
||||
filesize(265318); // "265.32 kB"
|
||||
filesize(265318, {round: 0}); // "265 kB"
|
||||
filesize(265318, {output: "array"}); // [265.32, "kB"]
|
||||
filesize(265318, {output: "object"}); // {value: 265.32, symbol: "kB", exponent: 1, unit: "kB"}
|
||||
filesize(1, {symbols: {B: "Б"}}); // "1 Б"
|
||||
filesize(1024); // "1.02 kB"
|
||||
filesize(1024, {exponent: 0}); // "1024 B"
|
||||
filesize(1024, {output: "exponent"}); // 1
|
||||
filesize(265318, {standard: "jedec"}); // "259.1 KB"
|
||||
filesize(265318, {base: 2, fullform: true}); // "259.1 kibibytes"
|
||||
filesize(12, {fullform: true, fullforms: ["байтов"]}); // "12 байтов"
|
||||
filesize(265318, {separator: ","}); // "265,32 kB"
|
||||
filesize(265318, {locale: "de"}); // "265,32 kB"
|
||||
```
|
||||
|
||||
## Partial Application
|
||||
`filesize.partial()` takes the second parameter of `filesize()` and returns a new function with the configuration applied
|
||||
upon execution. This can be used to reduce `Object` creation if you call `filesize()` without caching the `descriptor`
|
||||
in lexical scope.
|
||||
|
||||
```javascript
|
||||
const size = filesize.partial({base: 2, standard: "jedec"});
|
||||
|
||||
size(265318); // "259.1 KB"
|
||||
```
|
||||
|
||||
## How can I load filesize.js?
|
||||
filesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (```npm install filesize```), or using a script tag.
|
||||
|
||||
An ES6 version is bundled with an npm install, but requires you load it with the full path, e.g. `require(path.join(__dirname, 'node_modules', 'filesize', 'lib', 'filesize.es6.js'))`.
|
||||
|
||||
## License
|
||||
Copyright (c) 2021 Jason Mulligan
|
||||
Licensed under the BSD-3 license.
|
107
node_modules/filesize/filesize.d.ts
generated
vendored
Normal file
107
node_modules/filesize/filesize.d.ts
generated
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
// Type definitions for filesize 6.0.1
|
||||
// Project: https://github.com/avoidwork/filesize.js, https://filesizejs.com
|
||||
// Definitions by: Giedrius Grabauskas <https://github.com/GiedriusGrabauskas>
|
||||
// Renaud Chaput <https://github.com/renchap>
|
||||
// Roman Nuritdinov <https://github.com/Ky6uk>
|
||||
// Sam Hulick <https://github.com/ffxsam>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare var fileSize: Filesize.Filesize;
|
||||
export = fileSize;
|
||||
export as namespace filesize;
|
||||
|
||||
declare namespace Filesize {
|
||||
interface SiJedecBits {
|
||||
b?: string;
|
||||
Kb?: string;
|
||||
Mb?: string;
|
||||
Gb?: string;
|
||||
Tb?: string;
|
||||
Pb?: string;
|
||||
Eb?: string;
|
||||
Zb?: string;
|
||||
Yb?: string;
|
||||
}
|
||||
|
||||
interface SiJedecBytes {
|
||||
B?: string;
|
||||
KB?: string;
|
||||
MB?: string;
|
||||
GB?: string;
|
||||
TB?: string;
|
||||
PB?: string;
|
||||
EB?: string;
|
||||
ZB?: string;
|
||||
YB?: string;
|
||||
}
|
||||
|
||||
type SiJedec = SiJedecBits & SiJedecBytes & { [name: string]: string };
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* Number base, default is 2
|
||||
*/
|
||||
base?: number;
|
||||
/**
|
||||
* Enables bit sizes, default is false
|
||||
*/
|
||||
bits?: boolean;
|
||||
/**
|
||||
* Specifies the SI suffix via exponent, e.g. 2 is MB for bytes, default is -1
|
||||
*/
|
||||
exponent?: number;
|
||||
/**
|
||||
* Enables full form of unit of measure, default is false
|
||||
*/
|
||||
fullform?: boolean;
|
||||
/**
|
||||
* Array of full form overrides, default is []
|
||||
*/
|
||||
fullforms?: string[];
|
||||
/**
|
||||
* BCP 47 language tag to specify a locale, or true to use default locale, default is ""
|
||||
*/
|
||||
locale?: string | boolean;
|
||||
/**
|
||||
* ECMA-402 number format option overrides, default is "{}"
|
||||
*/
|
||||
localeOptions?: Intl.NumberFormatOptions;
|
||||
/**
|
||||
* Output of function (array, exponent, object, or string), default is string
|
||||
*/
|
||||
output?: "array" | "exponent" | "object" | "string";
|
||||
/**
|
||||
* Decimal place, default is 2
|
||||
*/
|
||||
round?: number;
|
||||
/**
|
||||
* Decimal separator character, default is `.`
|
||||
*/
|
||||
separator?: string;
|
||||
/**
|
||||
* Character between the result and suffix, default is ` `
|
||||
*/
|
||||
spacer?: string;
|
||||
/**
|
||||
* Standard unit of measure, can be iec or jedec, default is jedec; can be overruled by base
|
||||
*/
|
||||
standard?: "iec" | "jedec";
|
||||
/**
|
||||
* Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
|
||||
*/
|
||||
symbols?: SiJedec;
|
||||
/**
|
||||
* Enables unix style human readable output, e.g ls -lh, default is false
|
||||
*/
|
||||
unix?: boolean;
|
||||
/**
|
||||
* Rounding method, can be round, floor, or ceil, default is round
|
||||
*/
|
||||
roundingMethod?: "round" | "floor" | "ceil";
|
||||
}
|
||||
|
||||
interface Filesize {
|
||||
(bytes: number, options?: Options): string;
|
||||
partial: (options: Options) => ((bytes: number) => string);
|
||||
}
|
||||
}
|
179
node_modules/filesize/lib/filesize.es6.js
generated
vendored
Normal file
179
node_modules/filesize/lib/filesize.es6.js
generated
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @copyright 2021 Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
* @license BSD-3-Clause
|
||||
* @version 8.0.0
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.filesize = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
const b = /^(b|B)$/,
|
||||
symbol = {
|
||||
iec: {
|
||||
bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
|
||||
bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
|
||||
},
|
||||
jedec: {
|
||||
bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"],
|
||||
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
||||
}
|
||||
},
|
||||
fullform = {
|
||||
iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
|
||||
jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
|
||||
},
|
||||
roundingFuncs = {
|
||||
floor: Math.floor,
|
||||
ceil: Math.ceil
|
||||
};
|
||||
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @method filesize
|
||||
* @param {Mixed} arg String, Int or Float to transform
|
||||
* @param {Object} descriptor [Optional] Flags
|
||||
* @return {String} Readable file size String
|
||||
*/
|
||||
function filesize (arg, descriptor = {}) {
|
||||
let result = [],
|
||||
val = 0,
|
||||
e, base, bits, ceil, full, fullforms, locale, localeOptions, neg, num, output, pad, round, u, unix, separator, spacer, standard, symbols, roundingFunc, precision;
|
||||
|
||||
if (isNaN(arg)) {
|
||||
throw new TypeError("Invalid number");
|
||||
}
|
||||
|
||||
bits = descriptor.bits === true;
|
||||
unix = descriptor.unix === true;
|
||||
pad = descriptor.pad === true;
|
||||
base = descriptor.base || 10;
|
||||
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
|
||||
locale = descriptor.locale !== void 0 ? descriptor.locale : "";
|
||||
localeOptions = descriptor.localeOptions || {};
|
||||
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
|
||||
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
|
||||
symbols = descriptor.symbols || {};
|
||||
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
|
||||
output = descriptor.output || "string";
|
||||
full = descriptor.fullform === true;
|
||||
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
|
||||
e = descriptor.exponent !== void 0 ? descriptor.exponent : -1;
|
||||
roundingFunc = roundingFuncs[descriptor.roundingMethod] || Math.round;
|
||||
num = Number(arg);
|
||||
neg = num < 0;
|
||||
ceil = base > 2 ? 1000 : 1024;
|
||||
precision = isNaN(descriptor.precision) === false ? parseInt(descriptor.precision, 10) : 0;
|
||||
|
||||
// Flipping a negative number to determine the size
|
||||
if (neg) {
|
||||
num = -num;
|
||||
}
|
||||
|
||||
// Determining the exponent
|
||||
if (e === -1 || isNaN(e)) {
|
||||
e = Math.floor(Math.log(num) / Math.log(ceil));
|
||||
|
||||
if (e < 0) {
|
||||
e = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Exceeding supported length, time to reduce & multiply
|
||||
if (e > 8) {
|
||||
if (precision > 0) {
|
||||
precision += 8 - e;
|
||||
}
|
||||
|
||||
e = 8;
|
||||
}
|
||||
|
||||
if (output === "exponent") {
|
||||
return e;
|
||||
}
|
||||
|
||||
// Zero is now a special case because bytes divide by 1
|
||||
if (num === 0) {
|
||||
result[0] = 0;
|
||||
u = result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e];
|
||||
} else {
|
||||
val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));
|
||||
|
||||
if (bits) {
|
||||
val = val * 8;
|
||||
|
||||
if (val >= ceil && e < 8) {
|
||||
val = val / ceil;
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
const p = Math.pow(10, e > 0 ? round : 0);
|
||||
result[0] = roundingFunc(val * p) / p;
|
||||
|
||||
if (result[0] === ceil && e < 8 && descriptor.exponent === void 0) {
|
||||
result[0] = 1;
|
||||
e++;
|
||||
}
|
||||
|
||||
u = result[1] = base === 10 && e === 1 ? bits ? "kbit" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
|
||||
|
||||
if (unix) {
|
||||
result[1] = result[1].charAt(0);
|
||||
|
||||
if (b.test(result[1])) {
|
||||
result[0] = Math.floor(result[0]);
|
||||
result[1] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decorating a 'diff'
|
||||
if (neg) {
|
||||
result[0] = -result[0];
|
||||
}
|
||||
|
||||
// Setting optional precision
|
||||
if (precision > 0) {
|
||||
result[0] = result[0].toPrecision(precision);
|
||||
}
|
||||
|
||||
// Applying custom symbol
|
||||
result[1] = symbols[result[1]] || result[1];
|
||||
|
||||
if (locale === true) {
|
||||
result[0] = result[0].toLocaleString();
|
||||
} else if (locale.length > 0) {
|
||||
result[0] = result[0].toLocaleString(locale, localeOptions);
|
||||
} else if (separator.length > 0) {
|
||||
result[0] = result[0].toString().replace(".", separator);
|
||||
}
|
||||
|
||||
if (pad && Number.isInteger(result[0]) === false && round > 0) {
|
||||
const x = separator || ".",
|
||||
tmp = result[0].toString().split(x),
|
||||
s = tmp[1] || "",
|
||||
l = s.length,
|
||||
n = round - l;
|
||||
|
||||
result[0] = `${tmp[0]}${x}${s.padEnd(l + n, "0")}`;
|
||||
}
|
||||
|
||||
if (full) {
|
||||
result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s");
|
||||
}
|
||||
|
||||
// Returning Array, Object, or String (default)
|
||||
return output === "array" ? result : output === "object" ? {value: result[0], symbol: result[1], exponent: e, unit: u} : result.join(spacer);
|
||||
}
|
||||
|
||||
// Partial application for functional programming
|
||||
filesize.partial = opt => arg => filesize(arg, opt);
|
||||
|
||||
return filesize;
|
||||
|
||||
})));
|
6
node_modules/filesize/lib/filesize.es6.min.js
generated
vendored
Normal file
6
node_modules/filesize/lib/filesize.es6.min.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
2020 Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
@version 8.0.0
|
||||
*/
|
||||
!function(i,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(i="undefined"!=typeof globalThis?globalThis:i||self).filesize=t()}(this,(function(){"use strict";const i=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},e={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},o={floor:Math.floor,ceil:Math.ceil};function n(n,r={}){let a,b,s,l,c,p,d,f,u,B,h,g,y,M,m,x,v,N,T,j,E,w=[],P=0;if(isNaN(n))throw new TypeError("Invalid number");if(s=!0===r.bits,m=!0===r.unix,g=!0===r.pad,b=r.base||10,y=void 0!==r.round?r.round:m?1:2,d=void 0!==r.locale?r.locale:"",f=r.localeOptions||{},x=void 0!==r.separator?r.separator:"",v=void 0!==r.spacer?r.spacer:m?"":" ",T=r.symbols||{},N=2===b?r.standard||"iec":"jedec",h=r.output||"string",c=!0===r.fullform,p=r.fullforms instanceof Array?r.fullforms:[],a=void 0!==r.exponent?r.exponent:-1,j=o[r.roundingMethod]||Math.round,B=Number(n),u=B<0,l=b>2?1e3:1024,E=!1===isNaN(r.precision)?parseInt(r.precision,10):0,u&&(B=-B),(-1===a||isNaN(a))&&(a=Math.floor(Math.log(B)/Math.log(l)),a<0&&(a=0)),a>8&&(E>0&&(E+=8-a),a=8),"exponent"===h)return a;if(0===B)w[0]=0,M=w[1]=m?"":t[N][s?"bits":"bytes"][a];else{P=B/(2===b?Math.pow(2,10*a):Math.pow(1e3,a)),s&&(P*=8,P>=l&&a<8&&(P/=l,a++));const e=Math.pow(10,a>0?y:0);w[0]=j(P*e)/e,w[0]===l&&a<8&&void 0===r.exponent&&(w[0]=1,a++),M=w[1]=10===b&&1===a?s?"kbit":"kB":t[N][s?"bits":"bytes"][a],m&&(w[1]=w[1].charAt(0),i.test(w[1])&&(w[0]=Math.floor(w[0]),w[1]=""))}if(u&&(w[0]=-w[0]),E>0&&(w[0]=w[0].toPrecision(E)),w[1]=T[w[1]]||w[1],!0===d?w[0]=w[0].toLocaleString():d.length>0?w[0]=w[0].toLocaleString(d,f):x.length>0&&(w[0]=w[0].toString().replace(".",x)),g&&!1===Number.isInteger(w[0])&&y>0){const i=x||".",t=w[0].toString().split(i),e=t[1]||"",o=e.length,n=y-o;w[0]=`${t[0]}${i}${e.padEnd(o+n,"0")}`}return c&&(w[1]=p[a]?p[a]:e[N][a]+(s?"bit":"byte")+(1===w[0]?"":"s")),"array"===h?w:"object"===h?{value:w[0],symbol:w[1],exponent:a,unit:M}:w.join(v)}return n.partial=i=>t=>n(t,i),n}));
|
||||
//# sourceMappingURL=filesize.es6.min.js.map
|
1
node_modules/filesize/lib/filesize.es6.min.js.map
generated
vendored
Normal file
1
node_modules/filesize/lib/filesize.es6.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
171
node_modules/filesize/lib/filesize.esm.js
generated
vendored
Normal file
171
node_modules/filesize/lib/filesize.esm.js
generated
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @copyright 2021 Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
* @license BSD-3-Clause
|
||||
* @version 8.0.0
|
||||
*/
|
||||
const b = /^(b|B)$/,
|
||||
symbol = {
|
||||
iec: {
|
||||
bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
|
||||
bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
|
||||
},
|
||||
jedec: {
|
||||
bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"],
|
||||
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
||||
}
|
||||
},
|
||||
fullform = {
|
||||
iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
|
||||
jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
|
||||
},
|
||||
roundingFuncs = {
|
||||
floor: Math.floor,
|
||||
ceil: Math.ceil
|
||||
};
|
||||
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @method filesize
|
||||
* @param {Mixed} arg String, Int or Float to transform
|
||||
* @param {Object} descriptor [Optional] Flags
|
||||
* @return {String} Readable file size String
|
||||
*/
|
||||
function filesize (arg, descriptor = {}) {
|
||||
let result = [],
|
||||
val = 0,
|
||||
e, base, bits, ceil, full, fullforms, locale, localeOptions, neg, num, output, pad, round, u, unix, separator, spacer, standard, symbols, roundingFunc, precision;
|
||||
|
||||
if (isNaN(arg)) {
|
||||
throw new TypeError("Invalid number");
|
||||
}
|
||||
|
||||
bits = descriptor.bits === true;
|
||||
unix = descriptor.unix === true;
|
||||
pad = descriptor.pad === true;
|
||||
base = descriptor.base || 10;
|
||||
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
|
||||
locale = descriptor.locale !== void 0 ? descriptor.locale : "";
|
||||
localeOptions = descriptor.localeOptions || {};
|
||||
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
|
||||
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
|
||||
symbols = descriptor.symbols || {};
|
||||
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
|
||||
output = descriptor.output || "string";
|
||||
full = descriptor.fullform === true;
|
||||
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
|
||||
e = descriptor.exponent !== void 0 ? descriptor.exponent : -1;
|
||||
roundingFunc = roundingFuncs[descriptor.roundingMethod] || Math.round;
|
||||
num = Number(arg);
|
||||
neg = num < 0;
|
||||
ceil = base > 2 ? 1000 : 1024;
|
||||
precision = isNaN(descriptor.precision) === false ? parseInt(descriptor.precision, 10) : 0;
|
||||
|
||||
// Flipping a negative number to determine the size
|
||||
if (neg) {
|
||||
num = -num;
|
||||
}
|
||||
|
||||
// Determining the exponent
|
||||
if (e === -1 || isNaN(e)) {
|
||||
e = Math.floor(Math.log(num) / Math.log(ceil));
|
||||
|
||||
if (e < 0) {
|
||||
e = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Exceeding supported length, time to reduce & multiply
|
||||
if (e > 8) {
|
||||
if (precision > 0) {
|
||||
precision += 8 - e;
|
||||
}
|
||||
|
||||
e = 8;
|
||||
}
|
||||
|
||||
if (output === "exponent") {
|
||||
return e;
|
||||
}
|
||||
|
||||
// Zero is now a special case because bytes divide by 1
|
||||
if (num === 0) {
|
||||
result[0] = 0;
|
||||
u = result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e];
|
||||
} else {
|
||||
val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));
|
||||
|
||||
if (bits) {
|
||||
val = val * 8;
|
||||
|
||||
if (val >= ceil && e < 8) {
|
||||
val = val / ceil;
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
const p = Math.pow(10, e > 0 ? round : 0);
|
||||
result[0] = roundingFunc(val * p) / p;
|
||||
|
||||
if (result[0] === ceil && e < 8 && descriptor.exponent === void 0) {
|
||||
result[0] = 1;
|
||||
e++;
|
||||
}
|
||||
|
||||
u = result[1] = base === 10 && e === 1 ? bits ? "kbit" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
|
||||
|
||||
if (unix) {
|
||||
result[1] = result[1].charAt(0);
|
||||
|
||||
if (b.test(result[1])) {
|
||||
result[0] = Math.floor(result[0]);
|
||||
result[1] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decorating a 'diff'
|
||||
if (neg) {
|
||||
result[0] = -result[0];
|
||||
}
|
||||
|
||||
// Setting optional precision
|
||||
if (precision > 0) {
|
||||
result[0] = result[0].toPrecision(precision);
|
||||
}
|
||||
|
||||
// Applying custom symbol
|
||||
result[1] = symbols[result[1]] || result[1];
|
||||
|
||||
if (locale === true) {
|
||||
result[0] = result[0].toLocaleString();
|
||||
} else if (locale.length > 0) {
|
||||
result[0] = result[0].toLocaleString(locale, localeOptions);
|
||||
} else if (separator.length > 0) {
|
||||
result[0] = result[0].toString().replace(".", separator);
|
||||
}
|
||||
|
||||
if (pad && Number.isInteger(result[0]) === false && round > 0) {
|
||||
const x = separator || ".",
|
||||
tmp = result[0].toString().split(x),
|
||||
s = tmp[1] || "",
|
||||
l = s.length,
|
||||
n = round - l;
|
||||
|
||||
result[0] = `${tmp[0]}${x}${s.padEnd(l + n, "0")}`;
|
||||
}
|
||||
|
||||
if (full) {
|
||||
result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s");
|
||||
}
|
||||
|
||||
// Returning Array, Object, or String (default)
|
||||
return output === "array" ? result : output === "object" ? {value: result[0], symbol: result[1], exponent: e, unit: u} : result.join(spacer);
|
||||
}
|
||||
|
||||
// Partial application for functional programming
|
||||
filesize.partial = opt => arg => filesize(arg, opt);
|
||||
|
||||
export { filesize as default };
|
6
node_modules/filesize/lib/filesize.esm.min.js
generated
vendored
Normal file
6
node_modules/filesize/lib/filesize.esm.min.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
2020 Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
@version 8.0.0
|
||||
*/
|
||||
const i=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},e={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},o={floor:Math.floor,ceil:Math.ceil};function a(a,r={}){let b,n,s,l,c,p,d,B,u,f,g,h,M,y,m,x,v,N,E,j,w,P=[],T=0;if(isNaN(a))throw new TypeError("Invalid number");if(s=!0===r.bits,m=!0===r.unix,h=!0===r.pad,n=r.base||10,M=void 0!==r.round?r.round:m?1:2,d=void 0!==r.locale?r.locale:"",B=r.localeOptions||{},x=void 0!==r.separator?r.separator:"",v=void 0!==r.spacer?r.spacer:m?"":" ",E=r.symbols||{},N=2===n?r.standard||"iec":"jedec",g=r.output||"string",c=!0===r.fullform,p=r.fullforms instanceof Array?r.fullforms:[],b=void 0!==r.exponent?r.exponent:-1,j=o[r.roundingMethod]||Math.round,f=Number(a),u=f<0,l=n>2?1e3:1024,w=!1===isNaN(r.precision)?parseInt(r.precision,10):0,u&&(f=-f),(-1===b||isNaN(b))&&(b=Math.floor(Math.log(f)/Math.log(l)),b<0&&(b=0)),b>8&&(w>0&&(w+=8-b),b=8),"exponent"===g)return b;if(0===f)P[0]=0,y=P[1]=m?"":t[N][s?"bits":"bytes"][b];else{T=f/(2===n?Math.pow(2,10*b):Math.pow(1e3,b)),s&&(T*=8,T>=l&&b<8&&(T/=l,b++));const e=Math.pow(10,b>0?M:0);P[0]=j(T*e)/e,P[0]===l&&b<8&&void 0===r.exponent&&(P[0]=1,b++),y=P[1]=10===n&&1===b?s?"kbit":"kB":t[N][s?"bits":"bytes"][b],m&&(P[1]=P[1].charAt(0),i.test(P[1])&&(P[0]=Math.floor(P[0]),P[1]=""))}if(u&&(P[0]=-P[0]),w>0&&(P[0]=P[0].toPrecision(w)),P[1]=E[P[1]]||P[1],!0===d?P[0]=P[0].toLocaleString():d.length>0?P[0]=P[0].toLocaleString(d,B):x.length>0&&(P[0]=P[0].toString().replace(".",x)),h&&!1===Number.isInteger(P[0])&&M>0){const i=x||".",t=P[0].toString().split(i),e=t[1]||"",o=e.length,a=M-o;P[0]=`${t[0]}${i}${e.padEnd(o+a,"0")}`}return c&&(P[1]=p[b]?p[b]:e[N][b]+(s?"bit":"byte")+(1===P[0]?"":"s")),"array"===g?P:"object"===g?{value:P[0],symbol:P[1],exponent:b,unit:y}:P.join(v)}a.partial=i=>t=>a(t,i);export{a as default};
|
||||
//# sourceMappingURL=filesize.esm.min.js.map
|
1
node_modules/filesize/lib/filesize.esm.min.js.map
generated
vendored
Normal file
1
node_modules/filesize/lib/filesize.esm.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
207
node_modules/filesize/lib/filesize.js
generated
vendored
Normal file
207
node_modules/filesize/lib/filesize.js
generated
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @copyright 2021 Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
* @license BSD-3-Clause
|
||||
* @version 8.0.0
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.filesize = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
var b = /^(b|B)$/,
|
||||
symbol = {
|
||||
iec: {
|
||||
bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
|
||||
bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
|
||||
},
|
||||
jedec: {
|
||||
bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"],
|
||||
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
||||
}
|
||||
},
|
||||
fullform = {
|
||||
iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
|
||||
jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
|
||||
},
|
||||
roundingFuncs = {
|
||||
floor: Math.floor,
|
||||
ceil: Math.ceil
|
||||
};
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @method filesize
|
||||
* @param {Mixed} arg String, Int or Float to transform
|
||||
* @param {Object} descriptor [Optional] Flags
|
||||
* @return {String} Readable file size String
|
||||
*/
|
||||
|
||||
function filesize(arg) {
|
||||
var descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var result = [],
|
||||
val = 0,
|
||||
e,
|
||||
base,
|
||||
bits,
|
||||
ceil,
|
||||
full,
|
||||
fullforms,
|
||||
locale,
|
||||
localeOptions,
|
||||
neg,
|
||||
num,
|
||||
output,
|
||||
pad,
|
||||
round,
|
||||
u,
|
||||
unix,
|
||||
separator,
|
||||
spacer,
|
||||
standard,
|
||||
symbols,
|
||||
roundingFunc,
|
||||
precision;
|
||||
|
||||
if (isNaN(arg)) {
|
||||
throw new TypeError("Invalid number");
|
||||
}
|
||||
|
||||
bits = descriptor.bits === true;
|
||||
unix = descriptor.unix === true;
|
||||
pad = descriptor.pad === true;
|
||||
base = descriptor.base || 10;
|
||||
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
|
||||
locale = descriptor.locale !== void 0 ? descriptor.locale : "";
|
||||
localeOptions = descriptor.localeOptions || {};
|
||||
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
|
||||
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
|
||||
symbols = descriptor.symbols || {};
|
||||
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
|
||||
output = descriptor.output || "string";
|
||||
full = descriptor.fullform === true;
|
||||
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
|
||||
e = descriptor.exponent !== void 0 ? descriptor.exponent : -1;
|
||||
roundingFunc = roundingFuncs[descriptor.roundingMethod] || Math.round;
|
||||
num = Number(arg);
|
||||
neg = num < 0;
|
||||
ceil = base > 2 ? 1000 : 1024;
|
||||
precision = isNaN(descriptor.precision) === false ? parseInt(descriptor.precision, 10) : 0; // Flipping a negative number to determine the size
|
||||
|
||||
if (neg) {
|
||||
num = -num;
|
||||
} // Determining the exponent
|
||||
|
||||
|
||||
if (e === -1 || isNaN(e)) {
|
||||
e = Math.floor(Math.log(num) / Math.log(ceil));
|
||||
|
||||
if (e < 0) {
|
||||
e = 0;
|
||||
}
|
||||
} // Exceeding supported length, time to reduce & multiply
|
||||
|
||||
|
||||
if (e > 8) {
|
||||
if (precision > 0) {
|
||||
precision += 8 - e;
|
||||
}
|
||||
|
||||
e = 8;
|
||||
}
|
||||
|
||||
if (output === "exponent") {
|
||||
return e;
|
||||
} // Zero is now a special case because bytes divide by 1
|
||||
|
||||
|
||||
if (num === 0) {
|
||||
result[0] = 0;
|
||||
u = result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e];
|
||||
} else {
|
||||
val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));
|
||||
|
||||
if (bits) {
|
||||
val = val * 8;
|
||||
|
||||
if (val >= ceil && e < 8) {
|
||||
val = val / ceil;
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
var p = Math.pow(10, e > 0 ? round : 0);
|
||||
result[0] = roundingFunc(val * p) / p;
|
||||
|
||||
if (result[0] === ceil && e < 8 && descriptor.exponent === void 0) {
|
||||
result[0] = 1;
|
||||
e++;
|
||||
}
|
||||
|
||||
u = result[1] = base === 10 && e === 1 ? bits ? "kbit" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
|
||||
|
||||
if (unix) {
|
||||
result[1] = result[1].charAt(0);
|
||||
|
||||
if (b.test(result[1])) {
|
||||
result[0] = Math.floor(result[0]);
|
||||
result[1] = "";
|
||||
}
|
||||
}
|
||||
} // Decorating a 'diff'
|
||||
|
||||
|
||||
if (neg) {
|
||||
result[0] = -result[0];
|
||||
} // Setting optional precision
|
||||
|
||||
|
||||
if (precision > 0) {
|
||||
result[0] = result[0].toPrecision(precision);
|
||||
} // Applying custom symbol
|
||||
|
||||
|
||||
result[1] = symbols[result[1]] || result[1];
|
||||
|
||||
if (locale === true) {
|
||||
result[0] = result[0].toLocaleString();
|
||||
} else if (locale.length > 0) {
|
||||
result[0] = result[0].toLocaleString(locale, localeOptions);
|
||||
} else if (separator.length > 0) {
|
||||
result[0] = result[0].toString().replace(".", separator);
|
||||
}
|
||||
|
||||
if (pad && Number.isInteger(result[0]) === false && round > 0) {
|
||||
var x = separator || ".",
|
||||
tmp = result[0].toString().split(x),
|
||||
s = tmp[1] || "",
|
||||
l = s.length,
|
||||
n = round - l;
|
||||
result[0] = "".concat(tmp[0]).concat(x).concat(s.padEnd(l + n, "0"));
|
||||
}
|
||||
|
||||
if (full) {
|
||||
result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s");
|
||||
} // Returning Array, Object, or String (default)
|
||||
|
||||
|
||||
return output === "array" ? result : output === "object" ? {
|
||||
value: result[0],
|
||||
symbol: result[1],
|
||||
exponent: e,
|
||||
unit: u
|
||||
} : result.join(spacer);
|
||||
} // Partial application for functional programming
|
||||
|
||||
|
||||
filesize.partial = function (opt) {
|
||||
return function (arg) {
|
||||
return filesize(arg, opt);
|
||||
};
|
||||
};
|
||||
|
||||
return filesize;
|
||||
|
||||
})));
|
6
node_modules/filesize/lib/filesize.min.js
generated
vendored
Normal file
6
node_modules/filesize/lib/filesize.min.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
2020 Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
@version 8.0.0
|
||||
*/
|
||||
!function(i,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(i="undefined"!=typeof globalThis?globalThis:i||self).filesize=t()}(this,(function(){"use strict";var i=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},e={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},o={floor:Math.floor,ceil:Math.ceil};function n(n){var r,a,b,s,l,c,f,d,p,u,h,B,g,y,M,m,v,x,N,T,j,E=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},w=[],P=0;if(isNaN(n))throw new TypeError("Invalid number");if(b=!0===E.bits,M=!0===E.unix,B=!0===E.pad,a=E.base||10,g=void 0!==E.round?E.round:M?1:2,f=void 0!==E.locale?E.locale:"",d=E.localeOptions||{},m=void 0!==E.separator?E.separator:"",v=void 0!==E.spacer?E.spacer:M?"":" ",N=E.symbols||{},x=2===a?E.standard||"iec":"jedec",h=E.output||"string",l=!0===E.fullform,c=E.fullforms instanceof Array?E.fullforms:[],r=void 0!==E.exponent?E.exponent:-1,T=o[E.roundingMethod]||Math.round,p=(u=Number(n))<0,s=a>2?1e3:1024,j=!1===isNaN(E.precision)?parseInt(E.precision,10):0,p&&(u=-u),(-1===r||isNaN(r))&&(r=Math.floor(Math.log(u)/Math.log(s)))<0&&(r=0),r>8&&(j>0&&(j+=8-r),r=8),"exponent"===h)return r;if(0===u)w[0]=0,y=w[1]=M?"":t[x][b?"bits":"bytes"][r];else{P=u/(2===a?Math.pow(2,10*r):Math.pow(1e3,r)),b&&(P*=8)>=s&&r<8&&(P/=s,r++);var k=Math.pow(10,r>0?g:0);w[0]=T(P*k)/k,w[0]===s&&r<8&&void 0===E.exponent&&(w[0]=1,r++),y=w[1]=10===a&&1===r?b?"kbit":"kB":t[x][b?"bits":"bytes"][r],M&&(w[1]=w[1].charAt(0),i.test(w[1])&&(w[0]=Math.floor(w[0]),w[1]=""))}if(p&&(w[0]=-w[0]),j>0&&(w[0]=w[0].toPrecision(j)),w[1]=N[w[1]]||w[1],!0===f?w[0]=w[0].toLocaleString():f.length>0?w[0]=w[0].toLocaleString(f,d):m.length>0&&(w[0]=w[0].toString().replace(".",m)),B&&!1===Number.isInteger(w[0])&&g>0){var G=m||".",K=w[0].toString().split(G),S=K[1]||"",Y=S.length,Z=g-Y;w[0]="".concat(K[0]).concat(G).concat(S.padEnd(Y+Z,"0"))}return l&&(w[1]=c[r]?c[r]:e[x][r]+(b?"bit":"byte")+(1===w[0]?"":"s")),"array"===h?w:"object"===h?{value:w[0],symbol:w[1],exponent:r,unit:y}:w.join(v)}return n.partial=function(i){return function(t){return n(t,i)}},n}));
|
||||
//# sourceMappingURL=filesize.min.js.map
|
1
node_modules/filesize/lib/filesize.min.js.map
generated
vendored
Normal file
1
node_modules/filesize/lib/filesize.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
54
node_modules/filesize/package.json
generated
vendored
Normal file
54
node_modules/filesize/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "filesize",
|
||||
"description": "JavaScript library to generate a human readable String describing the file size",
|
||||
"version": "8.0.0",
|
||||
"homepage": "https://filesizejs.com",
|
||||
"author": "Jason Mulligan <jason.mulligan@avoidwork.com>",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/avoidwork/filesize.js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/avoidwork/filesize.js/issues"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"*.d.ts"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"browser": "lib/filesize.min.js",
|
||||
"main": "lib/filesize.js",
|
||||
"module": "lib/filesize.esm.js",
|
||||
"types": "filesize.d.ts",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"watch": "rollup -c -w",
|
||||
"changelog": "auto-changelog -p",
|
||||
"test": "npm run build && npm run lint && npm run test:unit",
|
||||
"test:unit": "nodeunit test/*.js",
|
||||
"lint": "eslint test/*.js src/*.js",
|
||||
"types": "npx typescript src/filesize.js --declaration --allowJs --emitDeclarationOnly --outDir ./"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.6",
|
||||
"@babel/preset-env": "^7.14.7",
|
||||
"auto-changelog": "^2.3.0",
|
||||
"eslint": "^7.30.0",
|
||||
"nodeunit-x": "^0.14.0",
|
||||
"rollup": "^2.53.1",
|
||||
"rollup-plugin-babel": "^4.4.0",
|
||||
"rollup-plugin-terser": "^7.0.2"
|
||||
},
|
||||
"keywords": [
|
||||
"file",
|
||||
"filesize",
|
||||
"size",
|
||||
"readable",
|
||||
"file system",
|
||||
"bytes",
|
||||
"diff"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user