1.0.0 • Published 3 months ago

validate-pizza v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

validate-pizza

validate-pizza is a JavaScript library for validating if an object is a valid pizza.

notes mainly for thomas

the CLI component was a little sketchy for me, I got it working but only locally and not using ts-node. it worked when i ran npm run build to transpile it to js and then ran node on the transpiled js file. for some reason, i couldn't get ts-node to work locally, and i had issues with running the globally installed package.

Installation

Use the package manager npm to install validate-pizza.

npm install validate-pizza

Usage

import { validatePizza } from '<validate-pizza>';

const result = validatePizza({ hehehehaw: true });

if (result.isPizza) console.log(result.pizza.crust);
else console.log(result.errors);

License

ISC

1.0.0

3 months ago