What do you think of adding code to this library to check that the input is an object? Right now, the code below would throw an error:
var schema = {
"title": "Example Schema",
"type": "object",
"properties": {
"firstName": {
"type": "string"
}
}
};
filter(schema, null);
filter(schema, 'mystring');
For my use case, I'm going to add code like the following before calling filter:
if (typeof input !== 'object') {
return {}; // or maybe return null?
}
Want it in this library? Any extra checks will decrease performance, so maybe it belongs outside this library.
What do you think of adding code to this library to check that the input is an object? Right now, the code below would throw an error:
For my use case, I'm going to add code like the following before calling
filter:Want it in this library? Any extra checks will decrease performance, so maybe it belongs outside this library.