Skip to content

Vaporjawn/snapple-facts

Repository files navigation

Snapple Logo Snapple Facts Snapple Logo

Installation Build Linting Tests Security Scan

GitHub repo forks GitHub repo stars GitHub repo contributorsGitHub org sponsors GitHub repo watchers GitHub repo size

GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) GitHub package.json dependency version (dev dep on branch) 

Usage

Installation

npm install snapple-facts --save-dev

Usage in Typescript

All the methods that you will need are available in this class

import SnappleFacts from 'snapple-facts';

const snappleFacts = new SnappleFacts();

const randomFact: SnappleFact = snappleFacts.randomFact();

console.log(randomFact);

Available Methods

snappleFacts.randomFact(): SnappleFact;
snappleFacts.getFacts(): SnappleFact[];
snappleFacts.listFacts(): string[];
snappleFacts.getFactByNumber(factNumber: number): SnappleFact | undefined;

Functional Usage

import { RandomFact, GetFacts, ListFacts, GetFactByNumber } from 'snapple-facts';

const randomFact: SnappleFact = RandomFact();
const facts: SnappleFact[] = GetFacts();
const factList: string[] = ListFacts();
const factByNumber: SnappleFact | undefined = GetFactByNumber(1);

Technologies

TypeScriptPrettierESLintJestNodeJSNPM

How To Contribute

Click on these badges to see how you might be able to help:

GitHub repo Issues GitHub repo Good Issues for newbies GitHub Help Wanted issuesGitHub repo PRs GitHub repo Merged PRs GitHub Help Wanted PRs

Installation

Installation

npm install

Running

npm start

or

npm run dev

Testing

Tests

npm test

Building

Build

npm run build

Thanks to all Contributors 💪

  • Thank you for considering to contribute
  • Feel free to submit feature requests, UI updates, bugs as issues.
  • Checkout Contribution Guidelines for more information.
  • Have a feature request? Feel free to create a issue for it.

Contributors

Your Support means a lot

Give a ⭐ to show support for the project.