Skip to content

Instantly share code, notes, and snippets.

View dfa1234's full-sized avatar

David Faure dfa1234

  • NDA
  • Israel
  • 03:09 (UTC +03:00)
View GitHub Profile
// Simple node file to remove fill attribute from svg (for using in angular, mat icon, or other...)
// External libraries needed: "xmldoc": "^1.1.2"
const fs = require('fs');
const xmldoc = require('xmldoc');
const removeFillAttrRecursively = (node)=> {
if(node?.attr?.fill){
delete node.attr.fill;
}
/**
* Better DateTimeFormatOptions types
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat for representation details
*/
export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {
localeMatcher?: 'best fit' | 'lookup';
weekday?: 'long' | 'short' | 'narrow';
era?: 'long' | 'short' | 'narrow';
year?: 'numeric' | '2-digit';
@dfa1234
dfa1234 / npx command to run angular cli
Created May 13, 2024 11:37 — forked from ddieppa/npx command to run angular cli
This is the npx command to run angular cli new project without install it globally
npx -p @angular/cli ng new hello-world-project
then locally can run
npx ng g c hello-world-component