This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

type-guard-js
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i type-guard-js

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

6.22 kB

Total Files

4

Last publish

Collaborators

  • ruihuag