Sizium Documentation
sizium
is a opensource tool to get the actual size of any local or remote package.
Features
- Gets the full details of the npm package. view more
- Supports URL, paths and strings as inputs
- Supports semantic versioning of packages. Example: @bepp/[email protected]
- Can be used in different ways: JS/TS library, REST API, CLI, executable...
🔑 Installation
bash
npm install sizium
bash
pnpm install sizium
bash
yarn add sizium
bash
bun add sizium
bash
deno add sizium
Usage
Examples of use:
Library
js
/**
* Get size from remote package
*/
import {Sizium} from 'sizium'
const pkg = new Sizium('[email protected]')
const data = await pkg.get()
console.log(data.size)
js
/**
* Get size from local package
*/
import {Sizium} from 'sizium'
const pkg = new Sizium('./package.json')
const data = await pkg.get()
console.log(data.size)
CLI
bash
sizium -i chalk