kudyjs

0.3.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i kudyjs

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

14.1 kB

Total Files

7

Last publish

Collaborators

  • wootsbot