Last active
June 18, 2018 18:44
-
-
Save garmjs/de7f815fcf6131be2361727202fc5ca4 to your computer and use it in GitHub Desktop.
Syntax hilighting of tagged template literals in our JavaScript code
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 characters
function sql(strings, ...others) { | |
let out = [strings[0]]; | |
for (let i = 0; i < others.length; i++) { | |
out.push(others[i], strings[i + 1]); | |
} | |
return out.join(""); | |
} | |
// Example URL: https://marketplace.visualstudio.com/items?itemName=forbeslindesay.vscode-sql-template-literal | |
const query = sql`SELECT * FROM users`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment