Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xylabs/promise

Package Overview
Dependencies
Maintainers
7
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/promise - npm Package Compare versions

Comparing version 2.10.0 to 2.10.1

38

dist/index.d.ts

@@ -1,3 +0,35 @@

export { fulfilled } from './fulfilled.js';
export { fulfilledValues } from './fulfilledValues.js';
export { rejected } from './rejected.js';
/**
* For use with Promise.allSettled to filter only successful results
* @param val
* @returns
*/
declare const fulfilled: <T>(val: PromiseSettledResult<T>) => val is PromiseFulfilledResult<T>;
/**
* For use with Promise.allSettled to reduce to only successful result values
* @example <caption>Casting the initialValue provided to reduce</caption>
* const resolved = Promise.resolve('resolved')
* const rejected = Promise.reject('rejected')
* const settled = await Promise.allSettled([resolved, rejected])
* const results = settled.reduce(fulfilledValues, [] as string[])
* // results === [ 'resolved' ]
* @example <caption>Providing type parameter to reduce and initialValue type can be inferred</caption>
* const resolved = Promise.resolve('resolved')
* const rejected = Promise.reject('rejected')
* const settled = await Promise.allSettled([resolved, rejected])
* const results = settled.reduce<string[]>(fulfilledValues, [])
* // results === [ 'resolved' ]
* @param previousValue
* @param currentValue
* @returns
*/
declare const fulfilledValues: <T>(previousValue: T[], currentValue: PromiseSettledResult<T>) => T[];
/**
* For use with Promise.allSettled to filter only rejected results
* @param val
* @returns
*/
declare const rejected: <T>(val: PromiseSettledResult<T>) => val is PromiseRejectedResult;
export { fulfilled, fulfilledValues, rejected };

2

package.json

@@ -68,3 +68,3 @@ {

"sideEffects": false,
"version": "2.10.0"
"version": "2.10.1"
}

@@ -8,8 +8,10 @@ import { defineConfig } from 'tsup'

clean: true,
dts: true,
entry: ['src'],
dts: {
entry: ['src/index.ts'],
},
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
sourcemap: true,
splitting: false,
tsconfig: 'tsconfig.json',
tsconfig: 'tsconfig.build.json',
})

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc