Skip to content

Commit

Permalink
Use lodash.once instead of unlicensed/unmaintained cb
Browse files Browse the repository at this point in the history
  • Loading branch information
holm committed Jul 21, 2016
1 parent 80efd92 commit 3ac95ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"url": "https://github.com/auth0/node-jsonwebtoken/issues"
},
"dependencies": {
"cb": "^0.1.0",
"joi": "^6.10.1",
"jws": "^3.1.3",
"lodash.once": "^4.0.0",
"ms": "^0.7.1",
"xtend": "^4.0.1"
},
Expand Down
4 changes: 2 additions & 2 deletions sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var Joi = require('joi');
var timespan = require('./lib/timespan');
var xtend = require('xtend');
var jws = require('jws');
var cb = require('cb');
var once = require('lodash.once');

var sign_options_schema = Joi.object().keys({
expiresIn: [Joi.number().integer(), Joi.string()],
Expand Down Expand Up @@ -129,7 +129,7 @@ module.exports = function (payload, secretOrPrivateKey, options, callback) {
var encoding = options.encoding || 'utf8';

if (typeof callback === 'function') {
callback = callback && cb(callback).once();
callback = callback && once(callback);

jws.createSign({
header: header,
Expand Down

0 comments on commit 3ac95ad

Please sign in to comment.