We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The defaults array is great. It's very useful, but in practice we often have to deal with defaults objects.
var defs = { host: "localhost", port: 80, https: false };
If we want to use these objects we currently have to parse them into an array, so sanitize can handle them. But what about this?
sanitize
var defs = { host: "localhost", port: 80, https: false }; function client(host, port, https) { var options = sanitize(arguments, client, defs); console.log(options); } client("google.com", true); // -> { host: "google.com", port: 80, https: true }
This won't harm anybody, as it doesn't conflict with the array syntax. I'll implement that.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The defaults array is great. It's very useful, but in practice we often have to deal with defaults objects.
If we want to use these objects we currently have to parse them into an array, so
sanitize
can handle them. But what about this?This won't harm anybody, as it doesn't conflict with the array syntax. I'll implement that.
The text was updated successfully, but these errors were encountered: