New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

is-assert

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-assert

Type check and assert

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

is-assert

Type check and assert

类型检查和断言

Install

$ npm install is-assert

# OR

$ yarn add is-assert

Usage

import { assert, isNum, isStr } from 'is-assert'

function demo(name, value) {
  assert(isStr(name, true), 'name 必须为字符串。')
  assert(isNum(value), 'value 必须为数字。')
  // ...
}
import { assertVar } from 'is-assert'

function demo2(name, value) {
  assertVar(name).isStr(true)
  assertVar(value).isNum()
  // ...
}

Keywords

is

FAQs

Package last updated on 04 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts