Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peerlibrary/meteor-check-extension
Extensions to the built-in check package
https://github.com/peerlibrary/meteor-check-extension
meteor meteor-package
Last synced: 5 days ago
JSON representation
Extensions to the built-in check package
- Host: GitHub
- URL: https://github.com/peerlibrary/meteor-check-extension
- Owner: peerlibrary
- License: bsd-3-clause
- Created: 2015-03-03T09:20:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-20T02:03:23.000Z (about 5 years ago)
- Last Synced: 2024-04-15T03:06:58.279Z (7 months ago)
- Topics: meteor, meteor-package
- Language: CoffeeScript
- Homepage: https://atmospherejs.com/peerlibrary/check-extension
- Size: 9.77 KB
- Stars: 10
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Check Extension
===============Meteor package which provides a few extensions to the built-in `Match` object.
Installation
------------```
meteor add peerlibrary:check-extension
```Checks
------The following additional checks are provided:
* `Match.PositiveNumber` matches only positive numbers.
* `Match.NonNegativeInteger` matches only non-negative integers.
* `Match.NonEmptyString` matches only strings with a length greater than zero.
* `Match.DocumentId` matches only valid ObjectIds.
* `Match.ObjectWithOnlyStrings` matches only objects containing strings as keys and values.
* `Match.Enumeration(pattern, enumeration)` matches values matching `pattern` belonging to a certain `enumeration` object or array.
* `Match.SHA256String` matches hex-encoded SHA-256 digests.
* `Match.EMail` matches only non-empty e-mail strings.
* `Match.OptionalOrNull(pattern)` matches an optional `pattern`, a `null`, or an `undefined` value. In objects, field can also be missing.
* `Match.OrNull` matches the `pattern` or an explicit `null`.
* `Match.RegexString(regex)` matches strings matching `regex` regular expression.