How to use object - 10 common examples

To help you get started, we’ve selected a few object 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 jozsi / mystash / src / backend / __tests__ / user.model.js View on Github external
const expectError = async (key, value) => {
    const testData = omit(DATA, key);
    if (value !== undefined) {
      testData[key] = value;
    }
    const user = new User(testData);
    expect.assertions(1);
    try {
      await user.validate();
    } catch (err) {
      expect(err.errors[key]).toBeDefined();
    }
  };
github jozsi / mystash / src / backend / __tests__ / user.model.js View on Github external
const expectError = async (key, value) => {
    const testData = omit(DATA, key);
    if (value !== undefined) {
      testData[key] = value;
    }
    const user = new User(testData);
    expect.assertions(1);
    try {
      await user.validate();
    } catch (err) {
      expect(err.errors[key]).toBeDefined();
    }
  };
github jozsi / mystash / src / backend / __tests__ / transaction.model.js View on Github external
const expectError = async (key, value) => {
    const testData = omit(DATA, key);
    if (value !== undefined) {
      testData[key] = value;
    }
    const transaction = new Transaction(testData);
    expect.assertions(1);
    try {
      await transaction.validate();
    } catch (err) {
      expect(err.errors[key]).toBeDefined();
    }
  };
github jozsi / mystash / src / backend / __tests__ / transaction.model.js View on Github external
const expectError = async (key, value) => {
    const testData = omit(DATA, key);
    if (value !== undefined) {
      testData[key] = value;
    }
    const transaction = new Transaction(testData);
    expect.assertions(1);
    try {
      await transaction.validate();
    } catch (err) {
      expect(err.errors[key]).toBeDefined();
    }
  };
github inspect-js / is-equal / test / native.js View on Github external
var genericIterator = function (obj) {
	var entries = objectEntries(obj);
	return function iterator() {
		return {
			next: function () {
				return {
					done: entries.length === 0,
					value: entries.shift()
				};
			}
		};
	};
};
github inspect-js / is-equal / test / native.js View on Github external
var genericIterator = function (obj) {
	var entries = objectEntries(obj);
	return function iterator() {
		return {
			next: function () {
				return {
					done: entries.length === 0,
					value: entries.shift()
				};
			}
		};
	};
};
github inspect-js / is-equal / test / why.js View on Github external
var genericIterator = function (obj) {
	var entries = objectEntries(obj);
	return function iterator() {
		return {
			next: function () {
				return {
					done: entries.length === 0,
					value: entries.shift()
				};
			}
		};
	};
};
github amazeui / amazeui-react / src / Breadcrumb.js View on Github external
render: function() {
    var classes = this.getClassSet();
    var Component = this.props.component;
    var restProps = omit(this.props, Object.keys(this.constructor.propTypes));

    classes[this.prefixClass('slash')] = this.props.slash;

    return (
      
        {this.props.children}
      
    );
  }
});
github amazeui / amazeui-react / src / ButtonCheck.js View on Github external
render: function() {
    var restProps = omit(this.props, Object.keys(this.constructor.propTypes));

    return (
      
        {this.props.children}
      
    );
  }
});
github amazeui / amazeui-react / src / Container.js View on Github external
render: function() {
    var Component = this.props.component;
    var classSet = this.getClassSet();
    var restProps = omit(this.props, Object.keys(this.constructor.propTypes));

    return (
      
        {this.props.children}
      
    );
  }
});

object

JavaScript object utilities library

Unknown
Latest version published 12 years ago

Package Health Score

39 / 100
Full package analysis