tag2content
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "tag2content", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Replace a tag with content in a configurable way", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -60,3 +60,3 @@ # tag2content | ||
```js | ||
const text = 'I would like to go to [country name="England"] next year, with my friend [friend-name name="Lucy" to-uppercase="true"].'; | ||
const text = 'I go to [country name="England"] next year, with [friend name="Lucy" to-uppercase="true"].'; | ||
``` | ||
@@ -71,3 +71,3 @@ | ||
}, | ||
'friend-name': ({ name, toUppercase }) => { | ||
friend: ({ name, toUppercase }) => { | ||
return toUppercase ? name.toUpperCase() : name; | ||
@@ -74,0 +74,0 @@ } |
8111