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

@cicada/render

Package Overview
Dependencies
Maintainers
6
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cicada/render - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

22

lib/exist.js

@@ -25,7 +25,18 @@ 'use strict';

function isExist(variable) {
return variable !== undefined && variable !== null;
}
exports.default = (0, _extends3.default)({}, _exist2.default, {
get: function get(obj, path, defaultValue) {
return path === '' || path === undefined ? obj : _exist2.default.get(obj, path, defaultValue);
get: function get(obj) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var defaultValue = arguments[2];
/* eslint-disable no-nested-ternary*/
return path === '' ? isExist(obj) ? obj : defaultValue : _exist2.default.get(obj, path, defaultValue);
},
ensure: function ensure(obj, path, value) {
ensure: function ensure(obj) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var value = arguments[2];
if (_exist2.default.detect(obj, path) !== true) {

@@ -35,3 +46,6 @@ _exist2.default.set(obj, path, value, true);

},
assign: function assign(obj, path, newValue) {
assign: function assign(obj) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var newValue = arguments[2];
var origin = _exist2.default.get(obj, path);

@@ -38,0 +52,0 @@ if (origin === undefined) {

2

package.json
{
"name": "@cicada/render",
"version": "1.1.3",
"version": "1.1.4",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "scripts": {

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