Skip to content

Generate a random story title! Library available in Node or in a browser.

License

Notifications You must be signed in to change notification settings

shamblesides/coolstory.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

Try coolstory.js on RunKit

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);