New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

node-matcher

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-matcher

Simple chain pattern matching library for node.js

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Match

Build Status

Description

Simple pattern matching with chain style for node.js

Installation

[sudo] npm install match

Usage

var match = require('node-match');

function whenHandler () {
  console.log('Matched!');
}

match('fizzbuzz')
  .when('buzz', whenHandler);
  .end();

API

When

// Match when the token is founded as string or regexp

.when( token, callback )

WhenNot

// Match when not the token is founded as string or regexp

.whenNot( token, callback )

And

// Match and the token is founded as string or regexp

.and( token, callback )

Or

// Match or the token is founded as string or regexp

.or( token, callback )

End

// Finish the matching

.end( callback )

License

Under BSD-2

Author

Kaique da Silva - kaique.developer@gmail.com

Keywords

pattern

FAQs

Package last updated on 11 Feb 2021

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