@kne/ensure-slash
v0.1.0
Published
确保结尾斜线
Downloads
290
Keywords
Readme
useCallbackState
确保结尾斜线
npm i @kne/ensure-slash
使用说明
import ensureSlash from '@kne/ensure-slash';
console.log(ensureSlash('/a/b')); //=> /a/b
console.log(ensureSlash('/a/b/')); //=> /a/b
console.log(ensureSlash('/a/b',true)); //=> /a/b/
console.log(ensureSlash('/a/b/',true)); //=> /a/b/