Last active
October 4, 2023 01:12
-
-
Save protomorph/06e0230691ad2a2ffed908cece6fade4 to your computer and use it in GitHub Desktop.
Revisions
-
protomorph revised this gist
Oct 4, 2023 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ import tagged from 'tagged.js' const css = tagged(function (str) { const css = new CSSStyleSheet() return css.replace(str.trim()) }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ import tagged from 'tagged.js' const html = tagged(function (str) { const fragment = document.createRange() return fragment.createContextualFragment(str.trim()) }) -
protomorph revised this gist
Oct 3, 2023 . 3 changed files with 15 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ import tagged from 'tagged.js' const css = tagged(str => { const css = new CSSStyleSheet() return css.replace(str.trim()) }) export default css This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import tagged from 'tagged.js' const html = tagged(str => { const fragment = document.createRange() This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // https://github.com/ryanmorr/tagged export default function tagged (callback, mutator = val => val) { return (strings, ...values) => callback( strings.raw.reduce((acc, str, i) => acc + (mutator(values[i - 1])) + str) ) } -
protomorph revised this gist
Oct 3, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,3 +5,5 @@ const html = tagged(str => { const fragment = document.createRange() return fragment.createContextualFragment(str.trim()) }) export default html -
protomorph created this gist
May 12, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ impprt tagged from 'tagged.js' const html = tagged(str => { const fragment = document.createRange() return fragment.createContextualFragment(str.trim()) }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ // https://github.com/ryanmorr/tagged const tagged = (callback, mutator = (val) => val) => (strings, ...values) => callback( strings.raw.reduce((acc, str, i) => acc + (mutator(values[i - 1])) + str) ) export default tagged