Comparing version 1.4.1 to 1.5.0
@@ -17,2 +17,9 @@ import type { PriorityName } from './constants'; | ||
/** | ||
* Merge sources from left-to-right or right-to-left. | ||
* From v2 upwards default to left independent of the option priority. | ||
* | ||
* default: left (aka. options.priority) | ||
*/ | ||
arrayPriority: `${PriorityName}`; | ||
/** | ||
* Strategy to merge different object keys. | ||
@@ -39,2 +46,3 @@ * | ||
* Merge sources from left-to-right or right-to-left. | ||
* From v2 upwards default to right. | ||
* | ||
@@ -41,0 +49,0 @@ * default: left |
@@ -0,2 +1,4 @@ | ||
import { PriorityName } from '../constants'; | ||
import type { Options, OptionsInput } from '../type'; | ||
export declare function buildOptions(options?: OptionsInput): Options; | ||
export declare function togglePriority(priority: `${PriorityName}`): "left" | "right"; |
{ | ||
"name": "smob", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Zero dependency library to safe merge objects.", | ||
@@ -54,19 +54,19 @@ "main": "dist/index.cjs", | ||
"devDependencies": { | ||
"@rollup/plugin-node-resolve": "^15.1.0", | ||
"@swc/core": "^1.3.70", | ||
"@swc/jest": "^0.2.26", | ||
"@tada5hi/commitlint-config": "^1.0.2", | ||
"@tada5hi/eslint-config-typescript": "^1.1.9", | ||
"@tada5hi/semantic-release": "^0.1.0", | ||
"@tada5hi/tsconfig": "^0.4.0", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@swc/core": "^1.4.11", | ||
"@swc/jest": "^0.2.29", | ||
"@tada5hi/commitlint-config": "^1.2.0", | ||
"@tada5hi/eslint-config-typescript": "^1.2.10", | ||
"@tada5hi/semantic-release": "^0.3.1", | ||
"@tada5hi/tsconfig": "^0.5.1", | ||
"@types/jest": "^29.5.3", | ||
"@types/node": "^20.2.5", | ||
"@types/node": "^20.10.4", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.49.0", | ||
"husky": "^8.0.3", | ||
"eslint": "^8.57.0", | ||
"husky": "^9.0.11", | ||
"jest": "^29.6.1", | ||
"rollup": "^3.23.0", | ||
"semantic-release": "^21.0.7", | ||
"typescript": "^5.1.6" | ||
"rollup": "^4.13.2", | ||
"semantic-release": "^23.0.6", | ||
"typescript": "^5.4.3" | ||
} | ||
} |
@@ -36,5 +36,6 @@ # SMOB 🧪 | ||
- **arrayDistinct**: `false` Remove duplicates, when merging array elements. | ||
- **arrayPriority**: `left` (options.priority) The source aka leftmost array has by **default** the highest priority. | ||
- **clone**: `false` Deep clone input sources. | ||
- **inPlace**: `false` Merge sources in place. | ||
- **priority**: `left` The source aka leftmost array/object has by **default** the highest priority. | ||
- **priority**: `left` The source aka leftmost object has by **default** the highest priority. | ||
@@ -41,0 +42,0 @@ The merge behaviour can be changed by creating a custom [merger](#merger). |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77077
632
163