Skip to content

Commit 63bb15b

Browse files
author
Hans Kristian Flaatten
committed
feat(api): make async each syncronous
1 parent 680e156 commit 63bb15b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ turbasen.områder(query, function(err, res, body) {
9090
Asyncronously featch each object for a given query.
9191

9292
```js
93-
function each(item, index, next) {
93+
function each(item, next) {
9494
// do something async with the item
9595
next();
9696
};

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const eachAsync = require('each-async');
3+
const eachAsync = require('async-each-series');
44

55
module.exports.conf = {
66
API_KEY: process.env.NTB_API_KEY,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"semantic-release": "^4.3.5"
3535
},
3636
"dependencies": {
37-
"each-async": "^1.1.1",
37+
"async-each-series": "^1.1.0",
3838
"request": "^2.67.0"
3939
},
4040
"engines": {

test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('api', function describe() {
7373
limit: 10,
7474
};
7575

76-
turbasen.turer.each(opts, function eachItem(item, index, next) {
76+
turbasen.turer.each(opts, function eachItem(item, next) {
7777
counter++;
7878
process.nextTick(next);
7979
}, function eachDone(err) {

0 commit comments

Comments
 (0)