Skip to content

💊 Kudy.js a simple library to generate inspirational phrases.

License

Notifications You must be signed in to change notification settings

wootsbot/kudy.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kudy.js

Kudy.js is a simple library to generate inspirational phrases.

Where each action returns a random object selected from a list:

{
  phrase: "La innovación distingue a los líderes de los seguidores.",
  author: "Steve Jobs",
  tags: ["negocio", "tecnología"],
  source: ""
}

currently only supports phrases in Spanish but works to support more languages.

How

Install the package in your project directory with:

// with yarn
yarn add kudyjs

// with npm
npm install --save kudyjs

// or
npm add kudyjs

General Usage

import Kudy from "kudyjs";

Kudy.make();

// returns something like
{
  phrase: "Sólo hay una forma de comenzar a construir tu sueño: dejando de hablar y comenzando a hacer.",
  author: "Walt Disney",
  tags: ["negocio", "tecnología"],
  source: ""
}

Or

const Kudy = require("kudyjs");

Kudy.make();

// returns something like
{
  phrase: "Sólo hay una forma de comenzar a construir tu sueño: dejando de hablar y comenzando a hacer.",
  author: "Walt Disney",
  tags: ["negocio", "tecnología"],
  source: ""
}

Here are all of the options, described in detail below.

const Kudy = require("kudyjs");

Kudy.configure({
  // the list of phrases to use. kudy provides its own if you don't have one!
  phrases: [],

  // The length of the random number. kudy for default use the result of phrases.length!
  numberRandom: 4
});

Kudy.make();

License

This project is licensed under the MIT license, Copyright (c) 2019 Jorge Luis Calleja Alvarado. For more information see project license.