Socket
Socket
Sign inDemoInstall

globalyzer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globalyzer

Detect and extract the static part of a glob string


Version published
Weekly downloads
1.5M
increased by0.27%
Maintainers
1
Weekly downloads
 
Created
Source

globalyzer Build StatusBuild status

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

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 and a is-glob flag.

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 and glob-base

License

MIT © Terkel Gjervig

Keywords

FAQs

Package last updated on 08 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc