Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matthewmueller/increment

increment strings. good for keeping slugs unique.
https://github.com/matthewmueller/increment

Last synced: about 1 month ago
JSON representation

increment strings. good for keeping slugs unique.

Awesome Lists containing this project

README

        

# increment

increment strings

## Example

```js
increment('user', '-') // user-1
increment('user-1', '-') // user-2
increment('user-999', '-') // user-1000
```

## Installation

$ npm install increment

or in the browser...

$ component install matthewmueller/increment

## API

### increment(str, [ prefix ])

Increment `str` by 1. Give an optional `prefix`.

## License

MIT