National Preventative Mechanism

    @shyftnetwork/shyft_truffle-expect

    0.0.5 • Public • Published

    truffle-expect

    Simple module for ensuring expected parameters exist

    install

    $ npm install truffle-expect
    

    Usage

    var expect = require("@shyftnetwork/shyft_truffle-expect");
    
    // The object you're testing
    var options = {
      example: "exists"
      another: 5
    };
    
    expect.options(options, ["example", "another"]); // does nothing
    expect.options(options, ["example", "another", "some_other_key"]); // errors because options["some_other_key"] is undefined

    Install

    npm i @shyftnetwork/shyft_truffle-expect

    DownloadsWeekly Downloads

    4

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    2.04 kB

    Total Files

    4

    Last publish

    Collaborators

    • jayper-shyft
    • shyft-chris
    • shyft-david