From 4a2ad7ccc9a0c5a16d129297bd7669016731653d Mon Sep 17 00:00:00 2001 From: Orlando Date: Fri, 5 Jan 2024 22:20:44 +0000 Subject: [PATCH] fix handle and readme --- CHANGELOG.md | 6 ++++++ README.md | 3 ++- package.json | 2 +- src/random/randomHandle.ts | 6 ++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d53cc8..d4ca689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # deverything +## 0.40.0 + +### Minor Changes + +- fix handle bug + ## 0.39.0 ### Minor Changes diff --git a/README.md b/README.md index 8b6f777..64b08ac 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,10 @@ Contributions always welcome! - `pretty()` stringify anything, without breaking on circular dependencies - `promiseWithTimeout()` takes a promise, a timeoutMs, and an option error as arguments. Returns a new Promise that either resolves with the value of the input promise or rejects with the provided error or a default error message if the input promise does not resolve or reject within the specified timeoutMs. - `scrambleText()` replace alpha chars with random chars -- `sleep()` promise-based sleep +- `seriesAll()` executes promises in series, and returns all results - `setUrlSearchParams()` - `shuffle()` shuffles elements in an array +- `sleep()` promise-based sleep - `toggleArrayValue()` remove/add value in array - `truncate()` truncate text, does not break emojis - `uniqueValues()` gets unique values in an array diff --git a/package.json b/package.json index fef676a..26fc262 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deverything", - "version": "0.39.0", + "version": "0.40.0", "description": "Everything you need for Dev", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/src/random/randomHandle.ts b/src/random/randomHandle.ts index 956d6ed..107f9d0 100644 --- a/src/random/randomHandle.ts +++ b/src/random/randomHandle.ts @@ -7,13 +7,11 @@ import { randomArrayItem } from "./randomArrayItem"; * @returns a unique social-like handle * @example "john.doe15" */ -export const randomHandle = ({ suffix }: { suffix?: string } = {}) => +export const randomHandle = ({ suffix }: { suffix?: string } = {}): string => ( randomArrayItem(WESTERN_FIRST_NAMES) + "." + randomArrayItem(WESTERN_LAST_NAMES) ).toLowerCase() + incrementalId() + // process-unique - suffix - ? suffix - : ""; + (suffix ? suffix : "");