MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / sanitize

Function sanitize

src/lib/util.ts:36–36  ·  view source on GitHub ↗
(input?: string)

Source from the content-addressed store, hash-verified

34 * removed. This function also returns an empty string if the input is undefined.
35 */
36export const sanitize = (input?: string): string => input?.replace(/[\W]/g, '') ?? ''
37
38export const delay = async (ms: number): Promise<void> => new Promise(resolve => setTimeout(resolve, ms))
39

Callers 2

util.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected