
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
general-js-utils
Advanced tools
平时写js的时候老用到的一些常用的函数,封装起来。
npm i general-js-utils
var utils = require('general-js-utils');
var rand = utils.random(1,10);
var {random} = require('general-js-utils');
var rand = random(1,10)
import {random} from 'general-js-utils';
const random = random(1,10);
输出当前的unix时间戳,以s为单位
生成随机数
生成len位数的随机数字,默认是4位数字
判断是否是对象类型
判断对象是否为空,如果传入不是对象返回false
将数组unique化,比如输入[1,1,1,2,2,2,3,3,3]
,返回的是[1,2,3]
//todo 待补充
FAQs
some general js utils
We found that general-js-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.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.