# js-int2str

> A library for converting an integer to a customized string, seems like a free hex converter.

Latest version **1.0.1** (published 2020-04-18) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install js-int2str
pnpm add js-int2str
yarn add js-int2str
bun add js-int2str
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-04-18 |
| First published | 2020-04-18 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 36.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dinsio |
| Maintainers | dinsio |

## Links

- npm: https://www.npmjs.com/package/js-int2str
- npm.io page: https://npm.io/package/js-int2str

## Recent versions

- 1.0.1 (latest) — 2020-04-18
- 1.0.0 — 2020-04-18

## README

# JS-Int2Str

### A library for converting an integer to a customized string, seems like a free hex converter.

## **Install**

~~~
npm install js-int2str --save
~~~

or

~~~
yarn add js-int2str
~~~

## **API**

~~~

const { int2str, str2int } = require('js-int2str')

let ticks = new Date().getTime()
let str = int2str(ticks)
console.log(`当前时钟 ${ticks}，转成字符串 ${str}`)
// 13位的数字被压缩为7位字符串
// 字符串前面补0依然等效
str = `0${str}`
console.log(`补0后转回数字是 ${str2int(str)}`)

~~~

## Enjoy it :-)

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