Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/ai/convert-layout
A JavaScript library to convert text from one keyboard layout to other.
Useful to prevent errors on english-only fields, like a credit card owner field.
var ru = require('convert-layout/ru');
bankcardName.keyup(function () {
bankcardName.value = ru.toEn(bankcardName.value);
});
There are two ways to load a keyboard layout definition. If you plan on using a single layout, just load the file directly:
var ru = require('convert-layout/ru');
Also you can get a object with all layouts (but app size will be bigger):
var layouts = require('convert-layout');
layout = layouts[name];
Every layout has fromEn
and toEn
methods:
ru.toEn('руддщ') //=> "hello"
ru.fromEn('ghbdtn') //=> "привет"
Currently supported keyboard layouts:
If you want to add a new keyboard layout definition:
CODE.json
file with layout buttons map. See example in ru.json
.
Lower case letters will be converted to upper case automatically.
However, all non-letters symbols should be added both
in uppercase and lowercase.yarn test
. Project will be built automatically.FAQs
Unknown package
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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.