{"action":"closed","issue":{"url":"https://api.github.com/repos/hacksparrow/node-easyimage/issues/68","labels_url":"https://api.github.com/repos/hacksparrow/node-easyimage/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/hacksparrow/node-easyimage/issues/68/comments","events_url":"https://api.github.com/repos/hacksparrow/node-easyimage/issues/68/events","html_url":"https://github.com/hacksparrow/node-easyimage/issues/68","id":76275452,"number":68,"title":"parseSize issue","user":{"login":"tomalex0","id":208168,"avatar_url":"https://avatars.githubusercontent.com/u/208168?v=3","gravatar_id":"","url":"https://api.github.com/users/tomalex0","html_url":"https://github.com/tomalex0","followers_url":"https://api.github.com/users/tomalex0/followers","following_url":"https://api.github.com/users/tomalex0/following{/other_user}","gists_url":"https://api.github.com/users/tomalex0/gists{/gist_id}","starred_url":"https://api.github.com/users/tomalex0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomalex0/subscriptions","organizations_url":"https://api.github.com/users/tomalex0/orgs","repos_url":"https://api.github.com/users/tomalex0/repos","events_url":"https://api.github.com/users/tomalex0/events{/privacy}","received_events_url":"https://api.github.com/users/tomalex0/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-14T07:57:52Z","updated_at":"2015-05-15T18:20:35Z","closed_at":"2015-05-15T18:20:35Z","body":"I'm getting `sizeArray` as null when its called like `parseSize(\"34.6KB\");`\r\n\r\nAre you facing this issue?\r\n\r\nhttps://github.com/hacksparrow/node-easyimage/blob/master/easyimage.js#L32\r\n\r\n```\r\nvar parseSize = function(sizeString) {\r\n        console.log(sizeString,'sizeString')\r\n\r\n\t\tvar unit = {\r\n\t\t\tB: 1,\r\n\t\t\tKB: 1000,\r\n\t\t\tMB: 1000000,            // =1000^2\r\n\t\t\tGB: 1000000000,         // =1000^3\r\n\t\t\tTB: 1000000000000       // =1000^4\r\n\t\t};\r\n\r\n\t\tvar rx = /^(\\d\\.?\\d*)([KMGT]?B)$/;  // regex for extract the float value and its unit\r\n               var sizeArray = rx.exec(sizeString);\r\n\r\n        \r\n\r\n\t\treturn parseFloat(sizeArray[1]) * unit[sizeArray[2]];\r\n\t};\r\n```"}}