@@ -17,7 +17,6 @@ const SsriOpts = figgyPudding({
17
17
integrity : { } ,
18
18
options : { default : [ ] } ,
19
19
pickAlgorithm : { default : ( ) => getPrioritizedHash } ,
20
- Promise : { default : ( ) => Promise } ,
21
20
sep : { default : ' ' } ,
22
21
single : { default : false } ,
23
22
size : { } ,
@@ -299,9 +298,8 @@ function fromData (data, opts) {
299
298
module . exports . fromStream = fromStream
300
299
function fromStream ( stream , opts ) {
301
300
opts = SsriOpts ( opts )
302
- const P = opts . Promise || Promise
303
301
const istream = integrityStream ( opts )
304
- return new P ( ( resolve , reject ) => {
302
+ return new Promise ( ( resolve , reject ) => {
305
303
stream . pipe ( istream )
306
304
stream . on ( 'error' , reject )
307
305
istream . on ( 'error' , reject )
@@ -354,11 +352,10 @@ function checkData (data, sri, opts) {
354
352
module . exports . checkStream = checkStream
355
353
function checkStream ( stream , sri , opts ) {
356
354
opts = SsriOpts ( opts )
357
- const P = opts . Promise || Promise
358
355
const checker = integrityStream ( opts . concat ( {
359
356
integrity : sri
360
357
} ) )
361
- return new P ( ( resolve , reject ) => {
358
+ return new Promise ( ( resolve , reject ) => {
362
359
stream . pipe ( checker )
363
360
stream . on ( 'error' , reject )
364
361
checker . on ( 'error' , reject )
0 commit comments