Comparing version 2.0.2 to 2.1.0
11
index.js
@@ -151,2 +151,12 @@ "use strict"; | ||
let fromString = function(string) { | ||
string = string || ''; | ||
let lines = string.split('\n') | ||
lines.forEach(function (line) { | ||
options.seed += 1; | ||
println(line); | ||
}); | ||
}; | ||
exports.options = options; | ||
@@ -157,1 +167,2 @@ exports.println = println; | ||
exports.fromFile = fromFile; | ||
exports.fromString = fromString; |
{ | ||
"name": "lolcatjs", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "The rainbow I tastes it", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
![lolcatjs](/assets/banner.png) | ||
> For when you need the lols but don't have the rubies. | ||
> For when you need the lols but don't have the rubies. | ||
@@ -13,2 +13,4 @@ This is a node port of the famous [lolcat](https://github.com/busyloop/lolcat) gem. It implements all the original functionality and behaviour. | ||
## Usage | ||
**Command Line** | ||
```javascript | ||
@@ -36,2 +38,13 @@ lolcatjs [OPTION]... [FILE]... | ||
**NPM Module** | ||
```javascript | ||
const lolcatjs = require('lolcatjs'); | ||
lolcatjs.options.seed = Math.round(Math.random() * 1000); | ||
lolcatjs.options.colors = true; | ||
lolcatjs.fromString('I can has Cheezburger?'); | ||
``` | ||
## Screenshot | ||
@@ -38,0 +51,0 @@ ![lolcatjs](/assets/screenshot.png) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
235
56
68597