@oscarpalmer/atoms 0.196.1 → 0.198.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.
@@ -13,7 +13,6 @@ function assign(to, from, options) {
13
13
  actual.assignValues = true;
14
14
  return mergeValues([to, ...from], actual);
15
15
  }
16
- assign.initialize = initializeAssigner;
17
16
  function getMergeOptions(options) {
18
17
  const actual = {
19
18
  assignValues: false,
@@ -67,7 +66,6 @@ function initializeMerger(options) {
67
66
  function merge(values, options) {
68
67
  return mergeValues(values, getMergeOptions(options));
69
68
  }
70
- merge.initialize = initializeMerger;
71
69
  function mergeObjects(values, options, destination, prefix) {
72
70
  const { length } = values;
73
71
  const isArray = Array.isArray(destination ?? values[0]);
@@ -97,5 +95,9 @@ function mergeValues(values, options, prefix) {
97
95
  if (actual.length > 1) return mergeObjects(actual, options, options.assignValues ? actual[0] : void 0, prefix);
98
96
  return options.assignValues ? actual[0] : Array.isArray(actual[0]) ? actual[0].slice() : { ...actual[0] };
99
97
  }
98
+ assign.initialize = initializeAssigner;
99
+ merge.initialize = initializeMerger;
100
+ Object.defineProperty(assign, "initialize", { value: initializeAssigner });
101
+ Object.defineProperty(merge, "initialize", { value: initializeMerger });
100
102
  //#endregion
101
103
  export { assign, initializeAssigner, initializeMerger, merge };
@@ -20,7 +20,6 @@ function initializeTransformer(transform) {
20
20
  function transform(value, transform) {
21
21
  return transformValue(value, getTransformer(transform));
22
22
  }
23
- transform.initialize = initializeTransformer;
24
23
  function transformValue(value, transformer) {
25
24
  if (isNonPlainObject(value)) return {};
26
25
  if (transformer == null) return value;
@@ -34,5 +33,7 @@ function transformValue(value, transformer) {
34
33
  }
35
34
  return value;
36
35
  }
36
+ transform.initialize = initializeTransformer;
37
+ Object.defineProperty(transform, "initialize", { value: initializeTransformer });
37
38
  //#endregion
38
39
  export { initializeTransformer, transform };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@oscarpalmer/atoms",
3
- "version": "0.196.1",
3
+ "version": "0.198.0",
4
4
  "description": "Atomic utilities for making your JavaScript better.",
5
5
  "keywords": [
6
6
  "array",
7
+ "clone",
7
8
  "color",
8
9
  "helper",
9
10
  "observable",
@@ -277,12 +278,12 @@
277
278
  "watch": "npx vite build --watch"
278
279
  },
279
280
  "devDependencies": {
280
- "@oxlint/plugins": "^1.80",
281
+ "@oxlint/plugins": "^1.81",
281
282
  "@types/node": "^26.4",
282
283
  "@vitest/coverage-istanbul": "^4.1",
283
284
  "eslint": "^10.9",
284
285
  "jsdom": "^30",
285
- "tsdown": "^0.22",
286
+ "tsdown": "^0.23",
286
287
  "typescript": "^6",
287
288
  "vite": "npm:@voidzero-dev/vite-plus-core@latest",
288
289
  "vite-plus": "latest",