
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
lazy-js-utils
Advanced tools
A collection of lazy-loaded JavaScript utilities for efficient development
English | 简体中文
目前整理了200 左右的常用函数,还在持续更新中...,你的认可是对我最大的鼓励 :hearts:
ref<HTMLElement>
和 onMounted
的使用,可以 script 标签直接调用import {
insertElement,
useEventListener,
useMutationObserver,
useRaf,
} from 'lazy-js-utils'
// 监听container的变化, 你不再需要const container = ref<HTMLElement>
useMutationObserver('#container', (mutationsList, observer) => {
console.log(mutationsList)
})
// requestAnimationFrame
useRaf(
(timestamp) => {
// 每帧相隔1s执行
console.log('animationFrame', timestamp)
},
{
delta: 1000,
autoStop: true /* 只执行一次后被销毁 */
}
)
// 注册事件
useEventListener('#container', 'click', () => {
console.log('click')
})
// 插入元素
insertElement('#container', '.content')
// 删除元素
removeElement('.content')
<div id="container"></div>
<div class="content">hello world</div>
npm i lazy-js-utils // 安装
import {
deepCompare
} from 'lazy-js-utils' // 按需引入
FAQs
A collection of lazy-loaded JavaScript utilities for efficient development
The npm package lazy-js-utils receives a total of 60 weekly downloads. As such, lazy-js-utils popularity was classified as not popular.
We found that lazy-js-utils demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.