
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@hc-master/white-ink
Advanced tools
根据svg和png图片,生成对应白墨颜色的数据;
npm i @hc-master/white-ink
import { whiteInkForSvg, whiteInkForPng } from '@hc-master/white-ink';
// 模块默认导出两个方法,分别处理svg与png的白墨生成
function App() {
const handleInk = async function(type:'svg'|'png') {
switch (type) {
case 'svg':
// whiteInkForSvg生成的数据为svg内容的字符串
const svgStr = await whiteInkForSvg(demoSvg)
break;
case 'png':
// whiteInkForPng生成的数据为图片base64的字符串
const base64 = await whiteInkForPng(demPng, {
// 输出格式(默认png)
suffix: 'png',
// 填充像素值时的执行回调,须返回一个rgba对象值
// @param v - 当前像素的rgb对象值
change(v) {
return { r:0,g:0,b:0,a:1 }
}
})
break;
}
}
return (
<>
<div className="card">
<button onClick={() => handleInk('svg')}>生产svg白墨</button>
<button onClick={() => handleInk('png')}>生产png白墨</button>
</div>
</>
)
}
FAQs
A processor that generates printed white ink for png and svg files
We found that @hc-master/white-ink 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
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.