summaryrefslogtreecommitdiff
path: root/node_modules/pretty-bytes
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/pretty-bytes')
-rwxr-xr-xnode_modules/pretty-bytes/cli.js32
-rw-r--r--node_modules/pretty-bytes/license21
-rw-r--r--node_modules/pretty-bytes/package.json49
-rw-r--r--node_modules/pretty-bytes/pretty-bytes.js46
-rw-r--r--node_modules/pretty-bytes/readme.md60
5 files changed, 0 insertions, 208 deletions
diff --git a/node_modules/pretty-bytes/cli.js b/node_modules/pretty-bytes/cli.js
deleted file mode 100755
index 7ad15cd..0000000
--- a/node_modules/pretty-bytes/cli.js
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-var getStdin = require('get-stdin');
-var meow = require('meow');
-var prettyBytes = require('./pretty-bytes');
-
-var cli = meow({
- help: [
- 'Usage',
- ' $ pretty-bytes <number>',
- ' $ echo <number> | pretty-bytes',
- '',
- 'Example',
- ' $ pretty-bytes 1337',
- ' 1.34 kB'
- ].join('\n')
-});
-
-function init(data) {
- console.log(prettyBytes(Number(data)));
-}
-
-if (process.stdin.isTTY) {
- if (!cli.input[0]) {
- console.error('Number required');
- process.exit(1);
- }
-
- init(cli.input[0]);
-} else {
- getStdin(init);
-}
diff --git a/node_modules/pretty-bytes/license b/node_modules/pretty-bytes/license
deleted file mode 100644
index 654d0bf..0000000
--- a/node_modules/pretty-bytes/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
diff --git a/node_modules/pretty-bytes/package.json b/node_modules/pretty-bytes/package.json
deleted file mode 100644
index a75958d..0000000
--- a/node_modules/pretty-bytes/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "name": "pretty-bytes",
- "version": "1.0.4",
- "description": "Convert bytes to a human readable string: 1337 → 1.34 kB",
- "license": "MIT",
- "repository": "sindresorhus/pretty-bytes",
- "main": "pretty-bytes.js",
- "bin": {
- "pretty-bytes": "cli.js"
- },
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "files": [
- "pretty-bytes.js",
- "cli.js"
- ],
- "keywords": [
- "cli",
- "bin",
- "browser",
- "pretty",
- "bytes",
- "byte",
- "filesize",
- "size",
- "file",
- "human",
- "humanized",
- "readable",
- "si",
- "data"
- ],
- "dependencies": {
- "get-stdin": "^4.0.1",
- "meow": "^3.1.0"
- },
- "devDependencies": {
- "mocha": "*"
- }
-}
diff --git a/node_modules/pretty-bytes/pretty-bytes.js b/node_modules/pretty-bytes/pretty-bytes.js
deleted file mode 100644
index 626c18a..0000000
--- a/node_modules/pretty-bytes/pretty-bytes.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*!
- pretty-bytes
- Convert bytes to a human readable string: 1337 → 1.34 kB
- https://github.com/sindresorhus/pretty-bytes
- by Sindre Sorhus
- MIT License
-*/
-(function () {
- 'use strict';
-
- // Number.isNaN() polyfill
- var isNaN = function (val) {
- return val !== val;
- };
-
- var prettyBytes = function (num) {
- if (typeof num !== 'number' || isNaN(num)) {
- throw new TypeError('Expected a number');
- }
-
- var exponent;
- var unit;
- var neg = num < 0;
- var units = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
-
- if (neg) {
- num = -num;
- }
-
- if (num < 1) {
- return (neg ? '-' : '') + num + ' B';
- }
-
- exponent = Math.min(Math.floor(Math.log(num) / Math.log(1000)), units.length - 1);
- num = (num / Math.pow(1000, exponent)).toFixed(2) * 1;
- unit = units[exponent];
-
- return (neg ? '-' : '') + num + ' ' + unit;
- };
-
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = prettyBytes;
- } else {
- self.prettyBytes = prettyBytes;
- }
-})();
diff --git a/node_modules/pretty-bytes/readme.md b/node_modules/pretty-bytes/readme.md
deleted file mode 100644
index bb94861..0000000
--- a/node_modules/pretty-bytes/readme.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# pretty-bytes [![Build Status](https://travis-ci.org/sindresorhus/pretty-bytes.svg?branch=master)](https://travis-ci.org/sindresorhus/pretty-bytes)
-
-> Convert bytes to a human readable string: `1337` → `1.34 kB`
-
-Useful for displaying file sizes for humans.
-
--
-
-*Note that it uses base-10 (eg. kilobyte).
-[Read about the difference between kilobyte and kibibyte.](http://pacoup.com/2009/05/26/kb-kb-kib-whats-up-with-that/)*
-
-
-## Install
-
-```
-$ npm install --save pretty-bytes
-```
-
-```
-$ bower install --save pretty-bytes
-```
-
-```
-$ component install sindresorhus/pretty-bytes
-```
-
-
-## Usage
-
-```js
-prettyBytes(1337);
-//=> '1.34 kB'
-
-prettyBytes(100);
-//=> '100 B'
-```
-
-
-## CLI
-
-```
-$ npm install --global pretty-bytes
-```
-
-```
-$ pretty-bytes --help
-
- Usage
- $ pretty-bytes <number>
- $ echo <number> | pretty-bytes
-
- Example
- $ pretty-bytes 1337
- 1.34 kB
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)