Skip to content

Commit

Permalink
Switches to brreg promises interface
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Nov 12, 2016
1 parent 52b0c63 commit 9529eb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ module.exports = function brreg (options) {
query: args.query
}

brreg(brregOptions, (error, data) => {
if (error) {
done(error, null)
} else {
brreg(brregOptions)
.then(data => {
done(null, data)
}
})
})
.catch(error => {
done(error, null)
})
})

return options.tag || 'seneca-brreg'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "seneca-brreg",
"description": "Look up data from the Norwegian Entity Registry",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"author": {
"name": "Geir Gåsodden",
Expand Down

0 comments on commit 9529eb7

Please sign in to comment.