validate-pizza
v1.0.0
Published
validate-pizza is a JavaScript library for validating if an object is a valid pizza.
Downloads
5
Readme
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);