decompress

WebJar for decompress

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

4.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

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

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

https://github.com/kevva/decompress

Скачать decompress

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

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

Зависимости

compile (8)

Идентификатор библиотеки Тип Версия
org.webjars.npm : decompress-tarbz2 jar [4.0.0,5)
org.webjars.npm : graceful-fs jar [4.1.10,5)
org.webjars.npm : pify jar [2.3.0,3)
org.webjars.npm : decompress-tar jar [4.0.0,5)
org.webjars.npm : make-dir jar [1.0.0,2)
org.webjars.npm : strip-dirs jar [2.0.0,3)
org.webjars.npm : decompress-unzip jar [4.0.1,5)
org.webjars.npm » decompress-targz jar [4.0.0,5)

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

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

decompress Build Status

Extracting archives made easy

See decompress-cli for the command-line version.

Install

$ npm install decompress

Usage

const decompress = require('decompress');

decompress('unicorn.zip', 'dist').then(files => {
	console.log('done!');
});

API

decompress(input, [output], [options])

Returns a Promise for an array of files in the following format:

{
	data: Buffer,
	mode: Number,
	mtime: String,
	path: String,
	type: String
}

input

Type: string Buffer

File to decompress.

output

Type: string

Output directory.

options

filter

Type: Function

Filter out files before extracting. E.g:

decompress('unicorn.zip', 'dist', {
	filter: file => path.extname(file.path) !== '.exe'
}).then(files => {
	console.log('done!');
});

Note that in the current implementation, filter is only applied after fully reading all files from the archive in memory. Do not rely on this option to limit the amount of memory used by decompress to the size of the files included by filter. decompress will read the entire compressed file into memory regardless.

map

Type: Function

Map files before extracting: E.g:

decompress('unicorn.zip', 'dist', {
	map: file => {
		file.path = `unicorn-${file.path}`;
		return file;
	}
}).then(files => {
	console.log('done!');
});
plugins

Type: Array
Default: [decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()]

Array of plugins to use.

strip

Type: number
Default: 0

Remove leading directory components from extracted files.

License

MIT © Kevin Mårtensson

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

Версия
4.2.1
2.1.1