0.2.2 • Published 7 years ago

template-clean v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

view on npm npm module downloads Build Status Dependency Status js-standard-style

template-clean

Template literal tag function to replace null and undefined values with an empty string.

Example

> clean = require('template-clean')
> const word = 'something'
> const nothing = null

> `a word: ${word}. Nothing: ${nothing}`
'a word: something. Nothing: null'

> clean`a word: ${word}. Nothing: ${nothing}`
'a word: something. Nothing: '

clean(strings, ...expressions) ⏏

Kind: Exported function

ParamType
stringsArray.<string>
...expressionsany

© 2015-17 Lloyd Brookes \75pound@gmail.com\. Documented by jsdoc-to-markdown.