Retrieves the files matching the specified pattern.
import { glob } from 'node:fs';
glob('*.js', (err, matches) => {
if (err) throw err;
console.log(matches);
});
Search the reference...
/
function
Retrieves the files matching the specified pattern.
import { glob } from 'node:fs';
glob('*.js', (err, matches) => {
if (err) throw err;
console.log(matches);
});
Retrieves the files matching the specified pattern.
import { glob } from 'node:fs';
glob('*.js', (err, matches) => {
if (err) throw err;
console.log(matches);
});
Retrieves the files matching the specified pattern.
import { glob } from 'node:fs';
glob('*.js', (err, matches) => {
if (err) throw err;
console.log(matches);
});
Retrieves the files matching the specified pattern.
import { glob } from 'node:fs';
glob('*.js', (err, matches) => {
if (err) throw err;
console.log(matches);
});
Current working directory.
Function to filter out files/directories or a list of glob patterns to be excluded. If a function is provided, return true to exclude the item, false to include it. If a string array is provided, each string should be a glob pattern that specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are not supported.
true if the glob should return paths as Dirents, false otherwise.
Current working directory.
Function to filter out files/directories or a list of glob patterns to be excluded. If a function is provided, return true to exclude the item, false to include it. If a string array is provided, each string should be a glob pattern that specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are not supported.
true if the glob should return paths as Dirents, false otherwise.
Current working directory.
Function to filter out files/directories or a list of glob patterns to be excluded. If a function is provided, return true to exclude the item, false to include it. If a string array is provided, each string should be a glob pattern that specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are not supported.
true if the glob should return paths as Dirents, false otherwise.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →