How to use the uniforms/changedKeys function in uniforms

To help you get started, we’ve selected a few uniforms 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 vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with dates', () => {
      expect(changedKeys('a', new Date(20))).toEqual(['a']);
      expect(changedKeys('a', new Date(20), new Date(10))).toEqual(['a']);
      expect(changedKeys('a', new Date(30), new Date(20))).toEqual(['a']);
      expect(changedKeys('a', new Date(40), new Date(30))).toEqual(['a']);
    });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 1, 1)).toEqual([]);
      expect(changedKeys('a', null, null)).toEqual([]);
      expect(changedKeys('a', true, true)).toEqual([]);
      expect(changedKeys('a', 'no', 'no')).toEqual([]);
    });
  });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 1, 2)).toEqual(['a']);
      expect(changedKeys('a', null, true)).toEqual(['a']);
      expect(changedKeys('a', true, null)).toEqual(['a']);
      expect(changedKeys('a', 'no', 'pe')).toEqual(['a']);
    });
  });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with arrays', () => {
      expect(changedKeys('a', [], [])).toEqual([]);
      expect(changedKeys('a', [1], [1])).toEqual([]);
      expect(changedKeys('a', [1, 2], [1, 2])).toEqual([]);
    });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 2)).toEqual(['a']);
      expect(changedKeys('a', 2, 1)).toEqual(['a']);
      expect(changedKeys('a', true, null)).toEqual(['a']);
      expect(changedKeys('a', null, true)).toEqual(['a']);
      expect(changedKeys('a', 'pe', 'no')).toEqual(['a']);
    });
  });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 2)).toEqual(['a']);
      expect(changedKeys('a', 2, 1)).toEqual(['a']);
      expect(changedKeys('a', true, null)).toEqual(['a']);
      expect(changedKeys('a', null, true)).toEqual(['a']);
      expect(changedKeys('a', 'pe', 'no')).toEqual(['a']);
    });
  });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 1, 1)).toEqual([]);
      expect(changedKeys('a', null, null)).toEqual([]);
      expect(changedKeys('a', true, true)).toEqual([]);
      expect(changedKeys('a', 'no', 'no')).toEqual([]);
    });
  });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with dates', () => {
      expect(changedKeys('a', new Date(20))).toEqual(['a']);
      expect(changedKeys('a', new Date(20), new Date(10))).toEqual(['a']);
      expect(changedKeys('a', new Date(30), new Date(20))).toEqual(['a']);
      expect(changedKeys('a', new Date(40), new Date(30))).toEqual(['a']);
    });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 1, 1)).toEqual([]);
      expect(changedKeys('a', null, null)).toEqual([]);
      expect(changedKeys('a', true, true)).toEqual([]);
      expect(changedKeys('a', 'no', 'no')).toEqual([]);
    });
  });
github vazco / uniforms / packages / uniforms / __tests__ / changedKeys.ts View on Github external
it('works with primitives', () => {
      expect(changedKeys('a', 1, 1)).toEqual([]);
      expect(changedKeys('a', null, null)).toEqual([]);
      expect(changedKeys('a', true, true)).toEqual([]);
      expect(changedKeys('a', 'no', 'no')).toEqual([]);
    });
  });