Added more typechecking functions and unit tests for existing code.
This change alters the functionality of getObjectAttr slightly: it no longer accepts null or Array objects as "object" values. I made this change because the type checking code seems designed to mirror the semantics of JSON, where each value belongs to exactly one of the following categories: array, boolean, number, null, object, or string. This change also changes the type of values thrown from strings to Error objects so that there are more likely to be useful stack traces when an error occurs. BUG= Review URL: https://codereview.chromium.org/1015553003 Cr-Commit-Position: refs/heads/master@{#321415}
Showing
This diff is collapsed.
Please register or sign in to comment