Comparing version 0.1.1 to 0.1.2
@@ -173,3 +173,3 @@ // | ||
var key = path.shift(); | ||
var key = "" + path.shift(); | ||
@@ -192,2 +192,4 @@ if (typeof object !== "object" || object === null || key === "__proto__") { | ||
} | ||
return true; | ||
}); | ||
@@ -194,0 +196,0 @@ |
{ | ||
"name": "dotty", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Access properties of nested objects using dot-path notation", | ||
@@ -24,5 +24,5 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"vows": "^0.8.0", | ||
"docco": "^0.8.0" | ||
"vows": "^0.8.3", | ||
"docco": "^0.8.1" | ||
} | ||
} |
@@ -1,8 +0,6 @@ | ||
Dotty [![build status](https://secure.travis-ci.org/deoxxa/dotty.png)](http://travis-ci.org/deoxxa/dotty) [![npm](https://img.shields.io/npm/v/dotty.svg)](https://www.npmjs.com/package/dotty) | ||
===== | ||
# Dotty ![Build and Test](https://github.com/deoxxa/dotty/workflows/Build%20and%20Test/badge.svg) [![npm](https://img.shields.io/npm/v/dotty.svg)](https://www.npmjs.com/package/dotty) | ||
Access properties of nested objects using dot-path notation. | ||
Overview | ||
-------- | ||
## Overview | ||
@@ -12,14 +10,10 @@ Dotty makes it easy to programmatically access arbitrarily nested objects and | ||
## Installation | ||
Installation | ||
------------ | ||
Here's a link to the [npm](https://npmjs.org/package/dotty) page. | ||
npm install dotty | ||
npm install dotty | ||
## Usage | ||
Usage | ||
----- | ||
Also see the [documentation](http://deoxxa.github.com/dotty/docs/) and | ||
@@ -60,5 +54,7 @@ [example](example.js). | ||
console.log(dotty.search(object, ["a", "*", /..+/])); | ||
console.log(dotty.search(object, 'a.b.*', function(value, parent, key){ | ||
parent[key] = value + '!'; | ||
})); | ||
console.log( | ||
dotty.search(object, "a.b.*", function (value, parent, key) { | ||
parent[key] = value + "!"; | ||
}) | ||
); | ||
@@ -68,7 +64,7 @@ console.log(dotty.remove(object, "a.b.x")); | ||
console.log(dotty.removeSearch(object, 'a.*.x')); | ||
console.log(dotty.removeSearch(object, "a.*.x")); | ||
console.log(dotty.deepKeys(object)); | ||
console.log(dotty.deepKeys(object, {leavesOnly: true})); | ||
console.log(dotty.deepKeys(object, {leavesOnly: true, asStrings: true})); | ||
console.log(dotty.deepKeys(object, { leavesOnly: true })); | ||
console.log(dotty.deepKeys(object, { leavesOnly: true, asStrings: true })); | ||
@@ -78,12 +74,10 @@ console.log(object); | ||
License | ||
------- | ||
## License | ||
3-clause BSD. A copy is included with the source. | ||
Contact | ||
------- | ||
## Contact | ||
* GitHub ([http://github.com/deoxxa](deoxxa)) | ||
* Twitter ([http://twitter.com/deoxxa](@deoxxa)) | ||
* Email ([mailto:deoxxa@fknsrs.biz](deoxxa@fknsrs.biz)) | ||
- GitHub ([http://github.com/deoxxa](deoxxa)) | ||
- Twitter ([http://twitter.com/deoxxa](@deoxxa)) | ||
- Email ([mailto:deoxxa@fknsrs.biz](deoxxa@fknsrs.biz)) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11527
5
234
0
80