filter-anything
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -15,4 +15,5 @@ // npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-tree-shaking | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'tree-shaking/no-side-effects-in-initialization': 'error' | ||
'tree-shaking/no-side-effects-in-initialization': 'error', | ||
'@typescript-eslint/ban-ts-comment': 'off' | ||
} | ||
} |
{ | ||
"name": "filter-anything", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"sideEffects": false, | ||
@@ -41,17 +41,17 @@ "description": "A simple (TypeScript) integration of \"pick\" and \"omit\" to filter props of an object", | ||
"dependencies": { | ||
"is-what": "^3.10.0", | ||
"ts-toolbelt": "6.12.2" | ||
"is-what": "^3.11.2", | ||
"ts-toolbelt": "8.0.6" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^2.34.0", | ||
"@typescript-eslint/parser": "^2.34.0", | ||
"ava": "^3.10.1", | ||
"eslint": "^6.8.0", | ||
"@typescript-eslint/eslint-plugin": "^4.1.1", | ||
"@typescript-eslint/parser": "^4.1.1", | ||
"ava": "^3.12.1", | ||
"eslint": "^7.9.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-tree-shaking": "^1.8.0", | ||
"rollup": "^1.32.1", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"rollup": "^2.27.1", | ||
"rollup-plugin-typescript2": "^0.27.2", | ||
"tsconfig-paths": "^3.9.0", | ||
"ts-node": "^8.10.2", | ||
"typescript": "^3.9.6" | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.2" | ||
}, | ||
@@ -58,0 +58,0 @@ "ava": { |
@@ -14,3 +14,3 @@ import { O } from 'ts-toolbelt' | ||
*/ | ||
export function pick<T extends object, K extends string> (obj: T, keys: K[]): O.Pick<T, K> { | ||
export function pick<T extends Record<string, any>, K extends string> (obj: T, keys: K[]): O.Pick<T, K> { | ||
// @ts-ignore | ||
@@ -34,3 +34,3 @@ if (!keys.length) return {} | ||
*/ | ||
export function omit<T extends object, K extends string> (obj: T, keys: K[]): O.Omit<T, K> { | ||
export function omit<T extends Record<string, any>, K extends string> (obj: T, keys: K[]): O.Omit<T, K> { | ||
// @ts-ignore | ||
@@ -37,0 +37,0 @@ return recursiveFilter(obj, [], keys) |
@@ -5,3 +5,3 @@ import { isPlainObject } from 'is-what' | ||
export function recursiveFilter< | ||
T extends object, | ||
T extends Record<string, any>, | ||
KeysToKeep extends string[], | ||
@@ -8,0 +8,0 @@ KeysToDelete extends string[] |
@@ -12,3 +12,3 @@ import { O } from 'ts-toolbelt'; | ||
*/ | ||
export declare function pick<T extends object, K extends string>(obj: T, keys: K[]): O.Pick<T, K>; | ||
export declare function pick<T extends Record<string, any>, K extends string>(obj: T, keys: K[]): O.Pick<T, K>; | ||
export declare const fillable: typeof pick; | ||
@@ -25,3 +25,3 @@ /** | ||
*/ | ||
export declare function omit<T extends object, K extends string>(obj: T, keys: K[]): O.Omit<T, K>; | ||
export declare function omit<T extends Record<string, any>, K extends string>(obj: T, keys: K[]): O.Omit<T, K>; | ||
export declare const guard: typeof omit; |
@@ -1,1 +0,1 @@ | ||
export declare function recursiveFilter<T extends object, KeysToKeep extends string[], KeysToDelete extends string[]>(obj: T, fillables: KeysToKeep, guarded: KeysToDelete, pathUntilNow?: string): T; | ||
export declare function recursiveFilter<T extends Record<string, any>, KeysToKeep extends string[], KeysToDelete extends string[]>(obj: T, fillables: KeysToKeep, guarded: KeysToDelete, pathUntilNow?: string): T; |
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
157127
709
+ Addedts-toolbelt@8.0.6(transitive)
- Removedts-toolbelt@6.12.2(transitive)
Updatedis-what@^3.11.2
Updatedts-toolbelt@8.0.6