object-has-values

1.0.0 • Public • Published

object-has-values

Check if object has values at given dot-notation paths.

Usage

var assert = require('assert');
var hasValues = require('object-has-values');

assert.equal(true, hasValues({
    'aggregate.*.type': 'Project',
    'aggregate.*.where.companyId': '*'
}, {
  aggregate: [
    {
      type: 'Project',
      where: { companyId: 123 }
    },
    {
      type: 'Company',
      where: { _id: 123 }
    }
  ]
}));

Readme

Keywords

none

Package Sidebar

Install

npm i object-has-values

Weekly Downloads

3

Version

1.0.0

License

ISC

Last publish

Collaborators

  • alexmingoia