New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bscotch/utility

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bscotch/utility - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

10

build/lib/types.d.ts
export declare type EmptyArray = [];
export declare type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS';
export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;

@@ -11,10 +12,7 @@ export declare type RequiredBy<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;

export declare type ExtractKeysByValue<Container, ValueTypeFilter> = {
[Key in keyof Container]-?: Container[Key] extends ValueTypeFilter ? Key : never;
[Key in keyof Container]-?: Container[Key] extends Function ? ValueTypeFilter extends Container[Key] ? Key : never : Container[Key] extends ValueTypeFilter ? Key : never;
}[keyof Container];
export declare type ExcludeKeysByValue<Container, ValueTypeFilter> = {
[Key in keyof Container]-?: Container[Key] extends ValueTypeFilter ? never : Key;
}[keyof Container];
export declare type ExcludeKeysByValue<Container, ValueTypeFilter> = Exclude<keyof Container, ExtractKeysByValue<Container, ValueTypeFilter>>;
export declare type PickByValue<Container, ValueTypeFilter> = Pick<Container, ExtractKeysByValue<Container, ValueTypeFilter>>;
export declare type OmitByValue<Container, ValueTypeFilter> = Pick<Container, ExcludeKeysByValue<Container, ValueTypeFilter>>;
export declare type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS';
export declare type OmitByValue<Container, ValueTypeFilter> = Omit<Container, ExtractKeysByValue<Container, ValueTypeFilter>>;
//# sourceMappingURL=types.d.ts.map

@@ -0,1 +1,10 @@

## [1.1.1](https://github.com/bscotch/node-util/compare/v1.1.0...v1.1.1) (2021-04-16)
### Bug Fixes
* Update ExtractKeysByValue and related utility types to treat function-type filters differently. Type narrowing with functions in Typescript is weird and not very useful, this way is more likely to do what the user expects. ([573d862](https://github.com/bscotch/node-util/commit/573d8620eae4fd1b9c00e1d093098f64857188db))
# [1.1.0](https://github.com/bscotch/node-util/compare/v1.0.0...v1.1.0) (2021-04-15)

@@ -2,0 +11,0 @@

2

package.json
{
"name": "@bscotch/utility",
"version": "1.1.0",
"version": "1.1.1",
"description": "Bscotch Utilities: Methods for common Node.js needs.",

@@ -5,0 +5,0 @@ "engines": {

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