
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
material-icon-convert
Advanced tools
A simple utility to quickly replace ligature format Material Design icons to their unicode characters.
A simple utility to quickly replace ligature format Material Design icons to their unicode characters. This allows you to develop using the legible ligature format yet deploy your code using unicode characters for support in crappy browsers Edge.
# Using npm
npm install material-icon-convert
# Using yarn
yarn add material-icon-convert
//Load the library and specify options
const convert = require('material-icon-convert');
const options = {
files: 'path/to/files/**/*.html',
className: 'material-icons',
inverse: false, //Specify true to convert from character code to ligatures
};
convert(options)
.then(changes => {
console.log('Modified files:', changes.join(', '));
})
.catch(error => {
console.error('Error occurred:', error);
});
convert(options, (error, changes) => {
if (error) {
return console.error('Error occurred:', error);
}
console.log('Modified files:', changes.join(', '));
});
try {
const changes = convert.sync(options);
console.log('Modified files:', changes.join(', '));
}
catch (error) {
console.error('Error occurred:', error);
}
The return value of the library is an array of file names of files that were modified (e.g. had some of the contents replaced). If no replacements were made, the return array will be empty.
const changes = convert.sync({
files: 'path/to/files/**/*.html',
className: 'material-design',
});
console.log(changes);
// [
// 'path/to/files/file1.html',
// 'path/to/files/file3.html',
// 'path/to/files/file5.html',
// ]
This library uses replace-in-file under the hood to make the replacements, so check out that package for more advanced usage options.
(MIT License)
Copyright 2015-2017, Adam Reis
FAQs
A simple utility to quickly replace ligature format Material Design icons to their unicode characters.
The npm package material-icon-convert receives a total of 0 weekly downloads. As such, material-icon-convert popularity was classified as not popular.
We found that material-icon-convert 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.