Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
material-icon-convert
Advanced tools
Readme
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.
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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.