中文文档 | English Document
Allow your js functions to support implicit template string calls
npm i decode-template-string
import decode from 'decode-template-string';
const decode = require('decode-template-string');
function print(){
let str = decode(arguments)
console.log(str)
}
const print = (...args) => {
let str = decode(args)
console.log(str);
}
let name = "HMYang33";
print`My name is ${name}`;
Sub Functions
decode.check_if_calling_with_template_string
Pass Arguments, returns boolean
decode.transform_template_args_to_string
Pass Arguments, returns string