云盘
志元云盘
备份云盘
Home
/
志元云盘
/
webdav
/
sync
/
react
/
cockpit-profinet
/
node_modules
/
globalyzer
File
OriginalPic
Thumbnails
CopyAllDownloadUrl
EditTime
Size
src
2025-08-13 19:55:01
8.64 KB
license
2025-08-08 09:44:28
1.05 KB
package.json
2025-08-08 09:44:28
521 B
readme.md
2025-08-08 09:44:28
966 B
# globalyzer > Detect and extract the glob part of a string Utility to detect if a string contains a glob and then split it in a glob and none-glob part. ## Install ``` npm install globalyzer --save ``` ## Usage ```js const globalyzer = require('globalyzer'); globalyzer('foo/bar/.git/'); // => { base: 'foo/bar/.git/', glob: '', isGlob: false } globalyzer('foo/bar/**/baz'); // => { base: 'foo/bar', glob: '**/baz', isGlob: true } ``` ## API ### globalyzer(glob, options) Type: `function`
Returns: `{ base, glob, isGlob }` Returns an object with the (non-glob) base path and the actual pattern. #### options.strict Type: `Boolean`
Default: `true` Be strict about what's a glob and what's not #### glob Type: `String` Glob string to analyze. ## Credit This is a fork of [is-glob](https://github.com/micromatch/is-glob) and [glob-base](https://github.com/micromatch/glob-base) ## License MIT © [Terkel Gjervig](https://terkel.com)
2025-08-30 06:55:05 Saturday 216.73.216.107 Runningtime:0.013s Mem:1.48 MB