@wistia/utils 1.2.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 +6 -0
- package/README.md +1 -0
- package/dist/index.d.mts +31 -205
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +134 -194
- package/dist/index.mjs.map +1 -1
- package/llms-full.txt +29 -0
- package/llms.txt +1 -0
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 1.2.0
|
|
4
10
|
|
|
5
11
|
### 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` |
|