1.0.2 • Published 7 years ago
spix v1.0.2
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.