Skip to content

Commit 96b8906

Browse files
authoredAug 30, 2023
refactor: use specific lodash packages (#933)
This is to reduce the size of the bundle users have to install.
1 parent ed35062 commit 96b8906

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed
 

‎package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@
3737
},
3838
"dependencies": {
3939
"jws": "^3.2.2",
40-
"lodash": "^4.17.21",
40+
"lodash.includes": "^4.3.0",
41+
"lodash.isboolean": "^3.0.3",
42+
"lodash.isinteger": "^4.0.4",
43+
"lodash.isnumber": "^3.0.3",
44+
"lodash.isplainobject": "^4.0.6",
45+
"lodash.isstring": "^4.0.1",
46+
"lodash.once": "^4.0.0",
4147
"ms": "^2.1.1",
4248
"semver": "^7.5.4"
4349
},

‎sign.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ const timespan = require('./lib/timespan');
22
const PS_SUPPORTED = require('./lib/psSupported');
33
const validateAsymmetricKey = require('./lib/validateAsymmetricKey');
44
const jws = require('jws');
5-
const {includes, isBoolean, isInteger, isNumber, isPlainObject, isString, once} = require('lodash')
5+
const includes = require('lodash.includes');
6+
const isBoolean = require('lodash.isboolean');
7+
const isInteger = require('lodash.isinteger');
8+
const isNumber = require('lodash.isnumber');
9+
const isPlainObject = require('lodash.isplainobject');
10+
const isString = require('lodash.isstring');
11+
const once = require('lodash.once');
612
const { KeyObject, createSecretKey, createPrivateKey } = require('crypto')
713

814
const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none'];

0 commit comments

Comments
 (0)
Please sign in to comment.