Comparing version 1.1.2 to 1.1.3
@@ -0,1 +1,17 @@ | ||
<a name="1.1.3"></a> | ||
## [1.1.3](https://github.com/poppinss/edge/compare/v1.1.2...v1.1.3) (2017-11-27) | ||
### Bug Fixes | ||
* **include:** allow callExpression inside include ([cbbe629](https://github.com/poppinss/edge/commit/cbbe629)) | ||
* **ReDoS:** Regular Expression Denial of Service (#7) ([39777cc](https://github.com/poppinss/edge/commit/39777cc)) | ||
### Features | ||
* **edge:** add edge.new method to newup isolated template ([5db5710](https://github.com/poppinss/edge/commit/5db5710)) | ||
* **globals:** add orderBy method ([6ad7190](https://github.com/poppinss/edge/commit/6ad7190)) | ||
<a name="1.1.2"></a> | ||
@@ -2,0 +18,0 @@ ## [1.1.2](https://github.com/poppinss/edge/compare/v1.1.1...v1.1.2) (2017-10-29) |
{ | ||
"name": "edge.js", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Node.js logical templating engine with fresh air", | ||
@@ -27,3 +27,3 @@ "main": "index.js", | ||
"nunjucks": "^3.0.1", | ||
"nyc": "^11.2.1", | ||
"nyc": "^11.3.0", | ||
"semver": "^5.4.1", | ||
@@ -49,2 +49,2 @@ "standard": "^10.0.3", | ||
} | ||
} | ||
} |
@@ -55,3 +55,3 @@ 'use strict' | ||
* | ||
* @return {Object} | ||
* @return {Template} | ||
* | ||
@@ -67,2 +67,13 @@ * @private | ||
/** | ||
* Returns a fresh instance of template | ||
* | ||
* @method new | ||
* | ||
* @returns {Template} | ||
*/ | ||
new () { | ||
return this._getTemplate() | ||
} | ||
/** | ||
* Registers a new tag. A tag must have following | ||
@@ -169,3 +180,3 @@ * attributes. | ||
renderString (...args) { | ||
return this._getTemplate().renderString(...args) | ||
return this.new().renderString(...args) | ||
} | ||
@@ -177,3 +188,3 @@ | ||
compileString (...args) { | ||
return this._getTemplate().compileString(...args) | ||
return this.new().compileString(...args) | ||
} | ||
@@ -185,3 +196,3 @@ | ||
render (view, ...args) { | ||
return this._getTemplate().render(view, ...args) | ||
return this.new().render(view, ...args) | ||
} | ||
@@ -193,3 +204,3 @@ | ||
compile (view, ...args) { | ||
return this._getTemplate().compile(view, ...args) | ||
return this.new().compile(view, ...args) | ||
} | ||
@@ -201,3 +212,3 @@ | ||
presenter (...args) { | ||
return this._getTemplate().presenter(...args) | ||
return this.new().presenter(...args) | ||
} | ||
@@ -209,3 +220,3 @@ | ||
share (...args) { | ||
return this._getTemplate().share(...args) | ||
return this.new().share(...args) | ||
} | ||
@@ -212,0 +223,0 @@ } |
@@ -292,2 +292,15 @@ 'use strict' | ||
/** | ||
* Order an array using a given property. | ||
* | ||
* @method orderBy | ||
* | ||
* @param {Array} collection | ||
* @param {String|Array} property | ||
* @param {String|Array} order | ||
*/ | ||
const orderBy = function (collection, property, order) { | ||
return _.orderBy(collection, property, order) | ||
} | ||
module.exports = { | ||
@@ -311,3 +324,4 @@ range, | ||
toAnchor, | ||
urlEncode | ||
urlEncode, | ||
orderBy | ||
} |
@@ -55,3 +55,3 @@ 'use strict' | ||
get allowedExpressions () { | ||
return ['Literal', 'Identifier', 'MemberExpression'] | ||
return ['Literal', 'Identifier', 'MemberExpression', 'CallExpression'] | ||
} | ||
@@ -58,0 +58,0 @@ |
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
547490
5781
91