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

strummer-plus

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strummer-plus

A set of matchers for Strummer

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
1
Created
Source

#Strummer+ Strummer+ is a collection of common matchers for Strummer.

##Matchers

  • ObjectId: Validates ObjectIds.
  • Email : Validates valid email addresses.
  • Coordinates: Validates an array of two members [longitude, latitude].
  • DateString: Validates a string for the date can be parsed from it.
  • Timezone: Validates a string to be a timezone, based on the IANA Time Zone Database.
  • Latitude: Validates a latitude. Supported options are {parse: true}
  • Longitude: Validates a longitude. Supported options are {parse: true}
  • MobilePhone : Validates valid mobile phone.

##Installation npm install strummer-plus --save

##Example

var s = require('strummer');
var matchers = require('strummer-plus');

var matcher = s.object({
    email: new matchers.Email(),
    id   : new matchers.ObjectId()
});

var errors = matcher.match(req.body);

##Releases

  • 2015-07-06 - 0.0.1

    • Initial release
    • Matchers for ObjectId and Email
  • 2015-07-10 - 0.0.2

    • Development of Coordinates matcher

FAQs

Package last updated on 19 Feb 2019

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