How to use the @sinonjs/samsam.isSet function in @sinonjs/samsam

To help you get started, we’ve selected a few @sinonjs/samsam 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 sinonjs / formatio / lib / formatio.js View on Github external
if (
        typeof object.toString === "function" &&
        object.toString !== Object.prototype.toString
    ) {
        return object.toString();
    }

    var i, l;
    for (i = 0, l = specialObjects.length; i < l; i++) {
        if (object === specialObjects[i].object) {
            return specialObjects[i].value;
        }
    }

    if (samsam.isSet(object)) {
        return ascii.set.call(f, object, internalProcessed);
    }

    if (object instanceof Map) {
        return ascii.map.call(f, object, internalProcessed);
    }

    return ascii.object.call(f, object, internalProcessed, indent);
}

@sinonjs/samsam

Value identification and comparison functions

BSD-3-Clause
Latest version published 1 year ago

Package Health Score

80 / 100
Full package analysis

Similar packages