Commit 75a6f921 75a6f921c9afa82793509cb3d17d3b972b494245 by Nicolas Perriault

removed obsolete utils.replaceFunctionPlaceholders() function

1 parent edbfbe38
CasperJS Changelog
==================
XXXX-XX-XX, v0.6.0-alpha
------------------------
XXXX-XX-XX, v0.6.0
------------------
- BC BREAK: removed obsolete `replaceFunctionPlaceholders()`
- commonjs/nodejs-like module implementation
XXXX-XX-XX, v0.4.2
2011-12-25, v0.4.2
------------------
- merged PR #30 - Add request method and request data to the base64encode method (@jasonlfunk)
......
......@@ -163,28 +163,6 @@ function mergeObjects(obj1, obj2) {
exports.mergeObjects = mergeObjects;
/**
* Replaces a function string contents with placeholders provided by an
* Object.
*
* @param Function fn The function
* @param Object replacements Object containing placeholder replacements
* @return String A function string representation
*/
function replaceFunctionPlaceholders(fn, replacements) {
if (replacements && isType(replacements, "object")) {
fn = fn.toString();
for (var placeholder in replacements) {
var match = '%' + placeholder + '%';
do {
fn = fn.replace(match, replacements[placeholder]);
} while(fn.indexOf(match) !== -1);
}
}
return fn;
}
exports.replaceFunctionPlaceholders = replaceFunctionPlaceholders;
/**
* Serializes a value using JSON.
*
* @param Mixed value
......