Socket
Socket
Sign inDemoInstall

@gulpjs/to-absolute-glob

Package Overview
Dependencies
1
Maintainers
10
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @gulpjs/to-absolute-glob

Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.


Version published
Weekly downloads
256K
decreased by-15.47%
Maintainers
10
Install size
12.4 kB
Created
Weekly downloads
 

Changelog

Source

4.0.0 (2023-01-03)

⚠ BREAKING CHANGES

  • Normalize repository, dropping node <10.13 support
  • Rename package

Bug Fixes

  • Check negative patterns before trimming (#1) (1faa5dc)
  • Ensure glob-like characters are escaped in cwd & root options (1289c1b)
  • Resolve ../ at the beginning of globs (#2) (1752090)

Miscellaneous Chores

  • Normalize repository, dropping node <10.13 support (9840375)
  • Rename package (9da4059)

Readme

Source

@gulpjs/to-absolute-glob

NPM version Downloads Build Status Coveralls Status

Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.

Usage

var toAbsoluteGlob = require('@gulpjs/to-absolute-glob');

// All these assume your cwd is `/dev/foo/`

toAbsoluteGlob('a/*.js') === '/dev/foo/a/*.js';

// Makes a path absolute
toAbsoluteGlob('a') === '/dev/foo/a';

// Retains trailing slashes
toAbsoluteGlob('a/*/') === '/dev/foo/a/*/';

// Makes a negative glob absolute
toAbsoluteGlob('!a/*.js') === '!/dev/foo/a/*.js';

// Accepts a cwd
toAbsoluteGlob('a/*.js', { cwd: 'foo' }) === '/dev/foo/foo/a/*.js';

// Accepts a root path
toAbsoluteGlob('/a/*.js', { root: 'baz' }) === '/dev/foo/baz/a/*.js';

API

toAbsoluteGlob(glob, [options])

Takes a glob string and an optional options object and produces an absolute glob. If the glob is relative, the root or cwd option (or process.cwd() if neither specified) will be used as the base of the glob.

License

MIT

Keywords

FAQs

Last updated on 03 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc