Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-pad-index
PadLeft with zero for index.
https://github.com/afeiship/next-pad-index
index next pad pad-left zero
Last synced: about 1 month ago
JSON representation
PadLeft with zero for index.
- Host: GitHub
- URL: https://github.com/afeiship/next-pad-index
- Owner: afeiship
- License: mit
- Created: 2020-07-10T05:10:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T05:57:32.000Z (about 4 years ago)
- Last Synced: 2024-10-30T08:52:10.622Z (3 months ago)
- Topics: index, next, pad, pad-left, zero
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-pad-index
> PadLeft with zero for index.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-pad-index
```## options
> { char: '0', step: 0, size: 2 }| api | type | default |
| ---- | ------ | ------- |
| char | string | '0' |
| step | number | 0 |
| size | number | 2 |## usage
```js
import '@jswork/next-pad-index';// default options:
nx.padIndex(2); // 002
nx.padIndex(100); // 100// with options:
nx.padIndex(100, { step: 1}) //101
```## license
Code released under [the MIT license](https://github.com/afeiship/next-pad-index/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-pad-index
[version-url]: https://npmjs.org/package/@jswork/next-pad-index[license-image]: https://img.shields.io/npm/l/@jswork/next-pad-index
[license-url]: https://github.com/afeiship/next-pad-index/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-pad-index
[size-url]: https://github.com/afeiship/next-pad-index/blob/master/dist/next-pad-index.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-pad-index
[download-url]: https://www.npmjs.com/package/@jswork/next-pad-index