
Research
/Security News
Laravel Lang Compromised with RCE Backdoor Across 700+ Versions
Laravel Lang packages were compromised with an RCE backdoor across hundreds of versions, exposing cloud, CI/CD, and developer secrets.
@baiwusanyu/utils-com
Advanced tools
根据下载链接下载文件
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| url | string | - | 下载链接 |
基于 hash-sum 生成一个随机哈希
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| id | string \ number | (new Date()).getTime().toString() | 生成hash 的 id |
| prefix | string | '' | 自定义前缀 |
| suffix | string | '' | 自定义后缀 |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | string | 生成的哈希结果 |
防抖函数返回一个新的函数,这个新函数会在 wait 时间内被连续调用时,
会取消上一次调用并重新开始等待 wait 时间。
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| func | T extends (...args: any[]) => any | - | 需要进行防抖的函数 |
| wait | number | '' | 等待时间(毫秒),即在该时间内没有新的调用时才会真正地执行 func |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| debounceFn | (...args: Parameters<T>) => void | 防抖函数 |
节流函数返回一个新的函数,这个新函数会在 wait 时间内被连续调用时,
只会执行第一次调用,并在 wait 时间后才能再次执行。
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| func | T extends (...args: any[]) => any | - | 需要进行节流的函数 |
| wait | number | '' | 等待时间(毫秒),即在该时间内只能执行一次 func |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| throttleFn | (...args: Parameters<T>) => void | 节流函数 |
将字符串复制到粘贴板
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| content | string | - | 复制内容 |
| resolve | () => void | - | 调用成功回调 |
| err | (err: any) => void | - | 调用错误回调 |
基于 sessionStorage 的缓存函数
存储缓存
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| key | string | - | key |
| value | string | - | 值 |
获取缓存
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| key | string | - | key |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | string | 缓存数据 |
以对象格式存储缓存
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| key | string | - | key |
| value | any | - | 值 |
以对象格式获取缓存
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| key | string | - | key |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | any | 缓存数据 |
移除缓存
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| key | string | - | key |
基于 localStorage 的缓存函数, 函数与 sessionCache 相同
FAQs
## Function
The npm package @baiwusanyu/utils-com receives a total of 361 weekly downloads. As such, @baiwusanyu/utils-com popularity was classified as not popular.
We found that @baiwusanyu/utils-com 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.

Research
/Security News
Laravel Lang packages were compromised with an RCE backdoor across hundreds of versions, exposing cloud, CI/CD, and developer secrets.

Security News
Socket found a malicious postinstall hook across 700+ GitHub repos, including PHP packages on Packagist and Node.js project repositories.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain