Skip to content

Commit

Permalink
fix handle and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ogroppo committed Jan 5, 2024
1 parent e0d396e commit 4a2ad7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# deverything

## 0.40.0

### Minor Changes

- fix handle bug

## 0.39.0

### Minor Changes
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 2 additions & 4 deletions src/random/randomHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 : "");

0 comments on commit 4a2ad7c

Please sign in to comment.