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

1.0.6 • Public • Published

42 Bytes => "answer to life the universe and everything"

Simple NPM package based on the Hitchiker's Guide to the Galaxy

Features

  • Get advice from Marvin
  • Get the answer to life, the universe and everything
  • Get a random HHGTTG quote
  • Get remaining days until Towel Day. Towel Day is an annual celebration on the 25th of May (On that day, fans around the universe carry a towel in honour of Douglas Adams.)
  • Get current improbability level

Installation

Installation using npm

  npm install b42yte

Usage/Examples

Get advice from marvin

import { GetAdvice } from 'b42yte';

GetAdvice('Your name here');

Get the answer to life, the universe and everything

import { TheAnswerToLifeTheUniverseAndEverything } from 'b42yte';

TheAnswerToLifeTheUniverseAndEverything();

Get a random quote from HHGTTG

import { GetQuote } from 'b42yte';

GetQuote();

Get remaining days until Towel Day

import { IsItTowelDay } from 'b42yte';

IsItTowelDay();

Get current improbability level

import { GetImprobabilityLevel } from 'b42yte';

GetImprobabilityLevel(true);
If true is passed the return will be something like: "8^621315:1"
If false is passed the return will be something like: "Current improbability level: 4^710575:1"

CommonJS

var b42yte = require("b42yte");

// Get advice from marvin
b42yte.GetAdvice('Your name here');
// Get the answer to life, the universe and everything 
b42yte.TheAnswerToLifeTheUniverseAndEverything();
// Get a random quote from HHGTTG
b42yte.GetQuote();
// Get days remaining until Towel Day
b42yte.IsItTowelDay();
// Get current improbability level
b42yte.GetImprobabilityLevel(true);

Contributing

Contributors are welcome

License

ISC License

Package Sidebar

Install

npm i b42yte

Weekly Downloads

8

Version

1.0.6

License

ISC

Unpacked Size

16.7 kB

Total Files

7

Last publish

Collaborators

  • alyn3d