Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

array-pull-all-with-glob

codsen104.4kMIT7.0.12TypeScript support: included

Like _.pullAll but with globs (wildcards)

array, delete, element, from, glob, globby, pattern, pulal, pulall, pull, pullal, pullall, remove, whitelist, matcher

readme

array-pull-all-with-glob

Like _.pullAll but with globs (wildcards)

page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 5.1.0 (npm i array-pull-all-with-glob@5.1.0).

npm i array-pull-all-with-glob

Quick Take

import { strict as assert } from "assert";

import { pull } from "array-pull-all-with-glob";

assert.deepEqual(
  pull(
    ["keep_me", "name-1", "name-2", "name-jhkgdhgkhdfghdkghfdk"],
    ["name-*"],
  ),
  ["keep_me"],
);

Documentation

Please visit codsen.com for a full description of the API.

Contributing

To report bugs or request features or assistance, raise an issue on GitHub.

Licence

MIT License.

Copyright © 2010-2025 Roy Revelt and other contributors.

ok codsen star

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

7.0.0 (2022-12-01)

BREAKING CHANGES

  • Minimum supported Node version is v14.18; we're dropping v12 support

6.2.0 (2022-08-12)

Features

6.1.0 (2022-04-10)

Features

6.0.0 (2021-09-09)

Features

BREAKING CHANGES

  • programs now are in ES Modules and won't work with Common JS require()

5.1.0 (2021-05-24)

Features

  • config file based major bump blacklisting (e15f9bb)

5.0.15 (2021-04-11)

Reverts

  • Revert "chore: setup refresh" (23cf206)

5.0.1 (2021-01-28)

Fixed

  • add testStats to npmignore (f3c84e9)

5.0.0 (2021-01-23)

Features

  • rewrite in TS, use named exports (359c5ff)

BREAKING CHANGES

  • Previously, a default export was used: import pullAllWithGlob from .... Now use the named export: import { pull } from ...

4.13.0 (2020-11-28)

Accidental version bump during migration to SourceHut. Sorry about that.

4.12.0 (2019-01-20)

  • Various documentation and setup tweaks after we migrated to monorepo
  • Setup refresh: updated dependencies and all config files using automated tools

4.7.0 (2018-10-12)

  • Updated all dependencies and restored the coverage tracking both in unit tests and via coveralls.io

4.6.0 (2018-08-23)

  • Now we allow the second input argument to be a string or an array of zero or more strings

4.5.0 (2018-06-11)

GitHub sold us out. In the meantime, we:

  • Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
  • Dropped BitHound (RIP) and Travis
  • Removed package-lock

4.4.0 (2018-05-14)

  • Now pointing unit tests at ES Modules build, not CommonJS-one. This means, unit test coverage will be correct (higher) because there won't be any missing rows that Babel added which are impossible to cover.
  • Tweaks to ava config in package.json, properly enabling the dev Rollup builds.

4.3.0 (2018-04-29)

  • Set up Prettier
  • Removed package.lock and .editorconfig
  • Wired Rollup to remove comments from non-dev builds. This means we can now leave the console.logs in the source code — Rollup will remove them during the builds.

4.2.0 (2018-02-11)

  • opts.caseSensitive, directly controlling today's new released matcher's same feature. Case sensitive is on by default now, but you can turn it off if you're dealing with file system stuff for example. It's best to be case-insensitive in those cases.

Also, I set up check-types-mini (npm, GitLab) to patrol the opts' types. Just in case consumers misbehave.

4.1.0 (2018-01-21)

  • Shortened the error source function paths in error messages. There's no point to report the name of the main function when there's only one function. The package name will suffice.

4.0.0 (2017-10-23)

  • The main source now is in ES2015 modules with import/export.
  • Implemented Rollup to generate 3 flavours of this package: CommonJS, UMD and ESM module with import/export.

3.1.0 (2017-08-31)

  • Now generating transpiled version within /es5/ folder, which you can require like that, var pull = require('array-pull-all-with-glob/es5')

3.0.0 (2017-08-25)

  • Switched to matcher to do all the globbing.

  • 💥 Removed dependency on lodash.clonedeep

  • 💥 Removed dependency on lodash.replace
  • 🔧 Made the API slightly more strict, not allowing non-string elements within arrays.

2.0.0 (2017-03-02)

  • 🔧 Simple thing, but, technically, a major API change. Input arguments are not mutated any more.
  • 🔧 New unit tests to guarantee that.
  • 🔧 Tightened the API with insurance against missing args or wrong types in the input. Now if the main input is missing, it will throw. If first argument (remove from where) is present, but second (what to remove) is missing, first arguement is returned. It's called being nice with others (libraries).
  • Added changelog.md