@bscotch/utility
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -10,2 +10,11 @@ export declare type EmptyArray = []; | ||
export declare type Defined<T> = Exclude<T, undefined>; | ||
export declare type ExtractKeysByValue<Container, ValueTypeFilter> = { | ||
[Key in keyof Container]-?: 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 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'; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -0,1 +1,10 @@ | ||
# [1.1.0](https://github.com/bscotch/node-util/compare/v1.0.0...v1.1.0) (2021-04-15) | ||
### Features | ||
* Add utility types for picking/omitting and excluding/extracting objects and their keys based on value types for those keys. ([87ddda0](https://github.com/bscotch/node-util/commit/87ddda0b7d822969c3e73131dcd7b14b721723d4)) | ||
# [1.0.0](https://github.com/bscotch/node-util/compare/v0.16.0...v1.0.0) (2021-04-08) | ||
@@ -2,0 +11,0 @@ |
{ | ||
"name": "@bscotch/utility", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Bscotch Utilities: Methods for common Node.js needs.", | ||
@@ -49,2 +49,4 @@ "engines": { | ||
"eslint": "^7.20.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-tsdoc": "^0.2.11", | ||
"fs-extra": "^9.1.0", | ||
@@ -55,4 +57,5 @@ "mocha": "^8.3.0", | ||
"ts-node": "^9.1.1", | ||
"typedoc": "^0.20.35", | ||
"typescript": "^4.2.2" | ||
} | ||
} |
@@ -37,2 +37,3 @@ # Bscotch Utilities | ||
import { | ||
HttpMethod, | ||
EmptyArray, | ||
@@ -47,2 +48,6 @@ PartialBy, | ||
Defined, | ||
ExtractKeysByValue, | ||
ExcludeKeysByValue, | ||
PickByValue, | ||
OmitByValue, | ||
} from '@bscotch/utility'; | ||
@@ -49,0 +54,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98743
1211
311
18