
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
parse-packagejson-name
Advanced tools
Parse an npm package name and returns some mildly interesting details about it
A very simple package to parse an npm package name and return some mildly interesting details about the name. It gives you back the following properties:
@foo/blip.blop
's scope is 'foo'
@foo/blip.blop
's fullName is 'blip.blop'
.
character in the fullName, then this can denote the module is part of a larger project, for example lodash
has modules like lodash.pluck
. Given the @foo/blip.blop
example, projectName would be 'blip'
@foo/blip.blop
, moduleName would be 'blop'
.var parsePackageJsonName = require('parsePackageJsonName');
parsePackageJsonName('@foo/blip.blop').should.deep.equal({
scope: 'foo',
fullName: 'blip.blop',
projectName: 'blip',
moduleName: 'blop',
});
parsePackageJsonName('blip.blop').should.deep.equal({
scope: null,
fullName: 'blip.blop',
projectName: 'blip',
moduleName: 'blop',
});
parsePackageJsonName('blop').should.deep.equal({
scope: null,
fullName: 'blop',
projectName: null,
moduleName: 'blop',
});
parsePackageJsonName(require('lodash.pluck/package.json')).should.deep.equal({
scope: null,
fullName: 'lodash.pluck',
projectName: 'lodash',
moduleName: 'pluck',
});
FAQs
Parse an npm package name and returns some mildly interesting details about it
The npm package parse-packagejson-name receives a total of 22,537 weekly downloads. As such, parse-packagejson-name popularity was classified as popular.
We found that parse-packagejson-name 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
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.