tager

0.0.3 • Public • Published

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/

Package Sidebar

Install

npm i tager

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

267 kB

Total Files

20

Last publish

Collaborators

  • ljqx