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

shvl

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

shvl - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

11

dist/shvl.es.js

@@ -1,11 +0,2 @@

exports.get = function (object, path, def) {
return (object = (path.split ? path.split('.') : path).reduce(function (obj, p) {
return obj && obj[p];
}, object)) === undefined ? def : object;
};
exports.set = function (object, path, val, obj) {
return (path = path.split ? path.split('.') : path).slice(0, -1).reduce(function (obj, p) {
return obj[p] = obj[p] || {};
}, obj = object)[path.pop()] = val, object;
};
exports.get=function(t,e,n){return void 0===(t=(e.split?e.split("."):e).reduce(function(t,e){return t&&t[e]},t))?n:t},exports.set=function(t,e,n,r){return(e=e.split?e.split("."):e).slice(0,-1).reduce(function(t,e){return t[e]=t[e]||{}},t)[e.pop()]=n,t};
//# sourceMappingURL=shvl.es.js.map

10

package.json
{
"name": "shvl",
"version": "1.2.0",
"version": "1.2.1",
"description": "Get and set dot-notated properties within an object",

@@ -42,8 +42,8 @@ "license": "MIT",

"devDependencies": {
"bundlesize": "^0.15.3",
"jest": "^20.0.1",
"bundlesize": "^0.16.0",
"jest": "^22.4.2",
"jest-in-case": "^1.0.2",
"microbundle": "^0.2.4",
"npm-run-all": "^4.1.1"
"microbundle": "^0.4.4",
"npm-run-all": "^4.1.2"
}
}
# shvl
Get and set dot-notated properties within an object in only __157b__.
Get and set dot-notated properties within an object.
<img src="https://media.giphy.com/media/3o85xLDQLoZD1rk07u/giphy-downsized.gif" width="350" />
[![NPM version](https://img.shields.io/npm/v/shvl.svg)](https://www.npmjs.com/package/shvl)

@@ -6,0 +8,0 @@ [![Build Status](https://travis-ci.org/robinvdvleuten/shvl.svg?branch=master)](https://travis-ci.org/robinvdvleuten/shvl)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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