maxmin

WebJar for maxmin

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

maxmin
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

maxmin
WebJar for maxmin
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/sindresorhus/maxmin

Скачать maxmin

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/maxmin/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>maxmin</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/maxmin/
implementation 'org.webjars.npm:maxmin:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/maxmin/
implementation ("org.webjars.npm:maxmin:1.1.0")
'org.webjars.npm:maxmin:jar:1.1.0'
<dependency org="org.webjars.npm" name="maxmin" rev="1.1.0">
  <artifact name="maxmin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='maxmin', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "maxmin" % "1.1.0"
[org.webjars.npm/maxmin "1.1.0"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.webjars.npm : chalk jar [1.0.0,2)
org.webjars.npm : figures jar [1.0.1,2)
org.webjars.npm : gzip-size jar [1.0.0,2)
org.webjars.npm : pretty-bytes jar [1.0.0,2)

Модули Проекта

Данный проект не имеет модулей.

maxmin Build Status

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.

Install

$ npm install --save maxmin

Usage

const maxmin = require('maxmin');

const max = 'function smoothRangeRandom(min,max){var num=Math.floor(Math.random()*(max-min+1)+min);return this.prev=num===this.prev?++num:num};';

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)'

API

maxmin(max, min, useGzip?)

max

Type: string | Buffer | number

Original string or its size in bytes.

min

Type: string | Buffer | number

Minified string or its size in bytes.

useGzip

Type: boolean
Default: false

Show gzipped size of min. Pretty slow. Not shown when min is a number.

Версии библиотеки

Версия
1.1.0