UNPKG

object-placeholder

Version:

It's a zero-dependency package that exports default function: ```text placeholder(<template>, <data>, <options>) ``` and function with named params: ```text placeholder.replace({ template, data, options }) ``` where: - `template` - some template ( [string

11 lines (9 loc) 255 B
module.exports = isTemplateString /** * Figure out if the string is a template * @param {String} template The string * @return {Boolean} */ function isTemplateString (template) { return (typeof template === 'string' && template.includes('{{')) }