# globalyzer

> Detect and extract the static part of a glob string

Latest version **0.1.4** (published 2019-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install globalyzer
pnpm add globalyzer
yarn add globalyzer
bun add globalyzer
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2019-02-08 |
| First published | 2018-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/globalyzer) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Terkel Gjervig |
| Maintainers | terkelg |
| Keywords | glob, analyzer, base, detect |

## Links

- npm: https://www.npmjs.com/package/globalyzer
- Repository: https://github.com/terkelg/globalyzer
- Homepage: https://github.com/terkelg/globalyzer#readme
- Issues: https://github.com/terkelg/globalyzer/issues
- npm.io page: https://npm.io/package/globalyzer

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2019-02-08
- 0.1.0 — 2018-04-15

## README

# globalyzer [![Build Status](https://travis-ci.org/terkelg/globalyzer.svg?branch=master)](https://travis-ci.org/terkelg/globalyzer)[![Build status](https://ci.appveyor.com/api/projects/status/0xqnmxt99rsnnjqh?svg=true)](https://ci.appveyor.com/project/terkelg/globalyzer)

>  Detect and extract the static part of a glob 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`<br>
Returns: `{ base, glob, isGlob }`

Returns an object with the (non-glob) base path and the actual pattern and a is-glob flag.

#### options.strict

Type: `Boolean`<br>
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)

---
_Source: https://npm.io/package/globalyzer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
