commonform-predicate
Advanced tools
Comparing version 4.0.0 to 5.0.0
10
index.js
@@ -8,2 +8,12 @@ var has = require('has') | ||
exports.url = function (argument) { | ||
return ( | ||
has(argument, 'url') && | ||
( | ||
argument.url.indexOf('https://') === 0 || | ||
argument.url.indexOf('http://') === 0 | ||
) | ||
) | ||
} | ||
exports.child = hasProperty('form') | ||
@@ -10,0 +20,0 @@ |
{ | ||
"name": "commonform-predicate", | ||
"description": "distinguish Common Form content objects", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (http://kemitchell.com)", | ||
@@ -6,0 +6,0 @@ "devDependencies": { |
@@ -27,2 +27,6 @@ ```javascript | ||
assert(predicate.url({ url: 'https://example.com' })) | ||
assert(predicate.url({ url: 'http://example.com' })) | ||
assert(!predicate.url(invalid)) | ||
assert(predicate.child({ heading: 'Summary', form: validForm })) | ||
@@ -29,0 +33,0 @@ assert(!predicate.child(invalid)) |
4509
24
53