
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@ttw_xing/com_utils
Advanced tools
业务工具函数库, 提供常用的函数集合
snpm install @ttw_xing/com_utils
# OR 设置 registry=http://snpm-registry.sto.cn
# use npm
npm i @ttw_xing/com_utils
# use yarn
yarn add @ttw_xing/com_utils
import * as S from '@ttw_xing/com_utils';
const { example, formatNumber } = S;
或者
import { example, formatNumber } from '@ttw_xing/com_utils';
即使利用解构赋值也会引入整个库,未用到的函数会占用额外的体积
import example from '@ttw_xing/com_utils/lib/example';
import formatNumber from '@ttw_xing/com_utils/lib/formatNumber';
手动引入比较麻烦,建议使用下面的方法
import { example, formatNumber } from '@ttw_xing/com_utils';
经过打包前 babel 的编译,上面的代码会变为
import example from '@ttw_xing/com_utils/lib/example';
import formatNumber from '@ttw_xing/com_utils/lib/formatNumber';
对应 babel
配置:
{
"plugins": [
["import",
{
"libraryName": "@ttw_xing/com_utils"
}
]
],
}
FAQs
We found that @ttw_xing/com_utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.