1.0.12 • Published 3 years ago

@devonpmack/ts-utils v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ts-utils

Extracts a union of all the characters in a string

@example

ExtractCharacters<"Hello">; // "H" | "e" | "l" | "l" | "o"

Check if a string only includes characters from a given string @example

StringOnlyIncludes<"Hello", "0123456789-()">; // false
StringOnlyIncludes<"123-456-7890", "0123456789-()">; // true

Check if a string is alphanumeric

@example

IsAlphaNumeric<"Hello">; // true
IsAlphaNumeric<"$^1fa">; // false

Typed version of Object.keys, returning strongly typed keys

@example

const keys = keysOf({ a: 1, b: 2 }); // ["a", "b"]
typeof keys[0]; // "a" | "b"
1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago