Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

spix

1.0.2 • Public • Published
    const spix = require('spix')
    let string = 
    `hello world - I am a function that 
     splits things to a given length`
    
    spix(string, 20,true, function (err, result) {
    if (err) { console.log(err) } else  { console.log(result) }
})

I have added error handling, if you try to split after 200 charecters, but the string is only 100 charecters, it will return an error:

Error: The string can't be shorter in length then the charecter count to split!

I am working on a nicer API! It's not that great at the moment.

Install

npm i spix

DownloadsWeekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • avatar