How to use the d.e.f function in d

To help you get started, we’ve selected a few d 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 matreshkajs / matreshka / test / spec / calc_spec.js View on Github external
it('allows to cancel delegated dependencies by exactKey=true option', () => {
        const obj = {
            'a.b.c': 1,
            'd.e.f': 2
        };

        calc(obj, 'c', ['a.b.c', 'd.e.f'], (abc, def) => abc + def, {
            debounceCalc: false,
            exactKey: true
        });

        expect(obj.c).toEqual(3);
        obj['a.b.c'] = 3;
        expect(obj.c).toEqual(5);
        obj['d.e.f'] = 3;
        expect(obj.c).toEqual(6);
    });
github defijs / defi / test / spec / calc_spec.js View on Github external
it('allows to cancel delegated dependencies by exactKey=true option', () => {
        const obj = {
            'a.b.c': 1,
            'd.e.f': 2
        };

        calc(obj, 'c', ['a.b.c', 'd.e.f'], (abc, def) => abc + def, {
            debounceCalc: false,
            exactKey: true
        });

        expect(obj.c).toEqual(3);
        obj['a.b.c'] = 3;
        expect(obj.c).toEqual(5);
        obj['d.e.f'] = 3;
        expect(obj.c).toEqual(6);
    });

d

Property descriptor factory

ISC
Latest version published 2 months ago

Package Health Score

72 / 100
Full package analysis