![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
varname
Advanced tools
Readme
Convert strings between different variable naming formats.
This library requires the following to run:
Install with npm:
npm install varname
Load the library into your code with a require
call:
const varname = require('varname');
Convert a variable name to camelBack format (capitalize the first letter of all but the first word).
name: (string) The variable name to convert.
return: (string) Returns the converted variable name.
varname.camelback('foo_bar_baz'); // 'fooBarBaz'
Convert a variable name to CamelCase format (capitalize the first letter of each word).
name: (string) The variable name to convert.
return: (string) Returns the converted variable name.
varname.camelcase('foo_bar_baz'); // 'FooBarBaz'
Convert a variable name to dash format.
name: (string) The variable name to convert.
return: (string) Returns the converted variable name.
varname.dash('FooBarBaz'); // 'foo-bar-baz'
Convert a variable name to underscore format.
name: (string) The variable name to convert.
return: (string) Returns the converted variable name.
varname.underscore('FooBarBaz'); // 'foo_bar_baz'
Split a string into separate variable parts. This allows you to write your own format converters easily.
name: (string) The variable name to split.
return: (array) Returns an array of parts.
varname.split('fooBarBaz');
varname.split('FooBarBaz');
varname.split('FOOBarBAZ');
varname.split('foo-bar-baz');
varname.split('foo_bar_baz');
varname.split('♥~foo|bar|baz~♥');
// all return ['foo', 'bar', 'baz']
The contributing guide is available here. All contributors must follow this library's code of conduct.
Licensed under the MIT license.
Copyright © 2015, Rowan Manning
FAQs
Unknown package
The npm package varname receives a total of 21,373 weekly downloads. As such, varname popularity was classified as popular.
We found that varname demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.