Improve validation of some object primitives
Open
@medikoo is already working on this.
Since Aug 29, 2014.
- Dominant language
- JavaScript
- Stars
- 27
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
If for property of type Function, function instance is passed, and it's neither direct instance of this Function type, nor plain JavaScript function, validator should throw.
In case of Dates or RegExp's validator instead of throwing may create copies, but in case of functions there's no straightforward way to create perfect copy.
It will prevent errors, as one we approached with @kamsi, where following bogus code:
db2.Type.extend('SomeType', db1.OtherType);
didn't report any issue, but have broken state of db1.OtherType (its prototype was turned)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.