sting
Version:
Sting! Is a tiny lightweight, themable and highly customizable notification-popup.
14 lines (11 loc) • 331 B
text/typescript
export default function st(strings, ...keys) {
return (function(...values) {
var dict = values[values.length - 1] || {};
var result = [strings[0]];
keys.forEach(function(key, i) {
var value = Number.isInteger(key) ? values[key] : dict[key];
result.push(value, strings[i + 1]);
});
return result.join('');
});
}