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

grist-gnash

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grist-gnash - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

61

lib/updater.js

@@ -1,3 +0,3 @@

var _ = require('lodash');
var sift = require('sift');
const _ = require('lodash-contrib');
const sift = require('sift');

@@ -38,10 +38,11 @@

function ensurePath(obj, k, cb) {
var path = k.split(".");
var t = null;
const path = k.split(".");
let t = null;
if (path.length == 1)
t = obj;
else {
var l = obj;
for (var i = 0; i < path.length - 1; i++) {
var p = path[i];
let l = obj;
let i = 0;
for (; i < path.length - 1; i++) {
const p = path[i];
if (!l[p])

@@ -72,8 +73,12 @@ l[p] = {};

function findDeepest(path, t) {
let i = 0;
//noinspection StatementWithEmptyBodyJS
for (; i < path.length - 1 && t[path[i]]; t = t[path[i++]]);
return [t, path[i]];
}
function applyUnset(obj, $set) {
_.each($set, function (v, k) {
var path = k.split(".");
var t = obj;
for (var i = 0; i < path.length - 1 && t[path[i]]; t = t[path[i++]]);
k = path[i];
_.each($set, function (val, key) {
const path = key.split(".");
const [t, k] = findDeepest(path, obj);
if (!t || !t[k]) return;

@@ -116,7 +121,5 @@ delete t[k];

function applyPop(obj, $op) {
_.each($op, function (v, k) {
var path = k.split(".");
var t = obj;
for (var i = 0; i < path.length - 1 && t[path[i]]; t = t[path[i++]]);
k = path[i];
_.each($op, function (v, key) {
const path = key.split(".");
const [t, k] = findDeepest(path, obj);
if (!t || !t[k]) return;

@@ -134,7 +137,5 @@ if (_.isArray(t[k])) {

function applyPull(obj, $op) {
_.each($op, function (v, k) {
var path = k.split(".");
var t = obj;
for (var i = 0; i < path.length - 1 && t[path[i]]; t = t[path[i++]]);
k = path[i];
_.each($op, function (v, key) {
const path = key.split(".");
const [t, k] = findDeepest(path, obj);
if (!t || !t[k]) return;

@@ -148,7 +149,5 @@ if (!_.isArray(t[k]))

function applyPullAll(obj, $op) {
_.each($op, function (v, k) {
var path = k.split(".");
var t = obj;
for (var i = 0; i < path.length - 1 && t[path[i]]; t = t[path[i++]]);
k = path[i];
_.each($op, function (v, key) {
const path = key.split(".");
const [t, k] = findDeepest(path, obj);
if (!t || !t[k]) return;

@@ -162,7 +161,5 @@ if (_.isArray(t[k])) {

function applyRename(obj, $op) {
_.each($op, function (v, k) {
var path = k.split(".");
var t = obj;
for (var i = 0; i < path.length - 1 && t[path[i]]; t = t[path[i++]]);
k = path[i];
_.each($op, function (v, key) {
const path = key.split(".");
const [t, k] = findDeepest(path, obj);
if (!t || !t[k]) return;

@@ -169,0 +166,0 @@ ensurePath(obj, v, function (t1, k1) {

{
"author": "Refael Ackermann<refael@empeeric.com>",
"author": "Refael Ackermann<me@refack.com>",
"name": "grist-gnash",
"description": "mongodb style object mutator (derived from TingoDB)",
"version": "1.0.3",
"repository": "Empeeric/grist-gnash.git",
"version": "1.1.0",
"repository": "node4good/grist-gnash.git",
"license": "MIT",
"contributors": [

@@ -16,8 +17,7 @@ "PushOk Software <support@pushok.com>"

"engines": {
"node": ">= v0.8.x"
"node": ">= 6"
},
"dependencies": {
"sift": "",
"lodash": "",
"lodash-contrib": ""
"sift": "^3.2.6",
"lodash-contrib": "^4.1200.1"
},

@@ -28,3 +28,7 @@ "scripts": {

"postpublish": "git push origin master --tags"
},
"devDependencies": {
"istanbul": "^0.4.5",
"mocha": "^3.2.0"
}
}

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