开源项目 `is` 使用教程

开源项目 is 使用教程

isType check values项目地址:https://gitcode.com/gh_mirrors/is1/is

1. 项目的目录结构及介绍

is/
├── index.d.ts
├── index.js
├── license
├── package.json
├── readme.md
└── source/
    ├── array.js
    ├── async-function.js
    ├── browser.js
    ├── date.js
    ├── dom-element.js
    ├── empty.js
    ├── error.js
    ├── function.js
    ├── generator-function.js
    ├── map.js
    ├── null.js
    ├── number.js
    ├── object.js
    ├── promise.js
    ├── regex-pattern.js
    ├── set.js
    ├── string.js
    ├── symbol.js
    ├── undefined.js
    ├── weak-map.js
    └── weak-set.js

目录结构介绍

  • index.d.tsindex.js:项目的入口文件。
  • license:项目的许可证文件。
  • package.json:项目的依赖和配置文件。
  • readme.md:项目的说明文档。
  • source/:包含项目的各个功能模块文件。

2. 项目的启动文件介绍

项目的启动文件是 index.js,它导入了 source 目录下的各个模块,并提供了统一的接口供外部调用。

// index.js
module.exports = require('./source/index.js');

3. 项目的配置文件介绍

项目的配置文件是 package.json,它包含了项目的基本信息、依赖、脚本等。

{
  "name": "is",
  "version": "4.0.0",
  "description": "Type check values",
  "license": "MIT",
  "repository": "sindresorhus/is",
  "funding": "https://github.com/sponsors/sindresorhus",
  "author": {
    "name": "Sindre Sorhus",
    "email": "sindresorhus@gmail.com",
    "url": "sindresorhus.com"
  },
  "engines": {
    "node": ">=8"
  },
  "scripts": {
    "test": "xo && ava"
  },
  "files": [
    "index.js",
    "index.d.ts",
    "source"
  ],
  "keywords": [
    "is",
    "type",
    "check",
    "checking",
    "typeof",
    "instance",
    "instanceof",
    "test",
    "util",
    "utility",
    "utilities",
    "assert",
    "validate",
    "validation",
    "validator",
    "valid",
    "detect",
    "kind",
    "primitive",
    "object",
    "function",
    "array",
    "string",
    "number",
    "boolean",
    "regexp",
    "regex",
    "date",
    "error",
    "symbol",
    "undefined",
    "null",
    "nan",
    "finite",
    "map",
    "set",
    "weakmap",
    "weakset",
    "promise",
    "generator",
    "async",
    "await",
    "class",
    "instanceof",
    "plain",
    "object",
    "iterable",
    "native",
    "buffer",
    "stream",
    "browser",
    "browser",
    "env",
    "environment",
    "dom",
    "element",
    "document",
    "node",
    "module",
    "es",
    "es6",
    "es2015",
    "es2017",
    "esnext",
    "typescript",
    "ts",
    "flow",
    "flowtype"
  ],
  "dependencies": {
    "type-fest": "^0.10.0"
  },
  "devDependencies": {
    "ava": "^2.4.0",
    "xo": "^0.25.3"
  }
}

配置文件介绍

  • name

isType check values项目地址:https://gitcode.com/gh_mirrors/is1/is

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计蕴斯Lowell

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值