1.0.0 • Published 9 years ago

object-has-values v1.0.0

Weekly downloads
136
License
ISC
Repository
github
Last release
9 years ago

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 }
    }
  ]
}));