- Add type definitions for typescript projects. Note that this is the loosest definition possible to allow typescript projects to compile without errors. Also embeds some useful documentation
- Prevent mutation of Object.prototype to address a security issue: https://hackerone.com/reports/788883
- Upgrade dependencies to fix vulnerabilites reported by dependa bot
- Official 2.0.0 release, removing the
-beta1
version - Extract CHANGELOG into a separate file as per #13
- Add array wildcard
+
to access all properties nested within an array. For example:
// sets all `name` property in the array to "<redacted>"
nestedProperty.set(array, "+.name", "<redacted>");
Closes Issue #8. Thanks vemuez for the suggestion!
- Upgrading dev dependencies to fix npm audit issues
- Add support for array wildcards
- Add support for older browsers using babel
- Fix license field in package.json. Thanks zr87 for raising the issue!
- replaced usage of
const
withvar
to maintain support of pre-ES6 JS interpreters. Thanks stefanorie for the contribution!
- Update package-lock and remove yarn.lock to remove security alerts on dependencies
- Update to mocha 6.4.1 to remove security alerts on dependencies
- Breaking Change: When calling
set()
with an integer in the path andnested-property
creates an object at the location, the object is now an array instead of an object. Hopefully, no user of thenested-property
package should have been expecting to see an object instead of an array, but this constitutes a breaking changes, hence the major update in the semver.
Thanks igor-barbosa for the suggestion: PR #2
- Remove unused require('assert'), thanks to Nilz11
- Fix a bug where an invalid path to search an object into is invalid and the isInNestedProperty would throw an error instead of return false
- Add isIn, to tell if an object is on the path to a nested property.
- Add {own: true} option to .has to ensure that a nested property isn't coming from the prototype chain
- Add hasOwn, that calls .has with the {own: true} option
- Add has with tests and documentation