
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
Zenhand parses a shorthand CSS selector like string representing an HTML element, and returns an object describing that element.
var {zenhand} = require('zenhand')
// import {zenhand} from 'zenhand' // If you're using es modules.
var obj = zenhand('div#ex.exmpl.info[style=background:red;color:black][data-name=temp]')
console.log(obj)
output:
{ tag: 'div',
attrs:
{ class: [ 'exmpl', 'info' ],
style: { background: 'red', color: 'black' },
id: 'ex',
'data-name': 'temp' } }
npm install --save zenhand
or
yarn add zenhand
str is made up of the following parts:
div.id, should only have one, duplicates will overwrite one another, can be placed anywhere in the string after the tag.class, multiples allowed, duplicates will be added to the class property, can be placed anywhere in the string after the tag.true.The module also exports two helper functions; toStyleStr and fromStyleStr.
Convert an object representation of CSS styles into a string, optionally converting property case.
var {toStyleStr, zenhand} = require('zenhand')
// Input.
var obj = {
position: 'absolute',
'backgroundColor': '#ff0000',
}
console.log(toStyleStr(obj, 'camel', 'kebab'))
// Output.
'position:absolute; background-color:#ff0000;'
Supports camel for camelCase, kebab for kebab-case, and snake for snake_case.
Convert a str representation of CSS styles into an object, optionally converting property case.
var {fromStyleStr, zenhand} = require('zenhand')
// Input.
var str = 'position:absolute; background-color:#ff0000;'
console.log(fromStyleStr(str, 'kebab', 'camel'))
// Output.
{
position: 'absolute',
'backgroundColor': '#ff0000',
}
Supports camel for camelCase, kebab for kebab-case, and snake for snake_case.
FAQs
Turn a shorthand CSS selector like HTML string into an HTML object.
The npm package zenhand receives a total of 190 weekly downloads. As such, zenhand popularity was classified as not popular.
We found that zenhand 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
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.