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

calmcard

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calmcard

not-so-wild wildcard string matching

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

calmcard

not-so-wild wildcard string matching

Calmcard provides a simple string pattern matching with * as the only special character which is a placeholder for any sequence of characters, unless it is escaped.

Calmcard was made to have a glob like tool for arbitrary strings where slashes have no special meaning. It also does explicitly not use regular expressions because of speed, proper escaping and because writing regular expression strings in JavaScript gets messy and unreadable very quick.

Examples

  • foo*bar will match "foo123bar"
  • foo\*bar will match "foo*bar" but not "foo123bar"

Installation

Currently, calmcard is built for node.js and available via NPM.

npm install calmcard

Usage

    var calmcard = require("calmcard");

    calmcard("foo*bar", "foo123bar"); // -> true
    calmcard("foo*bar", "foobar"); // -> false

Keywords

FAQs

Package last updated on 04 Jul 2014

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