0.6.0 • Published 5 years ago

strummer-plus v0.6.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

#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
0.6.0

5 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago