Remove lodash

This commit is contained in:
Paulus Schoutsen 2016-05-28 11:14:25 -07:00
parent 4f8e2d5687
commit 96be0e5b8b
2 changed files with 10 additions and 3 deletions

View File

@ -21,7 +21,6 @@
"license": "MIT",
"dependencies": {
"home-assistant-js": "git+https://github.com/home-assistant/home-assistant-js.git#ff2bd7efd23bb731d1bcc88996154c5d573395ed",
"lodash": "^4.11.2",
"moment": "^2.13.0"
},
"devDependencies": {

View File

@ -1,7 +1,15 @@
import range from 'lodash/range';
import Polymer from '../polymer';
function range(start, end) {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
}
function saveParseFloat(value) {
const parsed = parseFloat(value);
return !isNaN(parsed) && isFinite(parsed) ? parsed : null;