ES6 tagged templates practical usability
You can use tagged templates to build APIs that are more expressive than regular function calls. For example, I’m working on a proof-of-concept library for SQL queries on JS arrays: let admins = sql`SELECT name, id FROM ${users} WHERE ${user => user.roles.indexOf(‘admin’) >= 0}` Notice it has nothing to do with String interpolation; it uses … Read more