- Adding
greaterThan
andlessThan
checkers. Thanks AimeeKnight! #20
- Adding the
LICENCE
file back to the repo directly rather than a symbolic link.
- Adding
VERSION
variable to main export.
- Now using more sophisticated build system with
webpack
andkarma
. - Renamed files in
src
directory to use dashes rather than camelCase.
- Adding
args
to the result ofapiCheck
instance function (#25).
- If you passed
null
as one of the arguments,api-check
would try to callObject.keys(null)
when generating the message. (#24)
- Removing source-maps entirely for the unminified build...
- Removing sourcemaps from the dist file because it's not removed during minification.
- Renamed repo to
api-check
- Fixing bug with displaying function instead of shortType.
- Improving messaging for types that take a checker as part of the checker
- Adding
.optional
to.nullable
so you can doapiCheck.string.nullable.optional
- Adding
.all
toshape.requiredIfNot
so you can doapiCheck.shape.requiredIfNot(['foo', 'bar'], apiCheck.string)
- Adding
originalChecker
property to the checker that's returned fromgetRequiredVersion
for debugging (#13) - Added
null
checker (#16) - Added
nullable
to all checkers and tosetupChecker
(#16) - Added
range
checker (#16) - Added
shape.requiredIfNot
checker
- Official release!
- Now, all instances of apiCheck get their very own copies of checkers. If the instance of apiCheck is set to disabled, then any checkers created will be initialized as no-op functions to improve performance when doing checking.
- Fixing issue where types were specifying [Circular] when it wasn't actually circular...
- Fixing bug with calling Object.keys on a non-object
- Adding
json-stringify-safe
to do safe stringifying of data.
- Changing the api for disabled. No longer two functions, now just a value you set. You can also initialize it with a disabled property.
- Adding globalConfig to allow you to disable all instances of apiCheck and to enable you to set everything to verbose.
- Changed the name of the
dist
files to beapi-check.js
andapi-check.min.js
(used to beapiCheck.js
andapiCheck.min.js
) - Improved messages
- Fixing bower.json case issue
- Making output of user's arguments easier to read by replacing
null
with the function name.
- Fixing bug with optional arguments.
- Fixing bug when specifying custom functions that don't have a
type
property.
- Removing
.idea
folder from npm and bower. (-‸ლ)
- Adding
passed
,failed
, andmessage
to what is returned when apiCheck passes (or when it's disabled). - Loosening the api to
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.
- Fixing bug where optional arguments were being tested against the wrong checkers.
- Fixing bug with
onlyIf
when getting the type for ashape
.
- Adding .npmignore
- correctly returning what should be returned when it's disabled
- Adding
utils
to the main export.
- Somehow I forgot to run the build for 6.0.0
- You must now create an instance of
apiCheck
by invokingapiCheck
. 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)
- Adding extra output options to override the global ones on a per call basis.
- Changing
output.url
tooutput.urlSuffix
in favor ofoutput.url
overriding the rest of the url - Fixing bug with ending optional arguments
- Forgot to give the same love to
shape.strict
that I gave toshape
. - Relaxing the requirements of a type checker
- Fixing the way the
enums
shortType looks. - Adding child checker to
func
calledwithProperties
which is basically just ashape
on a function. - Making an adjustment to how
location
works inshape
. This makes it more readable. - Adding the ability to specify a
help
property string/function(val) on custom checkers. This (or the result of the invoked function) will be appended to the error message. - Adding more strict type checking for custom checkers.
- Adding the ability to specify whether you want
shape
to check if it's an object first (passtrue
as the second parameter, and it will not check whether it's an object first). - Adding
apiCheck.config.verbose
. - type checkers can now control how much data they output based on whether
apiCheck.config.verbose
is true or not. If they specify theirtype
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.
- Fixing oneOfType's
type
- Bug fix. The argTypes should be an object, not stringified (#3)
- Missed a console.log :-/ Should probably put in a checker for that...
- Quick breaking change, hopefully nobody will be impacted because it was literally minutes. Now returning an object instead of just a string message. This make things much more flexible.
- Seriously improved how the messages are formatted. There's a lot more there, but it's awesome.
- Returning the message from apiCheck.warn/throw. Though, if an error is actually thrown, then any responding code to the returned message will not run...
- Major internal api changes. All checkers now return an error like React's
propTypes
and the messaging has been improved.
- Updating readme
- Initial release. Enjoy :-)