New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

coa-archiver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coa-archiver

archiver component for coa

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

coa-archiver

GitHub license npm version npm downloads PRs Welcome

一个简单的压缩库。基于 archiver 做简单封装

特点

根据日常实际项目使用情况:

  • 简化操作和 API 调用,满足绝大多数使用场景
  • 统一了异步表现形式,返回 Promise
  • 内置类型引用,无需额外查看文档,开箱即用,IDE 友好

快速开始

安装

yarn add coa-archiver

使用示例

import { archiver } from 'coa-archiver'

// 将 src1.txt src2.txt 压缩到 dist.zip
await archiver.zip(['src1.txt', 'src2.txt'], 'dist.zip')

// 设置压缩级别为8,压缩级别默认为9,数字越高压缩率越大
await archiver.zip(['*.txt'], 'dist.zip', 8)

// 压缩文件后将源文件删除
await archiver.zip(['*.txt'], 'dist.zip', 8, true)

Keywords

coajs

FAQs

Package last updated on 15 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts