@kth/furano-npm

1.0.12 • Public • Published

furano-npm Continous Integration

An npm package for usage with a json validation service. In KTHs case that's a project called furano.

How to use

  • Add furano-npm to your package.json

  • Call using:

const furano-npm = require('furano-npm')

furano-npm.validate('app/schema', {'my': 'data'})
    .then(result => console.log(`Validation was: ${result.valid} with optional error ${result.error}`))
    .catch(err => console.log(`Caught error: ${err}`));

  When a bad schema path is passed, an error should be returned.

    ✔ An error message was found in the return object.

  When a json is unvalid, mark as unvalid and add an error message.

    ✔ Marked as invalid.
    ✔ An error message was found in the return object.

  When a json is valid, mark as valid and set error message to 'null'

    ✔ Marked as valid
    ✔ No error message is added.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.12
    1
    • latest

Version History

Package Sidebar

Install

npm i @kth/furano-npm

Weekly Downloads

1

Version

1.0.12

License

MIT

Unpacked Size

5.28 kB

Total Files

4

Last publish

Collaborators

  • kth-stratus
  • mictsi
  • n_sandstrom
  • kthwebmaster
  • exacs
  • ssundkvist
  • kth-ci
  • emilstenberg