Skip to content

Commit

Permalink
added the "join" filter
Browse files Browse the repository at this point in the history
  • Loading branch information
smnh committed Dec 28, 2020
1 parent 567b7a1 commit caefa0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
sliceArray,
sortArray,
split,
join,
append,
replaceRegexp,
startsWith,
Expand Down Expand Up @@ -54,6 +55,10 @@ function split(str, separator) {
return _.split(str, separator);
}

function join(str, separator) {
return _.join(str, separator);
}

function append(str, appendStr) {
return str + appendStr;
}
Expand Down
1 change: 1 addition & 0 deletions src/unibit.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ module.exports = class Unibit {
this.env.addFilter('slice_array', filters.sliceArray);
this.env.addFilter('sort_array', filters.sortArray);
this.env.addFilter('split', filters.split);
this.env.addFilter('join', filters.join);
this.env.addFilter('markdownify', this.markdownify.bind(this, site));
this.env.addFilter('append', filters.append);
this.env.addFilter('replace_regexp', filters.replaceRegexp);
Expand Down

0 comments on commit caefa0f

Please sign in to comment.