molonode
v2.0.1
Published
Moloflollo text generator official node.js module
Downloads
3
Readme
#Molonode
Moloflollo text generator official node.js module.
A simple and comfortable way to put sample text on your app's prototypes!
v2.0.1
Usage
This code:
var molonode = require("molonode");
molonode.getWords(5, function(error, res) {
if (error) {
throw error
}
console.log(res)
})
Will output something like this:
[ 'sabola', 'nafozesharfa', 'viojopomi', 'zacaopu', 'madihere' ]
Methods
Molonode has three methods:
getWords(number, [callback])
getSentences(number, [callback])
getParagraphs(number, [callback])
All these three methods return an array with the numbers of words/sentences/paragraphs requested.
That easy!
It has another special method:
getText(string, callback)
The string
parameter can be one of these values:
- html
- json
- plain
Thanks
Give a hug to my pal @eth0 for doing that funny piece of software that moloflollo.com is! :3