Natively Pluggable Module

    ice-npm-utils
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.2 • Public • Published

    ice-npm-utils

    some utils for ice.

    Installation

    npm install ice-npm-utils --save-dev

    Basic Usage

    const { getNpmLatestSemverVersion } = require('ice-npm-utils');

    API

    getNpmRegistry(npmName)

    Default return https://registry.npm.taobao.org

    getUnpkgHost(npmName)

    Default return https://unpkg.com

    getNpmLatestSemverVersion(npmName, baseVersion)

    Return Promise.resolve(version)

    getLatestVersion(npmName)

    Return Promise.resolve(version)

    getVersions(npmName)

    Return Promise.resolve(versions)

    getSatisfiesVersions(npmName, semverRange)

    Return Promise.resolve(versions)

    getNpmInfo(npmName)

    Return Promise.resolve(response.data)

    getNpmClient(npmName)

    Default return npm

    checkAliInternal()

    Return Promise.resolve(isInternal)

    getNpmTarball(name, version)

    Return Promise.resolve(tarball)

    getAndExtractTarball(destDir, tarball, progressFunc: () => {})

    Return Promise.resolve(allFiles: string[])

    Custom

    Custom Npm Registry

    process.env.REGISTRY=https://registry.npmjs.org
    

    Custom Unpkg Host

    process.env.UNPKG=https://unpkg.com
    

    Custom Npm Client

    process.env.NPM_CLIENT=cnpm
    

    Keywords

    none

    Install

    npm i ice-npm-utils

    DownloadsWeekly Downloads

    1,265

    Version

    3.0.2

    License

    MIT

    Unpacked Size

    14.3 kB

    Total Files

    5

    Last publish

    Collaborators

    • alvinhui
    • sobear
    • oraaange
    • rax-publisher