Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. It’s used in thousands of websites, including some of those you visit daily.
Contributeimport {DomSanitizer} from '@angular/platform-browser';
import {Pipe, PipeTransform} from '@angular/core';
import { icons } from 'feather-icons'; // v4+
@Pipe({ name: 'feather' })
export class FeatherIconsPipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) {}
transform(icon: string, size: number = 24, color: string = 'inherit') {
return this.sanitizer.bypassSecurityTrustHtml(icons[icon].toSvg({
width: size,
height: size,
color: color
}));
}
}
Prism.js is used on several websites, small and large.