Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bnfe/common-utils

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bnfe/common-utils

common-utils

  • 1.2.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

@bnfe/common-utils

这是一个通用的utils包 你可以在任何能运行javascript的地方使用

安装

pnpm install @bnfe/common-utils -S

使用

1. 在 Vue/React 中使用

import { getType } from "@bnfe/common-utils";

const type = getType("str");

console.log(type); // -> string

2. 在 h5 / browser 中使用

复制dist文件夹下的common-utils.umd.js文件 引入现有的项目中

<script src="./script/common-utils.umd.js"></script>

<script>
  const { getType } = utilsCommon

  const type = getType('str')

  const type = getType('str')

  console.log(type) // -> string
</script>

3. 在 node 中使用


3.1 ESM模块规范
import { getType } from "@bnfe/common-utils";
3.2 CJS模块规范
const { getType } = require("@bnfe/common-utils");

FAQs

Package last updated on 21 Nov 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc