Comparing version
@@ -5,6 +5,7 @@ // doT.js | ||
(function() { | ||
(function () { | ||
"use strict"; | ||
var doT = { | ||
name: "doT", | ||
version: "1.1.1", | ||
@@ -77,3 +78,3 @@ templateSettings: { | ||
if (def[d] && def[d].arg && param) { | ||
var rw = (d+":"+param).replace(/'|\\/g, "_"); | ||
var rw = unescape((d+":"+param).replace(/'|\\/g, "_")); | ||
def.__exp = def.__exp || {}; | ||
@@ -80,0 +81,0 @@ def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2"); |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "1.1.1", | ||
"version": "2.0.0-beta.0", | ||
"main": "index", | ||
@@ -13,0 +13,0 @@ "bin": { |
@@ -9,3 +9,3 @@ # doT | ||
[](https://www.npmjs.com/package/dot) | ||
[](https://coveralls.io/github/olado/doT?branch=master) | ||
[](https://coveralls.io/github/olado/doT?branch=master) | ||
@@ -12,0 +12,0 @@ |
@@ -22,2 +22,11 @@ 'use strict'; | ||
}); | ||
it('should render define multiline params', function(){ | ||
testDef('{{##def.tmp:data:{{=data.openTag}}{{!data.foo}}{{=data.closeTag}}#}}\n' + | ||
'{{# def.tmp:{\n' + | ||
' foo: it.foo,\n' + | ||
' openTag: "<div>",\n' + | ||
' closeTag: "</div>"\n' + | ||
'} }}'); | ||
}); | ||
}); | ||
@@ -24,0 +33,0 @@ |
@@ -12,2 +12,8 @@ 'use strict'; | ||
describe('.name', function (){ | ||
it('should have a name', function(){ | ||
assert.strictEqual(doT.name, 'doT'); | ||
}); | ||
}); | ||
describe('#template()', function(){ | ||
@@ -14,0 +20,0 @@ it('should return a function', function(){ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1522
0.86%67376
-4.06%37
-2.63%1
Infinity%