# @remusao/small

> Smalles files for different MIME types

Latest version **2.1.0** (published 2025-05-16) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install @remusao/small
pnpm add @remusao/small
yarn add @remusao/small
bun add @remusao/small
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2025-05-16 |
| First published | 2020-04-03 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 91.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Rémi Berson <remi@cliqz.com> |
| Maintainers | remusao |

## Links

- npm: https://www.npmjs.com/package/@remusao/small
- Repository: https://github.com/remusao/mono
- Homepage: https://github.com/remusao/mono#readme
- Issues: https://github.com/remusao/mono/issues
- npm.io page: https://npm.io/package/@remusao/small

## Recent versions

- 2.1.0 (latest) — 2025-05-16
- 1.2.1-canary.309.bb92957ae635c786e8798fd12cc9d8a0213d624f.0 (canary) — 2020-11-03
- 2.0.0 — 2025-04-07
- 1.3.0 — 2024-07-11
- 1.2.1 — 2020-11-03
- 1.2.1-canary.307.a8b715240fbe1ea8f6c58b1e778de472a237b6c3.0 — 2020-11-03
- 1.2.1-canary.306.92331cfe30132d83f557c212e90b7870a054712c.0 — 2020-11-02
- 1.2.1-canary.305.9461d0d8204f319a81ae7ecc2b873c3deac2bb3b.0 — 2020-11-02
- 1.2.1-canary.304.00af04df77e6c80e2417971e89e371604f318e4a.0 — 2020-11-01
- 1.2.1-canary.303.d5405a9efbd58804427096689a1e8df212ec2458.0 — 2020-10-30
- 1.2.1-canary.302.28c36e01aed2a0381b38131546b5713389a1d53c.0 — 2020-10-29
- 1.2.1-canary.301.dee75a3ec5e278abf0bec136bf0edda997a4775a.0 — 2020-10-29
- 1.2.1-canary.300.cf6720273d182293ff3e38d696a4127b4d5ef888.0 — 2020-10-28
- 1.2.1-canary.299.b9646709bc95e7c9eb5d634a596746ddcbb42030.0 — 2020-10-27
- 1.2.1-canary.298.bc7d2af540e64727209963e40073199e30ede900.0 — 2020-10-27
- … 98 more at https://npm.io/package/@remusao/small/versions

## README

# `@remusao/small`

> Return smallest valid content of different types

Based on the work from: https://github.com/mathiasbynens/small/

## Usage

```javascript
const { getResourceForMime, getDataUrlForMime } = require('@remusao/small');

console.log(getResourceForMime('mp3'));
// {
//   contentType: 'audio/mpeg;base64',
//   aliases: [ 'audio/mpeg', '.mp3', 'mp3' ],
//   body: '/+MYxAAAAANIAAAAAExBTUUzLjk4LjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
// }

console.log(getDataUrlForMime('mp3'));
// audio/mpeg;base64,/+MYxAAAAANIAAAAAExBTUUzLjk4LjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
```

---
_Source: https://npm.io/package/@remusao/small · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
