Package Exports
- shortstop-regex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shortstop-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shortstop-regex
Adds RegExp support to shortstop.
Example
'use strict';
var shortstop = require('shortstop');
var resolver = shortstop.create();
var assert = require('assert');
var shortstopRegex = require('shortstop-regex');
resolver.use('regex', shortstopRegex());
var data = {
'isSecure': 'regex:^\/secure\/'
};
resolver.resolve(data, function (err, result) {
assert.equal(result.isSecure.test('/secure/route'), true);
assert.equal(result.isSecure.test('/notSecure/route'), false);
});