google-stocks-watch
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -48,2 +48,4 @@ 'use strict'; | ||
value: function _process() { | ||
var _this = this; | ||
var data = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; | ||
@@ -53,27 +55,7 @@ | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
// cannot use for...of loop since it is supported only in Node > 0.12 | ||
data.forEach(function (dataObj) { | ||
result.push(_this._onParse(dataObj)); | ||
}); | ||
try { | ||
for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var dataObj = _step.value; | ||
result.push(this._onParse(dataObj)); | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator['return']) { | ||
_iterator['return'](); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
return result; | ||
@@ -84,12 +66,12 @@ } | ||
value: function _tick() { | ||
var _this = this; | ||
var _this2 = this; | ||
_googleStocks2['default'].get(this._stockCodes, function (error, data) { | ||
if (error) { | ||
return _this._callback(error); | ||
return _this2._callback(error); | ||
} | ||
data = _this._process(data); | ||
data = _this2._process(data); | ||
_this._callback(undefined, data); | ||
_this2._callback(undefined, data); | ||
}); | ||
@@ -96,0 +78,0 @@ } |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ var gulp = require('gulp'), |
{ | ||
"name": "google-stocks-watch", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "anvk", | ||
@@ -33,5 +33,9 @@ "main": "dist/google-stocks-watch.js", | ||
"devDependencies": { | ||
"mocha": "2.2.x", | ||
"chai": "2.1.x", | ||
"clear": "0.0.1" | ||
"clear": "0.0.1", | ||
"babel": "5.6.5", | ||
"chai": "3.0.0", | ||
"gulp": "3.9.0", | ||
"gulp-babel": "5.1.0", | ||
"gulp-mocha": "2.1.2", | ||
"mocha": "2.2.5" | ||
}, | ||
@@ -38,0 +42,0 @@ "engine": "node >= 0.10.x", |
@@ -0,0 +0,0 @@ # google-stocks-watch [![Build Status](https://travis-ci.org/anvk/google-stocks-watch.svg?branch=master)](https://travis-ci.org/anvk/google-stocks-watch) |
@@ -28,5 +28,6 @@ 'use strict'; | ||
for (let dataObj of data) { | ||
// cannot use for...of loop since it is supported only in Node > 0.12 | ||
data.forEach(dataObj => { | ||
result.push(this._onParse(dataObj)); | ||
} | ||
}); | ||
@@ -33,0 +34,0 @@ return result; |
@@ -0,0 +0,0 @@ /* global it, describe, require */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13039
0
7
231