New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jumpn/utils-composite

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jumpn/utils-composite - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

25

compat/cjs/index.js

@@ -14,3 +14,2 @@ 'use strict';

var arrayRemove = _interopDefault(require('@jumpn/utils-array/dist/remove'));
var _Object$assign = _interopDefault(require('babel-runtime/core-js/object/assign'));
var _Symbol = _interopDefault(require('babel-runtime/core-js/symbol'));

@@ -234,6 +233,16 @@ var _extends = _interopDefault(require('babel-runtime/helpers/extends'));

var updateIn$1 = _Object$assign(Fun.curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = Fun.curry(updateIn);
updateInCurried.remove = removeAction;
var _this$7 = undefined;
var remove$2 = function () {
_newArrowCheck(this, _this$7);
return updateInCurried.remove;
}.bind(undefined);
/**

@@ -246,10 +255,6 @@ * Returns a new composite with the result of having removed the property

*/
var removeIn = function (path, value, composite) {
var removeIn = function (path, composite) {
_newArrowCheck(this, _this$7);
return updateIn$1(path, function () {
_newArrowCheck(this, _this$7);
return value;
}.bind(this), composite);
return updateInCurried(path, remove$2, composite);
}.bind(undefined);

@@ -288,3 +293,3 @@

return updateIn$1(path, function () {
return updateInCurried(path, function () {
_newArrowCheck(this, _this$11);

@@ -331,2 +336,2 @@

exports.shallowEqual = shallowEqual$1;
exports.updateIn = updateIn$1;
exports.updateIn = updateInCurried;

27

compat/cjs/removeIn.js

@@ -7,3 +7,2 @@ 'use strict';

var Fun = require('flow-static-land/lib/Fun');
var _Object$assign = _interopDefault(require('babel-runtime/core-js/object/assign'));
var _Symbol = _interopDefault(require('babel-runtime/core-js/symbol'));

@@ -59,3 +58,3 @@ var utilsArray = require('@jumpn/utils-array');

*/
var remove = function (key, composite) {
var remove$1 = function (key, composite) {
_newArrowCheck(this, _this$4);

@@ -66,3 +65,3 @@

var remove$1 = Fun.curry(remove);
var remove$2 = Fun.curry(remove$1);

@@ -120,3 +119,3 @@ var _this$5 = undefined;

var removed = remove$1(path[index], context.current);
var removed = remove$2(path[index], context.current);

@@ -169,6 +168,16 @@ return index === 0 ? removed : set(path[index - 1], removed, context.previous);

var updateIn$1 = _Object$assign(Fun.curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = Fun.curry(updateIn);
updateInCurried.remove = removeAction;
var _this = undefined;
var remove = function () {
_newArrowCheck(this, _this);
return updateInCurried.remove;
}.bind(undefined);
/**

@@ -181,10 +190,6 @@ * Returns a new composite with the result of having removed the property

*/
var removeIn = function (path, value, composite) {
var removeIn = function (path, composite) {
_newArrowCheck(this, _this);
return updateIn$1(path, function () {
_newArrowCheck(this, _this);
return value;
}.bind(this), composite);
return updateInCurried(path, remove, composite);
}.bind(undefined);

@@ -191,0 +196,0 @@

@@ -7,3 +7,2 @@ 'use strict';

var Fun = require('flow-static-land/lib/Fun');
var _Object$assign = _interopDefault(require('babel-runtime/core-js/object/assign'));
var _Symbol = _interopDefault(require('babel-runtime/core-js/symbol'));

@@ -166,4 +165,8 @@ var utilsArray = require('@jumpn/utils-array');

var updateIn$1 = _Object$assign(Fun.curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = Fun.curry(updateIn);
updateInCurried.remove = removeAction;
var _this = undefined;

@@ -180,3 +183,3 @@

return updateIn$1(path, function () {
return updateInCurried(path, function () {
_newArrowCheck(this, _this);

@@ -183,0 +186,0 @@

@@ -5,3 +5,2 @@ 'use strict';

var _Object$assign = _interopDefault(require('babel-runtime/core-js/object/assign'));
var _Symbol = _interopDefault(require('babel-runtime/core-js/symbol'));

@@ -166,4 +165,8 @@ var _newArrowCheck = _interopDefault(require('babel-runtime/helpers/newArrowCheck'));

var updateIn$1 = _Object$assign(Fun.curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = Fun.curry(updateIn);
module.exports = updateIn$1;
updateInCurried.remove = removeAction;
module.exports = updateInCurried;

@@ -884,9 +884,9 @@ (function (global, factory) {

var assign$1 = _core.Object.assign;
var assign$2 = _core.Object.assign;
var assign = createCommonjsModule(function (module) {
module.exports = { "default": assign$1, __esModule: true };
module.exports = { "default": assign$2, __esModule: true };
});
var _Object$assign = unwrapExports(assign);
unwrapExports(assign);

@@ -1811,6 +1811,16 @@ var _extends = createCommonjsModule(function (module, exports) {

var updateIn$1 = _Object$assign(Fun_6(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = Fun_6(updateIn);
updateInCurried.remove = removeAction;
var _this$9$1 = undefined;
var remove$4 = function () {
_newArrowCheck(this, _this$9$1);
return updateInCurried.remove;
}.bind(undefined);
/**

@@ -1823,10 +1833,6 @@ * Returns a new composite with the result of having removed the property

*/
var removeIn = function (path, value, composite) {
var removeIn = function (path, composite) {
_newArrowCheck(this, _this$9$1);
return updateIn$1(path, function () {
_newArrowCheck(this, _this$9$1);
return value;
}.bind(this), composite);
return updateInCurried(path, remove$4, composite);
}.bind(undefined);

@@ -1865,3 +1871,3 @@

return updateIn$1(path, function () {
return updateInCurried(path, function () {
_newArrowCheck(this, _this$13$1);

@@ -1908,3 +1914,3 @@

exports.shallowEqual = shallowEqual$1;
exports.updateIn = updateIn$1;
exports.updateIn = updateInCurried;

@@ -1911,0 +1917,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -8,3 +8,2 @@ import _newArrowCheck from 'babel-runtime/helpers/newArrowCheck';

import arrayRemove from '@jumpn/utils-array/dist/remove';
import _Object$assign from 'babel-runtime/core-js/object/assign';
import _Symbol from 'babel-runtime/core-js/symbol';

@@ -228,6 +227,16 @@ import _extends from 'babel-runtime/helpers/extends';

var updateIn$1 = _Object$assign(curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = curry(updateIn);
updateInCurried.remove = removeAction;
var _this$7 = undefined;
var remove$2 = function () {
_newArrowCheck(this, _this$7);
return updateInCurried.remove;
}.bind(undefined);
/**

@@ -240,10 +249,6 @@ * Returns a new composite with the result of having removed the property

*/
var removeIn = function (path, value, composite) {
var removeIn = function (path, composite) {
_newArrowCheck(this, _this$7);
return updateIn$1(path, function () {
_newArrowCheck(this, _this$7);
return value;
}.bind(this), composite);
return updateInCurried(path, remove$2, composite);
}.bind(undefined);

@@ -282,3 +287,3 @@

return updateIn$1(path, function () {
return updateInCurried(path, function () {
_newArrowCheck(this, _this$11);

@@ -313,2 +318,2 @@

export { get$1 as get, getIn$1 as getIn, getKeys, hasIn$1 as hasIn, hasKey$1 as hasKey, haveSameProps$1 as haveSameProps, remove$1 as remove, removeIn$1 as removeIn, set$2 as set, setIn$1 as setIn, shallowCopy, shallowEqual$1 as shallowEqual, updateIn$1 as updateIn };
export { get$1 as get, getIn$1 as getIn, getKeys, hasIn$1 as hasIn, hasKey$1 as hasKey, haveSameProps$1 as haveSameProps, remove$1 as remove, removeIn$1 as removeIn, set$2 as set, setIn$1 as setIn, shallowCopy, shallowEqual$1 as shallowEqual, updateInCurried as updateIn };
import _newArrowCheck from 'babel-runtime/helpers/newArrowCheck';
import { curry } from 'flow-static-land/lib/Fun';
import _Object$assign from 'babel-runtime/core-js/object/assign';
import _Symbol from 'babel-runtime/core-js/symbol';

@@ -54,3 +53,3 @@ import { isLastIndex } from '@jumpn/utils-array';

*/
var remove = function (key, composite) {
var remove$1 = function (key, composite) {
_newArrowCheck(this, _this$4);

@@ -61,3 +60,3 @@

var remove$1 = curry(remove);
var remove$2 = curry(remove$1);

@@ -115,3 +114,3 @@ var _this$5 = undefined;

var removed = remove$1(path[index], context.current);
var removed = remove$2(path[index], context.current);

@@ -164,6 +163,16 @@ return index === 0 ? removed : set(path[index - 1], removed, context.previous);

var updateIn$1 = _Object$assign(curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = curry(updateIn);
updateInCurried.remove = removeAction;
var _this = undefined;
var remove = function () {
_newArrowCheck(this, _this);
return updateInCurried.remove;
}.bind(undefined);
/**

@@ -176,10 +185,6 @@ * Returns a new composite with the result of having removed the property

*/
var removeIn = function (path, value, composite) {
var removeIn = function (path, composite) {
_newArrowCheck(this, _this);
return updateIn$1(path, function () {
_newArrowCheck(this, _this);
return value;
}.bind(this), composite);
return updateInCurried(path, remove, composite);
}.bind(undefined);

@@ -186,0 +191,0 @@

import _newArrowCheck from 'babel-runtime/helpers/newArrowCheck';
import { curry } from 'flow-static-land/lib/Fun';
import _Object$assign from 'babel-runtime/core-js/object/assign';
import _Symbol from 'babel-runtime/core-js/symbol';

@@ -161,4 +160,8 @@ import { isLastIndex } from '@jumpn/utils-array';

var updateIn$1 = _Object$assign(curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = curry(updateIn);
updateInCurried.remove = removeAction;
var _this = undefined;

@@ -175,3 +178,3 @@

return updateIn$1(path, function () {
return updateInCurried(path, function () {
_newArrowCheck(this, _this);

@@ -178,0 +181,0 @@

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

import _Object$assign from 'babel-runtime/core-js/object/assign';
import _Symbol from 'babel-runtime/core-js/symbol';

@@ -161,4 +160,8 @@ import _newArrowCheck from 'babel-runtime/helpers/newArrowCheck';

var updateIn$1 = _Object$assign(curry(updateIn), { remove: removeAction });
// we are doing this way and not returning an Object.assign construction, as
// that is not well typed (returns any)
var updateInCurried = curry(updateIn);
export default updateIn$1;
updateInCurried.remove = removeAction;
export default updateInCurried;
{
"name": "@jumpn/utils-composite",
"version": "0.2.0",
"version": "0.3.0",
"description": "Composite utilities (immutability, fp helpers)",
"module": "dist/index.js",
"main": "compat/cjs/index.js",
"browser": "compat/umd/index.js",
"scripts": {

@@ -9,0 +8,0 @@ "clean": "rm -rfv dist compat",

@@ -5,3 +5,3 @@ # @jumpn/utils-composite

>
> **NOTE**: All functions the functions described in [API](#API) are curried
> **NOTE**: All the functions described in [API](#API) are curried

@@ -8,0 +8,0 @@ ## Types

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

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