Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

maxmin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmin - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

4

index.js

@@ -13,6 +13,2 @@ 'use strict';

module.exports = function (max, min, useGzip) {
if (max == null || min == null) {
throw new Error('`max` and `min` required');
}
var ret = format(typeof max === 'number' ? max : max.length) + arrow + format(typeof min === 'number' ? min : min.length);

@@ -19,0 +15,0 @@

15

package.json
{
"name": "maxmin",
"version": "1.1.0",
"version": "2.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)",

@@ -10,9 +10,9 @@ "license": "MIT",

"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
"url": "sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
"node": ">=0.12"
},
"scripts": {
"test": "node test.js"
"test": "xo && ava"
},

@@ -37,8 +37,9 @@ "files": [

"figures": "^1.0.1",
"gzip-size": "^1.0.0",
"pretty-bytes": "^1.0.0"
"gzip-size": "^3.0.0",
"pretty-bytes": "^2.0.1"
},
"devDependencies": {
"ava": "0.0.4"
"ava": "*",
"xo": "*"
}
}

@@ -12,3 +12,3 @@ # maxmin [![Build Status](https://travis-ci.org/sindresorhus/maxmin.svg?branch=master)](https://travis-ci.org/sindresorhus/maxmin)

```sh
```
$ npm install --save maxmin

@@ -21,10 +21,10 @@ ```

```js
var maxmin = require('maxmin');
const maxmin = require('maxmin');
var max = 'function smoothRangeRandom(min,max){var num=Math.floor(Math.random()*(max-min+1)+min);return this.prev=num===this.prev?++num:num};';
const max = 'function smoothRangeRandom(min,max){var num=Math.floor(Math.random()*(max-min+1)+min);return this.prev=num===this.prev?++num:num};';
var min = '(function(b,c){var a=Math.floor(Math.random()*(c-b+1)+b);return this.a=a===this.a?++a:a})()';
const min = '(function(b,c){var a=Math.floor(Math.random()*(c-b+1)+b);return this.a=a===this.a?++a:a})()';
console.log(maxmin(max, min, true));
//=> 130 B → 91 B → 53 B (gzip)
//=> '130 B → 91 B → 53 B (gzip)'
```

@@ -34,7 +34,6 @@

### maxmin(max, min, useGzip)
### maxmin(max, min, [useGzip])
#### max
*Required*
Type: `string`, `buffer`, `number`

@@ -46,3 +45,2 @@

*Required*
Type: `string`, `buffer`, `number`

@@ -49,0 +47,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc