Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libnested

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libnested - npm Package Compare versions

Comparing version 1.2.3 to 1.3.1

11

index.js

@@ -43,3 +43,3 @@ function isObject (o) {

function map (obj, iter, out) {
var out = out || {}
var out = out || Array.isArray(obj) ? [] : {}
each(obj, function (val, path) {

@@ -59,2 +59,8 @@ set(out, path, iter(val, path))

function id (e) { return e }
function clone (obj) {
return map(obj, id)
}
exports.get = get

@@ -65,3 +71,2 @@ exports.set = set

exports.paths = paths
exports.clone = clone
{
"name": "libnested",
"description": "",
"version": "1.2.3",
"version": "1.3.1",
"homepage": "https://github.com/dominictarr/libnested",

@@ -6,0 +6,0 @@ "repository": {

@@ -28,10 +28,17 @@ # libnested

`path` may be an array of strings or numbers, or a single string or number.
### set(object, path, value)
set `value` at location `path` within `object`.
If path is deeper than object goes, intermediate `{}`'s are added.
If path is deeper than object goes, intermediate `{}`'s are added.
`path` may be an array of strings or numbers, or a single string or number.
### clone (object)
return a new object with the same structure and primitive values as `object`
## License
MIT

@@ -88,2 +88,13 @@

t.deepEqual(
deep,
R.clone(deep)
)
t.notEqual(
deep,
R.clone(deep)
)
t.end()

@@ -94,1 +105,3 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc