1.0.3 • Published 11 months ago

@jswork/path2modname v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

path2modname

Path to module name.

version license size download

installation

npm install @jswork/path2modname

usage

import path2modname from '@jswork/path2modname';

const path1 = 'features.user-center.profile';
const path2 = 'features.profile';
const path3 = 'features.user-center';

console.log(path2modname(path1)); // 'features.userCenterProfile'
console.log(path2modname(path2)); // 'features.profile'
console.log(path2modname(path3)); // 'features.userCenter'

license

Code released under the MIT license.

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago