Echo/node_modules/@vuepress/shared-utils/lib/ensureEndingSlash.js

7 lines
143 B
JavaScript
Raw Normal View History

2021-02-11 21:31:41 +08:00
"use strict";
module.exports = function ensureEndingSlash(path) {
return /(\.html|\/)$/.test(path)
? path
: path + '/';
};