object-set-all-values-to 6.0.31 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/home/runner/work/codsen/codsen/packages/object-set-all-values-to/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/test/test.js":"5"},{"size":530,"mtime":
|
|
1
|
+
[{"/home/runner/work/codsen/codsen/packages/object-set-all-values-to/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/test/test.js":"5"},{"size":530,"mtime":1760566739125,"results":"6","hashOfConfig":"7"},{"size":417,"mtime":1760566739125,"results":"8","hashOfConfig":"9"},{"size":373,"mtime":1760566739125,"results":"10","hashOfConfig":"7"},{"size":1075,"mtime":1760566739125,"results":"11","hashOfConfig":"9"},{"size":10232,"mtime":1760566739125,"results":"12","hashOfConfig":"13"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/object-set-all-values-to/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/object-set-all-values-to/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/object-set-all-values-to/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/object-set-all-values-to/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/object-set-all-values-to/test/test.js",[],["29","30","31","32","33"],{"ruleId":"34","severity":2,"message":"35","line":3,"column":17,"nodeType":null,"messageId":"36","endLine":3,"endColumn":19,"suppressions":"37"},{"ruleId":"34","severity":2,"message":"38","line":3,"column":25,"nodeType":null,"messageId":"36","endLine":3,"endColumn":31,"suppressions":"39"},{"ruleId":"34","severity":2,"message":"40","line":3,"column":33,"nodeType":null,"messageId":"36","endLine":3,"endColumn":37,"suppressions":"41"},{"ruleId":"34","severity":2,"message":"42","line":3,"column":39,"nodeType":null,"messageId":"36","endLine":3,"endColumn":42,"suppressions":"43"},{"ruleId":"34","severity":2,"message":"44","line":3,"column":44,"nodeType":null,"messageId":"36","endLine":3,"endColumn":49,"suppressions":"45"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["46"],"'throws' is defined but never used.",["47"],"'type' is defined but never used.",["48"],"'not' is defined but never used.",["49"],"'match' is defined but never used.",["50"],{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},"directive",""]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.1.0 (2025-10-15)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
|
|
11
|
+
|
|
6
12
|
## 6.0.16 (2024-03-30)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ assert.deepEqual(
|
|
|
73
73
|
|
|
74
74
|
## Documentation
|
|
75
75
|
|
|
76
|
-
Please [visit codsen.com](https://codsen.com/os/object-set-all-values-to/) for a full description of the API.
|
|
76
|
+
Please [visit codsen.com](https://codsen.com/os/object-set-all-values-to/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/object-set-all-values-to/CHANGELOG.md).
|
|
77
77
|
|
|
78
78
|
## Contributing
|
|
79
79
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-set-all-values-to
|
|
3
3
|
* @fileoverview Recursively walk the input and set all found values in plain objects to something
|
|
4
|
-
* @version 6.0
|
|
4
|
+
* @version 6.1.0
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-set-all-values-to/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import u from"rfdc";import{isPlainObject as o}from"codsen-utils";var i="6.0
|
|
10
|
+
import u from"rfdc";import{isPlainObject as o}from"codsen-utils";var i="6.1.0";var l=u(),j=i;function p(c,r){let t,e=l(c);return arguments.length<2?t=!1:o(r)||Array.isArray(r)?t=l(r):t=r,Array.isArray(e)?e.forEach((s,n)=>{(o(e[n])||Array.isArray(e[n]))&&(e[n]=p(e[n],t))}):o(e)&&Object.keys(e).forEach(s=>{Array.isArray(e[s])||o(e[s])?e[s]=p(e[s],t):e[s]=t}),e}export{p as setAllValuesTo,j as version};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-set-all-values-to
|
|
3
3
|
* @fileoverview Recursively walk the input and set all found values in plain objects to something
|
|
4
|
-
* @version 6.0
|
|
4
|
+
* @version 6.1.0
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-set-all-values-to/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var objectSetAllValuesTo=(()=>{var B=Object.create;var g=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var R=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),L=(t,n)=>{for(var o in n)g(t,o,{get:n[o],enumerable:!0})},w=(t,n,o,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of E(n))!M.call(t,c)&&c!==o&&g(t,c,{get:()=>n[c],enumerable:!(u=D(n,c))||u.enumerable});return t};var O=(t,n,o)=>(o=t!=null?B($(t)):{},w(n||!t||!t.__esModule?g(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>w(g({},"__esModule",{value:!0}),t);var h=R((Q,v)=>{"use strict";v.exports=F;function b(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function F(t){if(t=t||{},t.circles)return N(t);let n=new Map;if(n.set(Date,s=>new Date(s)),n.set(Map,(s,a)=>new Map(u(Array.from(s),a))),n.set(Set,(s,a)=>new Set(u(Array.from(s),a))),t.constructorHandlers)for(let s of t.constructorHandlers)n.set(s[0],s[1]);let o=null;return t.proto?p:c;function u(s,a){let e=Object.keys(s),r=new Array(e.length);for(let l=0;l<e.length;l++){let i=e[l],f=s[i];typeof f!="object"||f===null?r[i]=f:f.constructor!==Object&&(o=n.get(f.constructor))?r[i]=o(f,a):ArrayBuffer.isView(f)?r[i]=b(f):r[i]=a(f)}return r}function c(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return u(s,c);if(s.constructor!==Object&&(o=n.get(s.constructor)))return o(s,c);let a={};for(let e in s){if(Object.hasOwnProperty.call(s,e)===!1)continue;let r=s[e];typeof r!="object"||r===null?a[e]=r:r.constructor!==Object&&(o=n.get(r.constructor))?a[e]=o(r,c):ArrayBuffer.isView(r)?a[e]=b(r):a[e]=c(r)}return a}function p(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return u(s,p);if(s.constructor!==Object&&(o=n.get(s.constructor)))return o(s,p);let a={};for(let e in s){let r=s[e];typeof r!="object"||r===null?a[e]=r:r.constructor!==Object&&(o=n.get(r.constructor))?a[e]=o(r,p):ArrayBuffer.isView(r)?a[e]=b(r):a[e]=p(r)}return a}}function N(t){let n=[],o=[],u=new Map;if(u.set(Date,e=>new Date(e)),u.set(Map,(e,r)=>new Map(p(Array.from(e),r))),u.set(Set,(e,r)=>new Set(p(Array.from(e),r))),t.constructorHandlers)for(let e of t.constructorHandlers)u.set(e[0],e[1]);let c=null;return t.proto?a:s;function p(e,r){let l=Object.keys(e),i=new Array(l.length);for(let f=0;f<l.length;f++){let y=l[f],d=e[y];if(typeof d!="object"||d===null)i[y]=d;else if(d.constructor!==Object&&(c=u.get(d.constructor)))i[y]=c(d,r);else if(ArrayBuffer.isView(d))i[y]=b(d);else{let j=n.indexOf(d);j!==-1?i[y]=o[j]:i[y]=r(d)}}return i}function s(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return p(e,s);if(e.constructor!==Object&&(c=u.get(e.constructor)))return c(e,s);let r={};n.push(e),o.push(r);for(let l in e){if(Object.hasOwnProperty.call(e,l)===!1)continue;let i=e[l];if(typeof i!="object"||i===null)r[l]=i;else if(i.constructor!==Object&&(c=u.get(i.constructor)))r[l]=c(i,s);else if(ArrayBuffer.isView(i))r[l]=b(i);else{let f=n.indexOf(i);f!==-1?r[l]=o[f]:r[l]=s(i)}}return n.pop(),o.pop(),r}function a(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return p(e,a);if(e.constructor!==Object&&(c=u.get(e.constructor)))return c(e,a);let r={};n.push(e),o.push(r);for(let l in e){let i=e[l];if(typeof i!="object"||i===null)r[l]=i;else if(i.constructor!==Object&&(c=u.get(i.constructor)))r[l]=c(i,a);else if(ArrayBuffer.isView(i))r[l]=b(i);else{let f=n.indexOf(i);f!==-1?r[l]=o[f]:r[l]=a(i)}}return n.pop(),o.pop(),r}}});var V={};L(V,{setAllValuesTo:()=>A,version:()=>H});var k=O(h(),1);var x=O(h(),1);var U=(0,x.default)();function m(t){if(t==null||typeof t!="object")return!1;let n=Object.getPrototypeOf(t);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}var C="6.0
|
|
10
|
+
"use strict";var objectSetAllValuesTo=(()=>{var B=Object.create;var g=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var R=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),L=(t,n)=>{for(var o in n)g(t,o,{get:n[o],enumerable:!0})},w=(t,n,o,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of E(n))!M.call(t,c)&&c!==o&&g(t,c,{get:()=>n[c],enumerable:!(u=D(n,c))||u.enumerable});return t};var O=(t,n,o)=>(o=t!=null?B($(t)):{},w(n||!t||!t.__esModule?g(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>w(g({},"__esModule",{value:!0}),t);var h=R((Q,v)=>{"use strict";v.exports=F;function b(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function F(t){if(t=t||{},t.circles)return N(t);let n=new Map;if(n.set(Date,s=>new Date(s)),n.set(Map,(s,a)=>new Map(u(Array.from(s),a))),n.set(Set,(s,a)=>new Set(u(Array.from(s),a))),t.constructorHandlers)for(let s of t.constructorHandlers)n.set(s[0],s[1]);let o=null;return t.proto?p:c;function u(s,a){let e=Object.keys(s),r=new Array(e.length);for(let l=0;l<e.length;l++){let i=e[l],f=s[i];typeof f!="object"||f===null?r[i]=f:f.constructor!==Object&&(o=n.get(f.constructor))?r[i]=o(f,a):ArrayBuffer.isView(f)?r[i]=b(f):r[i]=a(f)}return r}function c(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return u(s,c);if(s.constructor!==Object&&(o=n.get(s.constructor)))return o(s,c);let a={};for(let e in s){if(Object.hasOwnProperty.call(s,e)===!1)continue;let r=s[e];typeof r!="object"||r===null?a[e]=r:r.constructor!==Object&&(o=n.get(r.constructor))?a[e]=o(r,c):ArrayBuffer.isView(r)?a[e]=b(r):a[e]=c(r)}return a}function p(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return u(s,p);if(s.constructor!==Object&&(o=n.get(s.constructor)))return o(s,p);let a={};for(let e in s){let r=s[e];typeof r!="object"||r===null?a[e]=r:r.constructor!==Object&&(o=n.get(r.constructor))?a[e]=o(r,p):ArrayBuffer.isView(r)?a[e]=b(r):a[e]=p(r)}return a}}function N(t){let n=[],o=[],u=new Map;if(u.set(Date,e=>new Date(e)),u.set(Map,(e,r)=>new Map(p(Array.from(e),r))),u.set(Set,(e,r)=>new Set(p(Array.from(e),r))),t.constructorHandlers)for(let e of t.constructorHandlers)u.set(e[0],e[1]);let c=null;return t.proto?a:s;function p(e,r){let l=Object.keys(e),i=new Array(l.length);for(let f=0;f<l.length;f++){let y=l[f],d=e[y];if(typeof d!="object"||d===null)i[y]=d;else if(d.constructor!==Object&&(c=u.get(d.constructor)))i[y]=c(d,r);else if(ArrayBuffer.isView(d))i[y]=b(d);else{let j=n.indexOf(d);j!==-1?i[y]=o[j]:i[y]=r(d)}}return i}function s(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return p(e,s);if(e.constructor!==Object&&(c=u.get(e.constructor)))return c(e,s);let r={};n.push(e),o.push(r);for(let l in e){if(Object.hasOwnProperty.call(e,l)===!1)continue;let i=e[l];if(typeof i!="object"||i===null)r[l]=i;else if(i.constructor!==Object&&(c=u.get(i.constructor)))r[l]=c(i,s);else if(ArrayBuffer.isView(i))r[l]=b(i);else{let f=n.indexOf(i);f!==-1?r[l]=o[f]:r[l]=s(i)}}return n.pop(),o.pop(),r}function a(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return p(e,a);if(e.constructor!==Object&&(c=u.get(e.constructor)))return c(e,a);let r={};n.push(e),o.push(r);for(let l in e){let i=e[l];if(typeof i!="object"||i===null)r[l]=i;else if(i.constructor!==Object&&(c=u.get(i.constructor)))r[l]=c(i,a);else if(ArrayBuffer.isView(i))r[l]=b(i);else{let f=n.indexOf(i);f!==-1?r[l]=o[f]:r[l]=a(i)}}return n.pop(),o.pop(),r}}});var V={};L(V,{setAllValuesTo:()=>A,version:()=>H});var k=O(h(),1);var x=O(h(),1);var U=(0,x.default)();function m(t){if(t==null||typeof t!="object")return!1;let n=Object.getPrototypeOf(t);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}var C="6.1.0";var S=(0,k.default)(),H=C;function A(t,n){let o,u=S(t);return arguments.length<2?o=!1:m(n)||Array.isArray(n)?o=S(n):o=n,Array.isArray(u)?u.forEach((c,p)=>{(m(u[p])||Array.isArray(u[p]))&&(u[p]=A(u[p],o))}):m(u)&&Object.keys(u).forEach(c=>{Array.isArray(u[c])||m(u[c])?u[c]=A(u[c],o):u[c]=o}),u}return P(V);})();
|
|
11
11
|
/**
|
|
12
12
|
* @name codsen-utils
|
|
13
13
|
* @fileoverview Various utility functions
|
|
14
|
-
* @version 1.
|
|
14
|
+
* @version 1.7.0
|
|
15
15
|
* @author Roy Revelt
|
|
16
16
|
* @license MIT
|
|
17
17
|
* {@link https://codsen.com/os/codsen-utils/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "object-set-all-values-to",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Recursively walk the input and set all found values in plain objects to something",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"all",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"codsen-utils": "^1.
|
|
74
|
+
"codsen-utils": "^1.7.0",
|
|
75
75
|
"rfdc": "^1.4.1"
|
|
76
76
|
},
|
|
77
77
|
"publishConfig": {
|