/**
* Provides Y.QueryString.stringify method for converting objects to Query Strings.
*
* @module querystring
* @submodule querystring-stringify
* @for QueryString
* @static
*/
stack = [],
L = Y.Lang;
/**
* Provides Y.QueryString.escape method to be able to override default encoding
* method. This is important in cases where non-standard delimiters are used, if
* the delimiters would not normally be handled properly by the builtin
* (en|de)codeURIComponent functions.
* Default: encodeURIComponent
* @module querystring
* @submodule querystring-stringify
* @for QueryString
* @static
**/
/**
* <p>Converts an arbitrary value to a Query String representation.</p>
*
* <p>Objects with cyclical references will trigger an exception.</p>
*
* @method stringify
* @public
* @param obj {Variant} any arbitrary value to convert to query string
* @param cfg {Object} (optional) Configuration object. The three
* supported configurations are:
* <ul><li>sep: When defined, the value will be used as the key-value
* separator. The default value is "&".</li>
* <li>eq: When defined, the value will be used to join the key to
* the value. The default value is "=".</li>
* <li>arrayKey: When set to true, the key of an array will have the
* '[]' notation appended to the key. The default value is false.
* </li></ul>
* @param name {String} (optional) Name of the current key, for handling children recursively.
* @static
*/
}
}
// Y.log("Number or string: "+obj);
}
s = [];
for (i = 0; i < l; i++) {
}
}
// now we know it's an object.
// Y.log(
// typeof obj + (typeof obj === 'object' ? " ok" : "ONOES!")+
// Object.prototype.toString.call(obj)
// );
// Check for cyclical references in nested objects
throw new Error("QueryString.stringify. Cyclical reference");
}
}
s = [];
for (i in obj) {
if (obj.hasOwnProperty(i)) {
}
}
if (!s && name) {
return name + "=";
}
return s;
};