Ejemplo n.º 1
0
(() => {
    let testName = 'should not modify original object';

    let obj = {
        firstKey: 3,
        secondKey: {
            value: 18
        }
    };

    let iterable = iterableobject(obj);

    if (isiterable(obj)) {
        throw new Error("FAIL: " + testName);
    }

    console.log("PASS: " + testName);
})();
Ejemplo n.º 2
0
(() => {
    let testName = 'should return iterable object';

    let obj = {
        firstKey: 3,
        secondKey: {
            value: 18
        }
    };

    let iterable = iterableobject(obj);

    if (!isiterable(iterable)) {
        throw new Error("FAIL: " + testName);
    }

    console.log("PASS: " + testName);
})();