zjrJS.Debug.crack() - Stable Test Suite for zjrJS

This information lives on a webpage hosted at the following web address: 'https://www.omegajunior.net/code/zjrjs/stable.php'.

How to use zjrJS.Debug.crack()

Used zjrJS Version:

Stable Minified version 20141202t2322 of zjrJS.


 

Declaration
zjrJS.Debug.crack(Object)

Goal
The passed Object is extrapolated: all its members (but not their values) are returned as a String. This same information should also be logged to the browser's console, or alerted if a console is unavailable and Debug.mode = 1.

(Before version 20120322t0917, the Object Extrapolation was neither returned nor logged, but merely alerted.)

Typical usage
During development, one would put object cracks in one's programming where knowing that object's members is beneficial. One would use this method when the web browser lacks a debugger that can traverse object members by itself, like Mobile Safari on the iPad. Before shipping to a live server, one would remove the cracks.

Member Type
Function.
(Before version 20120322t0917: Method.)

Return Type
String: object extrapolation.
(Before version 20120322t0917: no return value.)

Parameters
Object - any javascript object in memory.

Dependencies
zjrJS.Debug.alert

Example
<script type="text/javascript" src="zjrJS.version.js" id="zjrJS"></script>
<script type="text/javascript">/* <![CDATA[ */
var D=zjrJS.Doc;
D.aE(window,"load",function(){
//Crack the built-in Array Object
var a=[];
zjrJS.Debug.crack(a);
});
D=null;
/* ]]> */</script>

Download:

Download zjrJS’ latest stable build (20141202t2322) minified (7.1KB).

Download zjrJS’ latest stable build (20141202t2322) (11.9KB).

Clicky Analytics