more-text

1.0.0 • Public • Published

more-text

NPM version Build status

more text for node

Installation

$ npm install more-text

Example

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 cataching
    • result: the response

License

MIT © Leigh Zhu

Package Sidebar

Install

npm i more-text

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lisposter