0.0.3 • Published 5 years ago

tager v0.0.3

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

Tager

A bunch of helpful tags for template strings.

Install

npm install tager

API

crlf => string

crlf`multi
line
string
`
// => 'multi\r\nline\r\nstring\r\n'

identity => string

identity`${1} template string`
// => 1 template string
// same as `${1} template string`

lf => string

lf`multi
line
string
`
// => 'multi\nline\nstring\n'

lines => string[]

lines`multi
line
string
`;
// => ['multi', 'line', 'string', '']

regexp => RegExp

regexp`\w+${1 + 1}*\node_modules/${'.bin'}`;
// => /\w+2*\node_modules\/.bin/