How to use the ow.symbol function in ow

To help you get started, we’ve selected a few ow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jsdoc / jsdoc / packages / jsdoc-core / lib / bus.js View on Github external
constructor(id, opts = {}) {
        super();

        ow(id, ow.any(ow.string, ow.symbol));

        if (hasOwnProp.call(cache, id) && !opts.ignoreCache) {
            return cache[id];
        }

        this._id = id;

        if (!opts.ignoreCache) {
            cache[id] = this;
        }
    }
}

ow

Function argument validation for humans

MIT
Latest version published 22 days ago

Package Health Score

80 / 100
Full package analysis