File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 35
35
"http_ece" : " ^0.5.1" ,
36
36
"jws" : " ^3.1.3" ,
37
37
"minimist" : " ^1.2.0" ,
38
- "semver" : " ^5.1.0" ,
39
38
"urlsafe-base64" : " ^1.0.0"
40
39
},
41
40
"devDependencies" : {
Original file line number Diff line number Diff line change 1
- var semver = require ( 'semver' ) ;
2
- if ( semver . satisfies ( process . version , '>= 0.12.0' ) ) {
3
- return ;
1
+ if ( typeof Promise === 'undefined' ) {
2
+ global . Promise = require ( 'bluebird' ) ;
4
3
}
5
4
6
- global . Promise = require ( 'bluebird' ) ;
7
- require ( 'array.prototype.find' ) . shim ( ) ;
8
- require ( 'buffer-compare-shim' ) ;
9
- require ( 'buffer-equals-polyfill' ) ;
10
- require ( 'crypto' ) . createECDH = require ( 'create-ecdh' ) ;
5
+ if ( ! Array . prototype . find ) {
6
+ require ( 'array.prototype.find' ) . shim ( ) ;
7
+ }
8
+
9
+ if ( ! Buffer . prototype . compare || ! Buffer . compare ) {
10
+ require ( 'buffer-compare-shim' ) ;
11
+ }
12
+
13
+ if ( ! Buffer . prototype . equals ) {
14
+ require ( 'buffer-equals-polyfill' ) ;
15
+ }
16
+
17
+ var crypto = require ( 'crypto' ) ;
18
+
19
+ if ( ! crypto . createECDH ) {
20
+ crypto . createECDH = require ( 'create-ecdh' ) ;
21
+ }
You can’t perform that action at this time.
0 commit comments