@kne/ensure-slash

0.1.0 • Public • Published

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/

Readme

Keywords

Package Sidebar

Install

npm i @kne/ensure-slash

Weekly Downloads

56

Version

0.1.0

License

ISC

Unpacked Size

7.34 kB

Total Files

11

Last publish

Collaborators

  • metacoo
  • yangwang123456
  • juliewang
  • lingtong