diff --git a/CHANGELOG.md b/CHANGELOG.md index 2941b45..853e273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.5.1 (2024--) + +- **BREAKING CHANGES**: The `objectTo1d` method have been renamed to `objTo1d` + ## 1.5.0 (2024-10-24) - **BREAKING CHANGES**: The `md5`, `sha1`, and `sha256` methods have been renamed to `md5Hash`, `sha1Hash`, and `sha256Hash`. diff --git a/lib/index.ts b/lib/index.ts index fe7b0ba..8f51380 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -482,7 +482,7 @@ export default class Qsu { return convertToArray(obj); } - static objectTo1d(obj: AnyValueObject, separator = '.'): AnyValueObject { + static objTo1d(obj: AnyValueObject, separator = '.'): AnyValueObject { if (!separator || separator.length < 1) { throw new Error('`separator` must have value at least 1 character.'); } @@ -1321,7 +1321,7 @@ export const { objToPrettyStr, objFindItemRecursiveByKey, objToArray, - objectTo1d, + objTo1d, objDeleteKeyByValue, objUpdate, objMergeNewKey, diff --git a/test/object.test.ts b/test/object.test.ts index eef2468..c88ff2c 100644 --- a/test/object.test.ts +++ b/test/object.test.ts @@ -1,7 +1,7 @@ import assert from 'assert'; import { describe, it } from 'node:test'; import { - objectTo1d, + objTo1d, objToQueryString, objToPrettyStr, objFindItemRecursiveByKey, @@ -196,10 +196,10 @@ describe('Misc', () => { ); }); - it('objectTo1d', () => { - assert.deepStrictEqual(objectTo1d({}), {}); + it('objTo1d', () => { + assert.deepStrictEqual(objTo1d({}), {}); assert.deepStrictEqual( - objectTo1d({ + objTo1d({ a: 1, b: 2, c: 3 @@ -211,7 +211,7 @@ describe('Misc', () => { } ); assert.deepStrictEqual( - objectTo1d({ + objTo1d({ a: 1, b: { aa: 1, @@ -227,7 +227,7 @@ describe('Misc', () => { } ); assert.deepStrictEqual( - objectTo1d( + objTo1d( { a: 1, b: { @@ -246,7 +246,7 @@ describe('Misc', () => { } ); assert.deepStrictEqual( - objectTo1d({ + objTo1d({ a: 1, b: { aa: {