0.1.0 • Published 2 years ago

type-guard-js v0.1.0

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

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago