tobe-utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

ToBe-Utils

前端工具库,收集整理日常开发过程中的通用 utils 。

安装

$ npm install --save tobe-utils
# or
$ yarn add tobe-utils
# or
$ pnpm add tobe-utils
# or
$ bun add tobe-utils

使用

使用 ESModule 规范导入

import { isEmpty } from '@tobe-utils';
console.log(isEmpty([])) // 输出 true
console.log(isEmpty([1])) // 输出 false

使用 CommonJS 规范导入

const { isEmpty } from require('@tobe-utils');
console.log(isEmpty([])) // 输出 true
console.log(isEmpty([1])) // 输出 false

在浏览器中使用

如果直接在浏览器中使用,则不需要包管理。直接下载 tag 中的最新版本 index.umd.js,使用的是 UMD 通用模块规范。

然后在浏览器中引用:

<script src="./index.umd.js"></script>
<script>
    $utils.isNull(null) // output: true
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i tobe-utils

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

10.3 kB

Total Files

7

Last publish

Collaborators

  • chasewindyoungs