@jswork/ext3path
v1.0.1
Published
Extracts first, mid (array), and last segments from a file path, enabling swift parsing with support for array mid-sections.
Downloads
4
Readme
ext3path
Extracts first, mid (array), and last segments from a file path, enabling swift parsing with support for array mid-sections.
installation
npm install @jswork/ext3path
usage
import ext3path from '@jswork/ext3path';
const workpath = 'wxcomponents/antui/lib/tag/index';
const res = ext3path(workpath);
// res -> ["wxcomponents", "antui/lib/tag", "index"]
license
Code released under the MIT license.