1.0.12 • Published 2 years ago

@devonpmack/ts-utils v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago