1.0.0 • Published 11 years ago
more-text v1.0.0
more-text
more text for node
Installation
$ npm install more-textExample
moreText(2, [1, 5], function(err, data) {
console.log(data)
});data may looks like:
{ sentences: [ '什麼?', '天下無敵。' ] }Usage
moreText(n, limit, callback)n: how many sentences you need.limit(array/string/number): limit the words number of each sentence.- if array has two elements, all the sentences' word number will between first element and the second element.
- if there is only one element, it indicate the maxium number of words.
- you can also pass an string or number to assign the limit:
1'1,10''5'
callback(err, result): callback will be passed two arguments:err: error catachingresult: the response
License
MIT © Leigh Zhu