Comparing version 3.0.0 to 4.0.0
14
index.js
@@ -1,6 +0,6 @@ | ||
'use strict'; | ||
const gzipSize = require('gzip-size'); | ||
const prettyBytes = require('pretty-bytes'); | ||
const chalk = require('chalk'); | ||
const figures = require('figures'); | ||
import gzipSize from 'gzip-size'; | ||
import prettyBytes from 'pretty-bytes'; | ||
import chalk from 'chalk'; | ||
import figures from 'figures'; | ||
const arrow = ' ' + figures.arrowRight + ' '; | ||
@@ -10,3 +10,3 @@ | ||
module.exports = function (max, min, useGzip = false) { | ||
export default function maxmin(max, min, useGzip = false) { | ||
const maxString = format(typeof max === 'number' ? max : max.length); | ||
@@ -21,2 +21,2 @@ const minString = format(typeof min === 'number' ? min : min.length); | ||
return returnValue; | ||
}; | ||
} |
{ | ||
"name": "maxmin", | ||
"version": "3.0.0", | ||
"description": "Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)", | ||
"license": "MIT", | ||
"repository": "sindresorhus/maxmin", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=10" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"string", | ||
"buffer", | ||
"pretty", | ||
"color", | ||
"gzip", | ||
"minified", | ||
"min", | ||
"max", | ||
"diff", | ||
"difference" | ||
], | ||
"dependencies": { | ||
"chalk": "^4.1.0", | ||
"figures": "^3.2.0", | ||
"gzip-size": "^5.1.1", | ||
"pretty-bytes": "^5.3.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^2.4.0", | ||
"strip-ansi": "^6.0.0", | ||
"xo": "^0.32.0" | ||
} | ||
"name": "maxmin", | ||
"version": "4.0.0", | ||
"description": "Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)", | ||
"license": "MIT", | ||
"repository": "sindresorhus/maxmin", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"string", | ||
"buffer", | ||
"pretty", | ||
"color", | ||
"gzip", | ||
"minified", | ||
"min", | ||
"max", | ||
"diff", | ||
"difference" | ||
], | ||
"dependencies": { | ||
"chalk": "^4.1.1", | ||
"figures": "^3.2.0", | ||
"gzip-size": "^6.0.0", | ||
"pretty-bytes": "^5.6.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"strip-ansi": "^7.0.0", | ||
"xo": "^0.39.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# maxmin [![Build Status](https://travis-ci.com/sindresorhus/maxmin.svg?branch=master)](https://travis-ci.com/github/sindresorhus/maxmin) | ||
# maxmin | ||
@@ -7,3 +7,3 @@ > Get a pretty output of the original, minified, gzipped size of a string or buffer | ||
Useful for logging the difference between original and minified file in e.g. a build-system. | ||
Useful for logging the difference between original and minified file in, for example, a build-system. | ||
@@ -13,3 +13,3 @@ ## Install | ||
``` | ||
$ npm install --save maxmin | ||
$ npm install maxmin | ||
``` | ||
@@ -20,3 +20,3 @@ | ||
```js | ||
const maxmin = require('maxmin'); | ||
import maxmin from 'maxmin'; | ||
@@ -23,0 +23,0 @@ const max = 'function smoothRangeRandom(min,max){var num=Math.floor(Math.random()*(max-min+1)+min);return this.prev=num===this.prev?++num:num};'; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
3624
15
+ Addedgzip-size@6.0.0(transitive)
- Removedgzip-size@5.1.1(transitive)
- Removedpify@4.0.1(transitive)
Updatedchalk@^4.1.1
Updatedgzip-size@^6.0.0
Updatedpretty-bytes@^5.6.0