blog/themes/cmd/scripts/range.js

5 lines
162 B
JavaScript
Raw Normal View History

2020-12-27 13:17:29 +00:00
hexo.extend.helper.register("range", function(start, stop, step){
return Array.from({ length: (stop - start) / step + 1}, (_, i) => start + (i * step));
});