mm_tpl 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/hook.js +2 -2
  2. package/package.json +1 -1
package/hook.js CHANGED
@@ -77,7 +77,7 @@ Hook.prototype.addFunc = function (name, func, sort = 100, alias = "") {
77
77
  * @param {string} alias - 函数别名
78
78
  * @returns {string} 函数别名
79
79
  */
80
- Hook.prototype.addAction = function (name, func, sort, alias) {
80
+ Hook.prototype.addAction = function (name, func, sort = 100, alias = "") {
81
81
  alias = this._getName(func, alias);
82
82
  var obj = {
83
83
  func,
@@ -98,7 +98,7 @@ Hook.prototype.addAction = function (name, func, sort, alias) {
98
98
  * @param {string} alias - 函数别名
99
99
  * @returns {string} 函数别名
100
100
  */
101
- Hook.prototype.addFilter = function (name, func, sort, alias) {
101
+ Hook.prototype.addFilter = function (name, func, sort = 100, alias = "") {
102
102
  alias = this._getName(func, alias);
103
103
  var obj = {
104
104
  func,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_tpl",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "Super Meimei Template Engine - High-performance template engine based on art-template with MVC pattern, hook system, theme switching and caching mechanism",
5
5
  "main": "index.js",
6
6
  "scripts": {