Skip to content

thanapoom21/enquoraging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
}

About

A simple NPM Package which returns famous quotes from famous authors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published