Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement faster versions of clone():
- safe_clone(): a safe version of clone() tests non-object properties before calling recursively - fast_clone(): a fast version of clone() does not test hasOwnProperty() - extend.clone() is currently set to safe_clone(), a future test should allow to use fast_clone(). - extend.object_clone() is currently set to safe_object_clone() - versions of clone working only on objects, not scalar values: - safe_object_clone(): used by safe_clone() - fast_object_clone(): used by fast_clone() - add tests for safe_object_clone() and fast_object_clone() - add test values into foo: - Limitation: NaN cannot currently be tested because mocha eql() function does not handle NaN, we could use value_equals() instead
- Loading branch information
Showing
2 changed files
with
107 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters