coolstory.js
v0.1.2
Published
Generate a random story title! Works in a browser or in Node
Downloads
3
Maintainers
Readme
coolstory.js
Generate a random story title! Produces masterpieces such as:
- The Breezy Winter
- Between the Worst Souls
- Entrusted by Azure Kings
- The Star Box
- Authority's Worst Bones
- His Skulls
- Old Spider Hand
- The Shade Beans
- How It Is
- Smile
This module was originally built as part of RPNow.net, but is now available for any project to use under the MIT license.
Try it out!
You can try out coolstory.js in your browser at npm.runkit.com/coolstory.js.
Basic Usage
coolstory.js works in Node and in a browser.
Browser
<script src="https://unpkg.com/coolstory.js"></script>
<script>
var amazingTitle = coolstory.title(); // "Doubting"
</script>
Node
After installing it using npm: npm install coolstory.js
const coolstory = require('coolstory.js');
let reallyGoodTitle = coolstory.title(); // "It Was the Bat"
Bower
bower install --save coolstory.js
Include the file coolstory.js
in your project.
API
coolstory.title()
Generate a story title.
coolstory.title();
coolstory.title(maxLength)
Generate a story title whose length is less than or equal to maxLength
characters. (including spaces)
coolstory.title(10);