lipsum.coffee

Lorem Ipsum Wrapper

Main entry point for the node-lipsum module. Provides wrappers for the Parser and Service classes as well as an easy method to get text from the lipsum.com service.

Classes

Instance Methods

constructor()

Class Constructor

getText(callback, opts)

Retrieves dummy text from lipsum.com

callback: {Function} Should take one parameter for the text returned from lipsum.com. Called on successful retrieval of said text.

opts: {Object} Options to pass onto the lipsum.com query. These will be transformed into url query params, so if you pass in something like {start: 'yes', what: 'bytes'} that will become "?start=yes&what=bytes"

parserSuccessCallBack(result)

Called on successful parsing of returned dummy text.

parserErrorCallBack(err)

Called on Parser Error.

serviceCallback(text)

Called when the lipsum.com service succesfully retrieves text from the lipsum.com service.