# prink

> Human Readable pretty convertions (stringify, parse, compare) for filesize, file mode...

Latest version **0.0.2** (published 2015-01-26) · 0 weekly downloads

## Install

```sh
npm install prink
pnpm add prink
yarn add prink
bun add prink
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-01-26 |
| First published | 2015-01-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | david |
| Keywords | csv, pretty, prettify, beautify, format |

## Links

- npm: https://www.npmjs.com/package/prink
- Repository: http://www.github.com/adaltas/node-prink
- npm.io page: https://npm.io/package/prink

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-01-26
- 0.0.1 — 2015-01-22

## README

[![Build Status](https://secure.travis-ci.org/adaltas/node-prink.png)](http://travis-ci.org/adaltas/node-prink)

Prink is a Node.js used to format filesize and file mode. Other convertions will
be made available on demand such as file permissions and dates.

## Usage

Install Prink with NPM: `npm install prink` and requires it inside your scripts:

```
prink = require 'prink'
```

All the convertions supported by Prink can format, parse and compare values.

## File Size

Additionnal properties may be chained such as "bit" and any unit from "kilobytes"
to "yottabytes", from "kilobits" to "yottabits", "KB" to "YB", "Kb" to "Yb".

To format a number, you may call directly `filesize` or `filesize.format`.

```
prink.filesize(12382232) === '11 MB'
prink.filesize.bit(12382232) === '94 Mb'
prink.filesize.to.kilobytes(12382232, 2) === '12092.02 KB'
prink.filesize.from.KB.to.MB(12832, 2) === '12.53 MB'
prink.filesize.to.Mb(12382232, 2) === '94.47 Mb'
```

To parse a string into a number, you may call `filesize.parse`.

```
prink.filesize.parse('120 KB') === 123820
prink.filesize.parse.to.megabytes('120 KB') === 0.1171875
prink.filesize.parse.bit('120 KB') === 990560
```

To compare a string or a number, you may call `filesize.compare`.

```
prink.filesize.compare('120 KB', 123820) === true
```

## Mode

```
prink.mode(420) === '644'
prink.mode(1023) === '1777'
prink.mode.parse('1777') === 1023
prink.mode.compare('0644', 420) === true
```

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