Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mat-icon-import
Advanced tools
Include only used material icons in SVG format and reduce package size
npm i mat-icon-import
#or
yarn add mat-icon-import
At first download the icons you need from here in SVG 24px format (default). The icon names are of type baseline-[key]-24px.svg
. You will have to use the key
when importing this lib.
Import the IconImportModule
in your application module and call the forRoot()
function with two parameters. At first the array of icon keys, e.g. (account_circle, add or whatever you want). The secont parameter is the path where you store the icons in your assets folder.
import { IconImportModule } from 'mat-icon-import';
@NgModule({
imports: [ IconsModule.forRoot(['account_circle'], './assets/mat-icons') ]
})
export class AppModule {}
Register the icons where you need them. E.g. in the AppComponent
to make it available in the complete application.
import { IconImportService } from 'mat-icon-import';
@Component({
...
})
export class AppComponent {
constructor (private iconService: IconImportService) {
this.iconService.register();
}
}
Use the registered icons with
<mat-icon svgIcon="account_circle"></mat-icon>
Don't forget to include the MatIconModule
from @angular/material
.
FAQs
Include only used material icons in SVG format and reduce package size
The npm package mat-icon-import receives a total of 32 weekly downloads. As such, mat-icon-import popularity was classified as not popular.
We found that mat-icon-import 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.