1.0.3 • Published 9 years ago
taghelper v1.0.3
taghelper
Helper functions for creating template literal tags.
Install
npm install --save taghelperAPI
merge
Merges template strings and values arrays into one.
Arguments:
strings : TemplateStringsArray— template strings.rest : any[]— template values.options : IMergeOptions = {}— options.
Returns: any[] — two arrays merged into one.
join
Joins both template strings and values into one string.
Arguments:
strings : TemplateStringsArray— template strings.rest : any[]— template values.options : IMergeOptions = {}— options formergefunction. NB:stringifyoption is useless here.
Returns: string — resulting string.
taglike
Returns true, if it looks like supplied parameters
are template strings and values arrays.
Arguments:
strings : TemplateStringsArray— template strings.rest : any[]— template values.
Returns: boolean.
IMergeOptions
stringify : boolean = false— iftrue, template values will be converted to strings.raw : boolean = false— iftrue, raw values of strings will be used.
License
MIT