You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

wildcard

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wildcard

Wildcard matching tools

2.0.1
latest
Source
npm
Version published
Weekly downloads
9.8M
-15.19%
Maintainers
1
Weekly downloads
 
Created

What is wildcard?

The 'wildcard' npm package is designed to simplify the process of matching strings against a specified pattern using wildcards. It is commonly used in scenarios where there is a need to filter or search for data based on partial input, similar to the functionality seen in search engines or file searching utilities.

What are wildcard's main functionalities?

String Matching

This feature allows users to match strings against a pattern with wildcards. In the provided code, the wildcard pattern '*.js' is used to filter an array of filenames to find those that end with '.js'.

const wildcard = require('wildcard');

const pattern = '*.js';
const files = ['index.js', 'server.js', 'style.css'];
const matched = files.filter(file => wildcard(pattern, file));
console.log(matched); // Output: ['index.js', 'server.js']

Other packages similar to wildcard

Keywords

string

FAQs

Package last updated on 24 Apr 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