Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ljqx/tager
A bunch of helpful tags for template strings.
https://github.com/ljqx/tager
template-literals template-string
Last synced: about 8 hours ago
JSON representation
A bunch of helpful tags for template strings.
- Host: GitHub
- URL: https://github.com/ljqx/tager
- Owner: ljqx
- License: mit
- Created: 2018-11-29T06:08:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T07:29:00.000Z (almost 6 years ago)
- Last Synced: 2024-09-27T06:13:37.124Z (about 2 months ago)
- Topics: template-literals, template-string
- Language: JavaScript
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tager
A bunch of helpful tags for [template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals).## Install
```
npm install tager
```
## API### crlf => string
```js
crlf`multi
line
string
`
// => 'multi\r\nline\r\nstring\r\n'
```
### identity => string```js
identity`${1} template string`
// => 1 template string
// same as `${1} template string`
```
### lf => string```js
lf`multi
line
string
`
// => 'multi\nline\nstring\n'
```
### lines => string[]```js
lines`multi
line
string
`;
// => ['multi', 'line', 'string', '']
```
### regexp => RegExp```js
regexp`\w+${1 + 1}*\node_modules/${'.bin'}`;
// => /\w+2*\node_modules\/.bin/
```