Skip to content

Commit 3ac95ad

Browse files
committed
Use lodash.once instead of unlicensed/unmaintained cb
1 parent 80efd92 commit 3ac95ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"url": "https://github.com/auth0/node-jsonwebtoken/issues"
2020
},
2121
"dependencies": {
22-
"cb": "^0.1.0",
2322
"joi": "^6.10.1",
2423
"jws": "^3.1.3",
24+
"lodash.once": "^4.0.0",
2525
"ms": "^0.7.1",
2626
"xtend": "^4.0.1"
2727
},

sign.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var Joi = require('joi');
22
var timespan = require('./lib/timespan');
33
var xtend = require('xtend');
44
var jws = require('jws');
5-
var cb = require('cb');
5+
var once = require('lodash.once');
66

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

131131
if (typeof callback === 'function') {
132-
callback = callback && cb(callback).once();
132+
callback = callback && once(callback);
133133

134134
jws.createSign({
135135
header: header,

0 commit comments

Comments
 (0)