Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
css-units-from-string
Advanced tools
Gets all occurrences of css units from a string. Supports px, mm, cm, in, pt, pc, mozmm, em, ex, ch, rem, vh, vw, vmin, vmax, %, and unitless.
Just like the name, gets all occurrences of css units from a string.
npm install css-units-from-string --save
var unitsFromString = require('css-units-from-string');
var results = unitsFromString('200px 100% 1.25 2.75em');
// results
// [
// {
// match: '200px',
// unit: 'px',
// type: 'absolute',
// value: 200,
// index: 0
// },
// {
// match: '100%',
// unit: '%',
// type: 'percentage',
// value: 100,
// index: 6
// },
// {
// match: '1.25',
// unit: null,
// type: 'unitless',
// value: 1.25,
// index: 11
// },
// {
// match: '2.75em',
// unit: 'em',
// type: 'relative',
// value: 2.75,
// index: 16
// },
// ]
npm install
npm run watch
npm run test
then go to: http://localhost:8080/webpack-dev-server
npm run build
FAQs
Gets all occurrences of css units from a string. Supports px, mm, cm, in, pt, pc, mozmm, em, ex, ch, rem, vh, vw, vmin, vmax, %, and unitless.
The npm package css-units-from-string receives a total of 0 weekly downloads. As such, css-units-from-string popularity was classified as not popular.
We found that css-units-from-string 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.