0.1.3 • Published 11 years ago

libroipsum v0.1.3

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

LibroIpsum

LibroIpsum is a simple placeholder text generator similar to other lorem ipsum tools. LibroIpsum differs from traditional lorem ipsum in that it can be used to generate random phrases from any source text, using character distribution analysis to generate new phrases.

View annotated source code

Use LibroIpsum from Node.js, RequireJS, or directly in the browser.

Node.js

npm install libroipsum

RequireJS

define(['path/to/libs/LibroIpsum.js'],
function(LibroIpsum) {
    // ...
});

Browser

<script src="path/to/libs/LibroIpsum.js"></script>

Usage

new LibroIpsum(sourceText).generate(numberOfWords[, keyLength]);
  • sourceText: String representation of text from which phrases are to be generated
  • numberOfWords: Number of words to be generated
  • keyLength: Length of key (integer), where larger number will create phrase more similar to original text (optional, defaults to 6)

License

Copyright (c) 2013 Andrew Duthie

Released under the MIT License (see LICENSE.txt)

0.1.3

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago