1.1.0 • Published 5 years ago

readable-url v1.1.0

Weekly downloads
71
License
MIT
Repository
github
Last release
5 years ago

readable-url

An NPM package to generate readable random phrases to add to dynamically generated URLs.

GitHub repository

To generate readable URLs like Twitch's clips.

Example: https://clips.twitch.tv/WiseAcceptableSnoodPupper

Get started

To install,

npm install readable-url

Usage Instructions

To use the package, first require it.

const readable = require("readable-url");

Then, we create an object.

// Takes 3 parameters.
// 1. A boolean value - If true, returns string in CamelCase, else lowercase.
// 2. An integer value - The number of words to be generated in the string. (Between 2 and 10).
// 3. A string - The seperator between the words.

var generator = new readable(); // true, 3 and '' are the default values.

// var generator = new readable(false, 5, '-'); // Other options.

To generate a random phrase,

var url = generator.generate();

console.log(url); // Prints out 'ForgetfulHarshEgg'

This can be used to add to the end of a URL.

Example: https://example.com/photos/ForgetfulHarshEgg

For best results, use an integer value of 3, 4, or 5.

1.1.0

5 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago