Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "maxstache", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Minimalist mustache template replacement", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -45,2 +45,12 @@ # maxstache | ||
### 25 lines is too much, make it shorter! | ||
Sure thing: | ||
```js | ||
module.exports = function maxstache (str, ctx) { | ||
return str.split(/\{\{|\}\}/).map((t, i) => !(i % 2) ? t : ctx[t]).join('') | ||
} | ||
``` | ||
:rotating_light: CODE GOLF :rotating_light: Shout out to @divinegod and | ||
@someoneweird for tinkering along on this. | ||
## License | ||
@@ -47,0 +57,0 @@ [MIT](https://tldrlegal.com/license/mit-license) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4902
68