greaterThan
and lessThan
checkers. Thanks AimeeKnight! #20LICENCE
file back to the repo directly rather than a symbolic link.VERSION
variable to main export.webpack
and karma
.src
directory to use dashes rather than camelCase.args
to the result of apiCheck
instance function (#25).null
as one of the arguments, api-check
would try to call Object.keys(null)
when generating the message. (#24)api-check
.optional
to .nullable
so you can do apiCheck.string.nullable.optional
.all
to shape.requiredIfNot
so you can do apiCheck.shape.requiredIfNot(['foo', 'bar'], apiCheck.string)
originalChecker
property to the checker that's returned from getRequiredVersion
for debugging (#13)null
checker (#16)nullable
to all checkers and to setupChecker
(#16)range
checker (#16)shape.requiredIfNot
checkerjson-stringify-safe
to do safe stringifying of data.dist
files to be api-check.js
and api-check.min.js
(used to be apiCheck.js
and apiCheck.min.js
)null
with the function name.type
property..idea
folder from npm and bower. (-‸ლ)passed
, failed
, and message
to what is returned when apiCheck passes (or when it's disabled).apiCheck
. You now can pass an array instead of an arguments-like object. It's much easier to deal with if you're not actually passing arguments.onlyIf
when getting the type for a shape
.utils
to the main export.apiCheck
by invoking apiCheck
. This allows multiple instances on a single page so many libraries can use their own instance and not conflict with the application's instance. Specifically useful for the global config options. (#7)output.url
to output.urlSuffix
in favor of output.url
overriding the rest of the urlshape.strict
that I gave to shape
.enums
shortType looks.func
called withProperties
which is basically just a shape
on a function.location
works in shape
. This makes it more readable.help
property string/function(val) on custom checkers. This (or the result of the invoked function) will be appended to the error message.shape
to check if it's an object first (pass true
as the second parameter, and it will not check whether it's an object first).apiCheck.config.verbose
.apiCheck.config.verbose
is true or not. If they specify their type
as a function, that will be invoked and what is returned is used for the type for display. (#5)shape
taking advantage of the new .type
function api to show where exactly in the object the error occurred and whether it was a result of a missing field that was required or a field that failed type validation.type
propTypes
and the messaging has been improved.