@wistia/utils 1.1.0 → 1.3.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.
- package/CHANGELOG.md +12 -0
- package/README.md +2 -0
- package/dist/index.d.mts +47 -203
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +156 -192
- package/dist/index.mjs.map +1 -1
- package/llms-full.txt +39 -0
- package/llms.txt +2 -0
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @wistia/utils
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#295](https://github.com/wistia/utils/pull/295) [`4aba1a3`](https://github.com/wistia/utils/commit/4aba1a3bd757d073b098a3a3dd050d68afa67847) Thanks [@okize](https://github.com/okize)! - Add the `hashString` utility. It turns text into a whole number that is always the same for the same text, for example to pick an avatar color for a name. It reads the text by Unicode code point, so a character such as `😀` counts once as its full value, not as two UTF-16 halves.
|
|
8
|
+
|
|
9
|
+
## 1.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#292](https://github.com/wistia/utils/pull/292) [`9500c4b`](https://github.com/wistia/utils/commit/9500c4bfaa23106c0e1e5ec8369eff100a6be92e) Thanks [@okize](https://github.com/okize)! - Add the `wait` utility. It returns a promise that resolves after about the given number of milliseconds. It always waits through `setTimeout`, even for 0.
|
|
14
|
+
|
|
3
15
|
## 1.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -180,6 +180,7 @@ General-purpose helper functions that complement the guards. Unlike guards, thes
|
|
|
180
180
|
| `getObjectEntries(obj)` | `[keyof T, T[keyof T]][]` |
|
|
181
181
|
| `getObjectKeys(obj)` | `(keyof T)[]` |
|
|
182
182
|
| `getObjectValues(obj)` | `T[keyof T][]` |
|
|
183
|
+
| `hashString(text)` | `number` |
|
|
183
184
|
| `isEmail(value)` | `boolean` |
|
|
184
185
|
| `isUrl(value)` | `boolean` |
|
|
185
186
|
| `mediaDurationString(numberOfMilliseconds)` | `string` |
|
|
@@ -195,6 +196,7 @@ General-purpose helper functions that complement the guards. Unlike guards, thes
|
|
|
195
196
|
| `timeOnlyString(date, { timeZone = defaultTimeZone })` | `string` |
|
|
196
197
|
| `truncateString(text, maxLength, { ellipsis = '…' })` | `string` |
|
|
197
198
|
| `tupleIncludes(tuple, item)` | `item is TTuple[number]` |
|
|
199
|
+
| `wait(milliseconds)` | `Promise<void>` |
|
|
198
200
|
|
|
199
201
|
<!-- AUTOGEN:README-UTILITIES:END -->
|
|
200
202
|
|