blog/themes/cmd/scripts/range.js
2020-12-27 21:17:29 +08:00

4 lines
162 B
JavaScript

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