From f3dc624fa464a79fd8e8cec1ddd16ed2109bda23 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 10 Feb 2012 16:05:27 -0800 Subject: Revert "Merge from /joseeight/ninja-internal/tree/FileIO" This reverts commit c48eeb01bd726895dc577d8b843b2a75883eee07. Signed-off-by: Ananya Sen --- js/lib/NJUtils.js | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 8daafa42..74039e64 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -183,27 +183,6 @@ exports.NJUtils = Object.create(Object.prototype, { }, - // Returns the numerical value and unit string from a string. - // Useful for element properties. - // 100px will return the following array: [100, px] - getValueAndUnits: { - value: function(input) { - var numberValue = parseFloat(input); - - // Ignore all whitespace, digits, negative sign and "." when looking for units label - // The units must come after one or more digits - var objRegExp = /(\-*\d+\.*\d*)(\s*)(\w*\%*)/; - var unitsString = input.replace(objRegExp, "$3"); - if(unitsString) { - var noSpaces = /(\s*)(\S*)(\s*)/; - // strip out spaces and convert to lower case - var match = (unitsString.replace(noSpaces, "$2")).toLowerCase(); - } - - return [numberValue, match]; - } - }, - /* ================= Style methods ================= */ ///// Get computed height of element -- cgit v1.2.3