web3-vue-demo
Version:
Wei Design - A Vue.js 3 UI library, web3-vue-demo
17 lines (13 loc) • 609 B
text/typescript
export const isFunction = (val: any) => typeof val === 'function'
export const isArray = Array.isArray
export const isString = (val: any) => typeof val === 'string'
export const isSymbol = (val: any) => typeof val === 'symbol'
export const isObject = (val: any) => val !== null && typeof val === 'object'
export const guid = () => {
const s4 = () =>
Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1)
return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`
}
// export { isOn, cacheStringFunction, camelize, hyphenate, capitalize };