Skip to content

Instantly share code, notes, and snippets.

View schuchard's full-sized avatar
👨‍💻

Kevin Schuchard schuchard

👨‍💻
View GitHub Profile

Angular

styleUrls

match all @component styleUrls definitions

^(\s+styleUrls:)\s?\[[\s\S]*?\],?/gm

Keybase proof

I hereby claim:

  • I am schuchard on github.
  • I am schuchard (https://keybase.io/schuchard) on keybase.
  • I have a public key ASAKyAxL9oXXlEM6WsDgONlrKVxo0SgOe7vYokJE5wIFwQo

To claim this, I am signing this object:

{
"material": {
"t": "material",
"bg": "rgba(187,187,187,0)",
"wt": "none",
"wc": false,
"fm": "Fira Code",
"fs": "14px",
"ln": false,
"ds": true,
@schuchard
schuchard / bd3d4befe38185704bf0fc875e9deed6|configuration.json
Last active July 14, 2020 17:28
Visual Studio Code Settings Sync Gist
{"contents":{"launch":{"version":"0.2.0","configurations":[{"type":"chrome","request":"launch","name":"Launch Chrome against localhost","url":"http://localhost:4200","webRoot":"${workspaceFolder}"}]}},"overrides":[],"keys":["launch.version","launch.configurations"]}
@schuchard
schuchard / cache bust response
Created August 6, 2021 03:06
angular.io cache issue
{
"configVersion": 1,
"timestamp": 1628205974939,
"index": "/index.html",
"assetGroups": [
{
"name": "app-shell",
"installMode": "prefetch",
"updateMode": "prefetch",
"cacheQueryOptions": {
@schuchard
schuchard / recursiveFilterProp.js
Last active November 22, 2023 15:28
Recursively filter out objects that are infinitely nested and return an immutable object
// https://stackblitz.com/edit/recursive-filter-prop?file=index.ts
// perf: https://jsbench.me/8cjrlaine7/1
function flatFilter(nestedProp, compareKey, compareId, arr) {
return arr.filter(o => {
const keep = o[compareKey] != compareId;
if (keep && o[nestedProp]) {
o[nestedProp] = flatFilter(nestedProp, compareKey, compareId, o[nestedProp]);
}
return keep;