Extended object inspection functionality #7

merged 2 commits into from Feb 22, 2013


None yet
2 participants

AluisioASG commented Feb 22, 2013

This extends the %O specifier by supporting control of the representation depth through a precision, and adds an %A specifier listing only enumerable properties.

AluisioASG added some commits Feb 22, 2013

@AluisioASG AluisioASG Add depth control to %O specifier
Previously, using the %O specifier implied on recursing indefinitely
on the object being formatted.  For large and complicated objects,
this behavior may not be desirable.

With this change, the recursion depth can be controlled through the
precision flag.  If the flag is not specified (`%O`) or set but no
precision is specified (`%.O`), it will, as currently, recurse
indefinitely.  Otherwise (e.g. `%.2O`), it will recurse that many times
in the object.
@AluisioASG AluisioASG Add enumerable-only object specifier
The %O specifier automatically outputs the all properties of the
object being formatted, both enumerable and non-enumerable.  This
change introduces a new specifier, %A, which is identical to %O,
except by only printing the enumerable properties of the object.

@wdavidw wdavidw pushed a commit that referenced this pull request Feb 22, 2013

Worms David Merge pull request #7 from AluisioASG/master
Extended object inspection functionality

@wdavidw wdavidw merged commit 0a6c10d into adaltas:master Feb 22, 2013


wdavidw commented Feb 22, 2013

wonderfull, releasing a new version in a minute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment