0.1.0 • Published 1 year ago

type-guard-js v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

type-guard-js

类型守卫

用法

import { StringGuard } from 'type-guard-js'

const val = 'aString'

const value = StringGuard(val)

描述

*Guard(value:unknown[, defaultValue])

  • value: 代守卫参数
  • defaultValue: 拦截后返回的默认值

方法

  • StringGuard
  • NumberGuard
  • BooleanGuard
  • ObjectGuard
0.1.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago