Commit 75a6f921 75a6f921c9afa82793509cb3d17d3b972b494245 by Nicolas Perriault

removed obsolete utils.replaceFunctionPlaceholders() function

1 parent edbfbe38
1 CasperJS Changelog 1 CasperJS Changelog
2 ================== 2 ==================
3 3
4 XXXX-XX-XX, v0.6.0-alpha 4 XXXX-XX-XX, v0.6.0
5 ------------------------ 5 ------------------
6 6
7 - BC BREAK: removed obsolete `replaceFunctionPlaceholders()`
7 - commonjs/nodejs-like module implementation 8 - commonjs/nodejs-like module implementation
8 9
9 XXXX-XX-XX, v0.4.2 10 2011-12-25, v0.4.2
10 ------------------ 11 ------------------
11 12
12 - merged PR #30 - Add request method and request data to the base64encode method (@jasonlfunk) 13 - merged PR #30 - Add request method and request data to the base64encode method (@jasonlfunk)
......
...@@ -163,28 +163,6 @@ function mergeObjects(obj1, obj2) { ...@@ -163,28 +163,6 @@ function mergeObjects(obj1, obj2) {
163 exports.mergeObjects = mergeObjects; 163 exports.mergeObjects = mergeObjects;
164 164
165 /** 165 /**
166 * Replaces a function string contents with placeholders provided by an
167 * Object.
168 *
169 * @param Function fn The function
170 * @param Object replacements Object containing placeholder replacements
171 * @return String A function string representation
172 */
173 function replaceFunctionPlaceholders(fn, replacements) {
174 if (replacements && isType(replacements, "object")) {
175 fn = fn.toString();
176 for (var placeholder in replacements) {
177 var match = '%' + placeholder + '%';
178 do {
179 fn = fn.replace(match, replacements[placeholder]);
180 } while(fn.indexOf(match) !== -1);
181 }
182 }
183 return fn;
184 }
185 exports.replaceFunctionPlaceholders = replaceFunctionPlaceholders;
186
187 /**
188 * Serializes a value using JSON. 166 * Serializes a value using JSON.
189 * 167 *
190 * @param Mixed value 168 * @param Mixed value
......