wrapper-numbersapi
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

numbersapi-wrapper

A wrapper library for Numbers API.

Getting Started

A step by step guide that will tell you how to get the use the library.

Installation

$ npm install numbersapi-wrapper

Usage

Initialize and usage the library in your Node.JS project.

$ const numsapi = new NumbersAPI()

$ await nums.getNumberTrivia(123)

Available Methods

  • getNumberTrivia(input) : To fetch trivia for a given number.
    input: 'random' OR any number.
    example: getNumberTrivia(123)

  • getMathTrivia(input) : To fetch mathematical trivia for a given number.
    input: 'random' OR any number.
    example: getNumberTrivia(144)

  • getYearTrivia(input) : To fetch trivia for a given year.
    input: 'random' OR any year.
    example: getNumberTrivia(2022)

  • getDateTrivia(input) : To fetch trivia for a given date.
    input: 'random' OR any string in format 'MM/DD".
    example: getNumberTrivia('12/25')

Future Developments

  • Type Declerations for auto-fill
  • More API options from Numbers API
  • Configurable Caching

Package Sidebar

Install

npm i wrapper-numbersapi

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

16.7 kB

Total Files

18

Last publish

Collaborators

  • hrshshrm