New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pathos

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pathos - npm Package Compare versions

Comparing version
0.2.1
to
0.2.2
+2
-1
index.js

@@ -80,3 +80,4 @@ module.exports = slice;

} else {
return;
obj[prop] = {};
obj = obj[prop];
}

@@ -83,0 +84,0 @@ }

{
"name": "pathos",
"version": "0.2.1",
"version": "0.2.2",
"description": "Decompose a javascript object into a set of path/value slices.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -125,3 +125,3 @@ var expect = require('expect.js'),

it('should be able to set an objectd field with a path and value',
it('should be able to set an object field with a path and value',
function(done) {

@@ -182,2 +182,19 @@ var o = {

});
it('should handle setting of new properties', function(done) {
var o = {
nothing: 'here'
}
pathos.set(o, [ 'cars', '1', 'make' ], 'Toyoda');
var expected = {
nothing: 'here',
cars: {
'1': {
make: 'Toyoda'
}
}
};
expect(o).to.eql(expected);
done();
});
});