1.4.0 • Published 1 year ago

enquoraging v1.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Enquoraging

PRs Welcome npm

A simple NPM Package which returns motivational quote objects. You can call the function and display it in your website or app.

This repo is publish as an NPM package here.

Getting Started

You can download it from NPM registry as a package. By the following command:

npm install --save enquoraging

Basic Usage

ES module is implemented in this repo for future use. It offers several benefits over CommonJS, including tree shaking, static analysis, and support for asynchronous loading.

Currently, there are 2 methods that you can use to get an object with properties or a string of a random quote.

import getQuote, {
  getRandomQuote,
  getQuoteArrayLength,
  getQuoteByIndex,
} from "enquoraging";

console.log(getQuote());
// returns an object containing `quote` and `author` properties.

console.log(getRandomQuote());
// returns only a random quote without an author.

console.log(getQuoteArrayLength());
// returns the total number of objects.

console.log(getQuoteByIndex(10));
// returns a quote by the given index.

The object returned from methods looks like this.

{
  "quote": "Imagination is more important than knowledge.",
  "author": "Albert Einstein"
}
1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago