groq.js 418 B

12345678910111213
  1. 'use strict';
  2. function groq(strings) {
  3. for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  4. keys[_key - 1] = arguments[_key];
  5. }
  6. const lastIndex = strings.length - 1;
  7. return strings.slice(0, lastIndex).reduce((acc, str, i) => {
  8. return acc + str + keys[i];
  9. }, "") + strings[lastIndex];
  10. }
  11. module.exports = groq;
  12. //# sourceMappingURL=groq.js.map