Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gulpjs/to-absolute-glob

Package Overview
Dependencies
Maintainers
10
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
10
Created

What is @gulpjs/to-absolute-glob?

@gulpjs/to-absolute-glob is an npm package that converts a given glob pattern to an absolute glob pattern. This is particularly useful in build systems and task runners like Gulp, where you need to work with file paths in a consistent manner.

What are @gulpjs/to-absolute-glob's main functionalities?

Convert relative glob to absolute glob

This feature allows you to convert a relative glob pattern to an absolute glob pattern. The `cwd` option specifies the current working directory to resolve the relative path.

const toAbsoluteGlob = require('@gulpjs/to-absolute-glob');
const absoluteGlob = toAbsoluteGlob('./src/**/*.js', { cwd: process.cwd() });
console.log(absoluteGlob);

Handle negated globs

This feature supports negated glob patterns, which are used to exclude files from a set of matched files. The `!` character at the beginning of the glob pattern indicates negation.

const toAbsoluteGlob = require('@gulpjs/to-absolute-glob');
const absoluteGlob = toAbsoluteGlob('!./src/**/*.test.js', { cwd: process.cwd() });
console.log(absoluteGlob);

Options for handling different path formats

This feature allows you to specify additional options like `root` to handle different path formats. This can be useful when working in environments with different directory structures.

const toAbsoluteGlob = require('@gulpjs/to-absolute-glob');
const absoluteGlob = toAbsoluteGlob('./src/**/*.js', { cwd: process.cwd(), root: '/' });
console.log(absoluteGlob);

Other packages similar to @gulpjs/to-absolute-glob

Keywords

FAQs

Package last updated on 03 Jan 2023

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