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

https://github.com/andregarvin/split-after

Splits a string at a certain number
https://github.com/andregarvin/split-after

Last synced: over 1 year ago
JSON representation

Splits a string at a certain number

Awesome Lists containing this project

README

          

# Split-after: Splits a string at a certain number

## Install: `npm i split-after`

```js
const splitnth = require('split-after')

const str = 'HEY|THERE|BUDDY!';

console.log(splitnth(str, '|', 2)) // [ 'HEY|THERE', 'BUDDY!' ]
```