diff options
| author | Adam Soltys <[email protected]> | 2012-11-07 17:46:49 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2012-11-07 17:52:50 -0800 |
| commit | 3e900e0bba211c2bbf2bb10c85a82dd9ce6943f0 (patch) | |
| tree | bb3ce237413df5fb0896a1696f7bd6f41ac248f3 /node_modules/jade/lib/utils.js | |
| parent | 5a4e3ff9bf1db2db4fc5ae8d3bd7dcefc8c58e25 (diff) | |
| download | coinos-server-3e900e0bba211c2bbf2bb10c85a82dd9ce6943f0.tar.gz coinos-server-3e900e0bba211c2bbf2bb10c85a82dd9ce6943f0.zip | |
Use coffeescript
Diffstat (limited to 'node_modules/jade/lib/utils.js')
| -rw-r--r-- | node_modules/jade/lib/utils.js | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/node_modules/jade/lib/utils.js b/node_modules/jade/lib/utils.js deleted file mode 100644 index ca4a7fa5..00000000 --- a/node_modules/jade/lib/utils.js +++ /dev/null @@ -1,68 +0,0 @@ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk <[email protected]> - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(_SLASH_)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - code = code - .replace(/\\'/g, "'") - .replace(/_SLASH_/g, '\\'); - - return escape - ? str.slice(7) - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; - -/** - * Merge `b` into `a`. - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api public - */ - -exports.merge = function(a, b) { - for (var key in b) a[key] = b[key]; - return a; -}; - |
