UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

20 lines 470 B
/** * @description - Typescript validator to assert if a value is `string` type. * * @example * * let foo: number | string = 0 * * if(Math.random() < 0.5){ * foo = 'bar' * } * * if(isStringTypeOf(foo)) { * // We asserted the value is actually an string! * console.log("foo length is: " + foo.length) // foo length is 3 * } */ export const isStringTypeOf = (value) => { return typeof value === 'string'; }; //# sourceMappingURL=isStringTypeOf.js.map