Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
27
node_modules/filesize/LICENSE
generated
vendored
Normal file
27
node_modules/filesize/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
Copyright (c) 2015, 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 the {organization} 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.
|
56
node_modules/filesize/README.md
generated
vendored
Normal file
56
node_modules/filesize/README.md
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
# filesize.js
|
||||
|
||||
[](http://travis-ci.org/avoidwork/filesize.js) [](https://gitter.im/avoidwork/filesize.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
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 `2`
|
||||
|
||||
### bits
|
||||
_***(boolean)***_ Enables `bit` sizes, default is `false`
|
||||
|
||||
### exponent
|
||||
_***(number)***_ Specifies the SI suffix via exponent, e.g. `2` is `MB` for bytes, default is `-1`
|
||||
|
||||
### output
|
||||
_***(string)***_ Output of function (`array`, `exponent`, `object`, or `string`), default is `string`
|
||||
|
||||
### round
|
||||
_***(number)***_ Decimal place, default is `2`
|
||||
|
||||
### spacer
|
||||
_***(string)***_ Character between the `result` and `suffix`, default is `" "`
|
||||
|
||||
### suffixes
|
||||
_***(object)***_ Dictionary of SI suffixes 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 kb"
|
||||
filesize(265318, {base: 10}); // "265.32 kB"
|
||||
filesize(265318); // "259.1 kB"
|
||||
filesize(265318, {round: 0}); // "259 kB"
|
||||
filesize(265318, {output: "array"}); // [259.1, "kB"]
|
||||
filesize(265318, {output: "object"}); // {value: 259.1, suffix: "kB"}
|
||||
filesize(1, {suffixes: {B: "Б"}}); // "1 Б"
|
||||
filesize(1024); // "1 kB"
|
||||
filesize(1024, {exponent: 0}); // "1024 B"
|
||||
filesize(1024, {output: "exponent"}); // 1
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
## License
|
||||
Copyright (c) 2015 Jason Mulligan
|
||||
Licensed under the BSD-3 license.
|
148
node_modules/filesize/lib/filesize.es6.js
generated
vendored
Normal file
148
node_modules/filesize/lib/filesize.es6.js
generated
vendored
Normal file
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
* filesize
|
||||
*
|
||||
* @author Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
* @copyright 2015 Jason Mulligan
|
||||
* @license BSD-3 <https://raw.github.com/avoidwork/filesize.js/master/LICENSE>
|
||||
* @link http://filesizejs.com
|
||||
* @module filesize
|
||||
* @version 3.1.2
|
||||
*/
|
||||
( global ) => {
|
||||
const bit = /b$/;
|
||||
const si = {
|
||||
bits: [ "B", "kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb" ],
|
||||
bytes: [ "B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" ]
|
||||
};
|
||||
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @method filesize
|
||||
* @param {Mixed} arg String, Int or Float to transform
|
||||
* @param {Object} descriptor [Optional] Flags
|
||||
* @return {String} Readable file size String
|
||||
*/
|
||||
let filesize = ( arg, descriptor={} ) => {
|
||||
let result = [];
|
||||
let skip = false;
|
||||
let val = 0;
|
||||
let e, base, bits, ceil, neg, num, output, round, unix, spacer, suffixes;
|
||||
|
||||
if ( isNaN( arg ) ) {
|
||||
throw new Error( "Invalid arguments" );
|
||||
}
|
||||
|
||||
bits = ( descriptor.bits === true );
|
||||
unix = ( descriptor.unix === true );
|
||||
base = descriptor.base !== undefined ? descriptor.base : 2;
|
||||
round = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2;
|
||||
spacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? "" : " ";
|
||||
suffixes = descriptor.suffixes !== undefined ? descriptor.suffixes : {};
|
||||
output = descriptor.output !== undefined ? descriptor.output : "string";
|
||||
e = descriptor.exponent !== undefined ? descriptor.exponent : -1;
|
||||
num = Number( arg );
|
||||
neg = ( num < 0 );
|
||||
ceil = base > 2 ? 1000 : 1024;
|
||||
|
||||
// Flipping a negative number to determine the size
|
||||
if ( neg ) {
|
||||
num = -num;
|
||||
}
|
||||
|
||||
// Zero is now a special case because bytes divide by 1
|
||||
if ( num === 0 ) {
|
||||
result[ 0 ] = 0;
|
||||
|
||||
if ( unix ) {
|
||||
result[ 1 ] = "";
|
||||
}
|
||||
else {
|
||||
result[ 1 ] = "B";
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Determining the exponent
|
||||
if ( e === -1 || isNaN( e ) ) {
|
||||
e = Math.floor( Math.log( num ) / Math.log( ceil ) );
|
||||
}
|
||||
|
||||
// Exceeding supported length, time to reduce & multiply
|
||||
if ( e > 8 ) {
|
||||
val = val * ( 1000 * ( e - 8 ) );
|
||||
e = 8;
|
||||
}
|
||||
|
||||
if ( base === 2 ) {
|
||||
val = num / Math.pow( 2, ( e * 10 ) );
|
||||
}
|
||||
else {
|
||||
val = num / Math.pow( 1000, e );
|
||||
}
|
||||
|
||||
if ( bits ) {
|
||||
val = ( val * 8 );
|
||||
|
||||
if ( val > ceil ) {
|
||||
val = val / ceil;
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
result[ 0 ] = Number( val.toFixed( e > 0 ? round : 0 ) );
|
||||
result[ 1 ] = si[ bits ? "bits" : "bytes" ][ e ];
|
||||
|
||||
if ( !skip && unix ) {
|
||||
if ( bits && bit.test( result[ 1 ] ) ) {
|
||||
result[ 1 ] = result[ 1 ].toLowerCase();
|
||||
}
|
||||
|
||||
result[ 1 ] = result[ 1 ].charAt( 0 );
|
||||
|
||||
if ( result[ 1 ] === "B" ) {
|
||||
result[ 0 ] = Math.floor( result[ 0 ] );
|
||||
result[ 1 ] = "";
|
||||
}
|
||||
else if ( !bits && result[ 1 ] === "k" ) {
|
||||
result[ 1 ] = "K";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decorating a 'diff'
|
||||
if ( neg ) {
|
||||
result[ 0 ] = -result[ 0 ];
|
||||
}
|
||||
|
||||
// Applying custom suffix
|
||||
result[ 1 ] = suffixes[ result[ 1 ] ] || result[ 1 ];
|
||||
|
||||
// Returning Array, Object, or String (default)
|
||||
if ( output === "array" ) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if ( output === "exponent" ) {
|
||||
return e;
|
||||
}
|
||||
|
||||
if ( output === "object" ) {
|
||||
return { value: result[ 0 ], suffix: result[ 1 ] };
|
||||
}
|
||||
|
||||
return result.join( spacer );
|
||||
}
|
||||
|
||||
// CommonJS, AMD, script tag
|
||||
if ( typeof exports !== "undefined" ) {
|
||||
module.exports = filesize;
|
||||
}
|
||||
else if ( typeof define === "function" ) {
|
||||
define( () => {
|
||||
return filesize;
|
||||
} );
|
||||
}
|
||||
else {
|
||||
global.filesize = filesize;
|
||||
}
|
||||
}( typeof global !== "undefined" ? global : window );
|
156
node_modules/filesize/lib/filesize.js
generated
vendored
Normal file
156
node_modules/filesize/lib/filesize.js
generated
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @author Jason Mulligan <jason.mulligan@avoidwork.com>
|
||||
* @copyright 2015 Jason Mulligan
|
||||
* @license BSD-3 <https://raw.github.com/avoidwork/filesize.js/master/LICENSE>
|
||||
* @link http://filesizejs.com
|
||||
* @module filesize
|
||||
* @version 3.1.2
|
||||
*/
|
||||
(function (global) {
|
||||
var bit = /b$/;
|
||||
var si = {
|
||||
bits: ["B", "kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
|
||||
bytes: ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
||||
};
|
||||
|
||||
/**
|
||||
* filesize
|
||||
*
|
||||
* @method filesize
|
||||
* @param {Mixed} arg String, Int or Float to transform
|
||||
* @param {Object} descriptor [Optional] Flags
|
||||
* @return {String} Readable file size String
|
||||
*/
|
||||
var filesize = function (arg) {
|
||||
var descriptor = arguments[1] === undefined ? {} : arguments[1];
|
||||
|
||||
var result = [];
|
||||
var skip = false;
|
||||
var val = 0;
|
||||
var e = undefined,
|
||||
base = undefined,
|
||||
bits = undefined,
|
||||
ceil = undefined,
|
||||
neg = undefined,
|
||||
num = undefined,
|
||||
output = undefined,
|
||||
round = undefined,
|
||||
unix = undefined,
|
||||
spacer = undefined,
|
||||
suffixes = undefined;
|
||||
|
||||
if (isNaN(arg)) {
|
||||
throw new Error("Invalid arguments");
|
||||
}
|
||||
|
||||
bits = descriptor.bits === true;
|
||||
unix = descriptor.unix === true;
|
||||
base = descriptor.base !== undefined ? descriptor.base : 2;
|
||||
round = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2;
|
||||
spacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? "" : " ";
|
||||
suffixes = descriptor.suffixes !== undefined ? descriptor.suffixes : {};
|
||||
output = descriptor.output !== undefined ? descriptor.output : "string";
|
||||
e = descriptor.exponent !== undefined ? descriptor.exponent : -1;
|
||||
num = Number(arg);
|
||||
neg = num < 0;
|
||||
ceil = base > 2 ? 1000 : 1024;
|
||||
|
||||
// Flipping a negative number to determine the size
|
||||
if (neg) {
|
||||
num = -num;
|
||||
}
|
||||
|
||||
// Zero is now a special case because bytes divide by 1
|
||||
if (num === 0) {
|
||||
result[0] = 0;
|
||||
|
||||
if (unix) {
|
||||
result[1] = "";
|
||||
} else {
|
||||
result[1] = "B";
|
||||
}
|
||||
} else {
|
||||
// Determining the exponent
|
||||
if (e === -1 || isNaN(e)) {
|
||||
e = Math.floor(Math.log(num) / Math.log(ceil));
|
||||
}
|
||||
|
||||
// Exceeding supported length, time to reduce & multiply
|
||||
if (e > 8) {
|
||||
val = val * (1000 * (e - 8));
|
||||
e = 8;
|
||||
}
|
||||
|
||||
if (base === 2) {
|
||||
val = num / Math.pow(2, e * 10);
|
||||
} else {
|
||||
val = num / Math.pow(1000, e);
|
||||
}
|
||||
|
||||
if (bits) {
|
||||
val = val * 8;
|
||||
|
||||
if (val > ceil) {
|
||||
val = val / ceil;
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
result[0] = Number(val.toFixed(e > 0 ? round : 0));
|
||||
result[1] = si[bits ? "bits" : "bytes"][e];
|
||||
|
||||
if (!skip && unix) {
|
||||
if (bits && bit.test(result[1])) {
|
||||
result[1] = result[1].toLowerCase();
|
||||
}
|
||||
|
||||
result[1] = result[1].charAt(0);
|
||||
|
||||
if (result[1] === "B") {
|
||||
result[0] = Math.floor(result[0]);
|
||||
result[1] = "";
|
||||
} else if (!bits && result[1] === "k") {
|
||||
result[1] = "K";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decorating a 'diff'
|
||||
if (neg) {
|
||||
result[0] = -result[0];
|
||||
}
|
||||
|
||||
// Applying custom suffix
|
||||
result[1] = suffixes[result[1]] || result[1];
|
||||
|
||||
// Returning Array, Object, or String (default)
|
||||
if (output === "array") {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (output === "exponent") {
|
||||
return e;
|
||||
}
|
||||
|
||||
if (output === "object") {
|
||||
return { value: result[0], suffix: result[1] };
|
||||
}
|
||||
|
||||
return result.join(spacer);
|
||||
};
|
||||
|
||||
// CommonJS, AMD, script tag
|
||||
if (typeof exports !== "undefined") {
|
||||
module.exports = filesize;
|
||||
} else if (typeof define === "function") {
|
||||
define(function () {
|
||||
return filesize;
|
||||
});
|
||||
} else {
|
||||
global.filesize = filesize;
|
||||
}
|
||||
})(typeof global !== "undefined" ? global : window);
|
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
41
node_modules/filesize/package.json
generated
vendored
Normal file
41
node_modules/filesize/package.json
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "filesize",
|
||||
"description": "JavaScript library to generate a human readable String describing the file size",
|
||||
"version": "3.1.2",
|
||||
"homepage": "http://filesizejs.com",
|
||||
"author": {
|
||||
"name": "Jason Mulligan",
|
||||
"email": "jason.mulligan@avoidwork.com"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/avoidwork/filesize.js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/avoidwork/filesize.js/issues"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "BSD-3",
|
||||
"url": "https://raw.github.com/avoidwork/filesize.js/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "lib/filesize",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-cli": "~0.1.13",
|
||||
"grunt-babel": "^4.0.0",
|
||||
"grunt-sed": "~0.1.1",
|
||||
"grunt-contrib-concat": "~0.5.0",
|
||||
"grunt-contrib-nodeunit": "~0.4.1",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-contrib-uglify": "~0.7.0"
|
||||
},
|
||||
"keywords": ["file", "filesize", "size", "readable", "file system"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue