This commit is contained in:
harttle
2019-01-21 14:54:07 +08:00
parent 4793a83bd6
commit 9ba352ef04
8 changed files with 14 additions and 12 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
/* /*
* [email protected].0, https://github.com/harttle/liquidjs * [email protected].1, https://github.com/harttle/liquidjs
* (c) 2016-2019 harttle * (c) 2016-2019 harttle
* Released under the MIT License. * Released under the MIT License.
*/ */
@@ -3233,7 +3233,7 @@ var filters = {
return Math.floor(v); return Math.floor(v);
}, },
'join': function join(v, arg) { 'join': function join(v, arg) {
return v.join(arg); return v.join(arg === undefined ? ' ' : arg);
}, },
'last': function last$$1(v) { 'last': function last$$1(v) {
return last(v); return last(v);
@@ -3287,7 +3287,8 @@ var filters = {
return v.length; return v.length;
}, },
'slice': function slice(v, begin, length) { 'slice': function slice(v, begin, length) {
return v.substr(begin, length === undefined ? 1 : length); if (length === undefined) length = 1;
return v.slice(begin, begin + length);
}, },
'sort': function sort(v, arg) { 'sort': function sort(v, arg) {
return v.sort(arg); return v.sort(arg);
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -1,5 +1,5 @@
/* /*
* liquidjs@6.2.0, https://github.com/harttle/liquidjs * liquidjs@6.2.1, https://github.com/harttle/liquidjs
* (c) 2016-2019 harttle * (c) 2016-2019 harttle
* Released under the MIT License. * Released under the MIT License.
*/ */
@@ -3179,7 +3179,7 @@
return Math.floor(v); return Math.floor(v);
}, },
'join': function join(v, arg) { 'join': function join(v, arg) {
return v.join(arg); return v.join(arg === undefined ? ' ' : arg);
}, },
'last': function last$$1(v) { 'last': function last$$1(v) {
return last(v); return last(v);
@@ -3233,7 +3233,8 @@
return v.length; return v.length;
}, },
'slice': function slice(v, begin, length) { 'slice': function slice(v, begin, length) {
return v.substr(begin, length === undefined ? 1 : length); if (length === undefined) length = 1;
return v.slice(begin, begin + length);
}, },
'sort': function sort(v, arg) { 'sort': function sort(v, arg) {
return v.sort(arg); return v.sort(arg);
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "liquidjs", "name": "liquidjs",
"version": "6.2.0", "version": "6.2.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "liquidjs", "name": "liquidjs",
"version": "6.2.0", "version": "6.2.1",
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.", "description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
"main": "dist/liquid.common.js", "main": "dist/liquid.common.js",
"module": "src/index.js", "module": "src/index.js",