appolo-utils
Advanced tools
Comparing version 0.0.44 to 0.0.45
@@ -83,3 +83,3 @@ "use strict"; | ||
} | ||
static pick(obj, pick) { | ||
static pick(obj, ...pick) { | ||
let out = {}; | ||
@@ -92,3 +92,3 @@ for (let i = 0; i < pick.length; i++) { | ||
} | ||
static omit(obj, omit) { | ||
static omit(obj, ...omit) { | ||
let out = {}, keys = Object.keys(obj || {}), omitIndex = arrays_1.Arrays.keyBy(omit); | ||
@@ -95,0 +95,0 @@ for (let i = 0; i < keys.length; i++) { |
@@ -114,3 +114,3 @@ import {Arrays} from "./arrays"; | ||
public static pick<T extends object, U extends keyof T>(obj: T, pick: U[]): Pick<T, U> { | ||
public static pick<T extends object, U extends keyof T>(obj: T, ...pick: U[]): Pick<T, U> { | ||
let out: any = {}; | ||
@@ -125,3 +125,3 @@ for (let i = 0; i < pick.length; i++) { | ||
public static omit<T extends object, U extends keyof T>(obj: T, omit: U[]): Omit<T, U> { | ||
public static omit<T extends object, U extends keyof T>(obj: T, ...omit: U[]): Omit<T, U> { | ||
let out: any = {}, keys = Object.keys(obj || {}), omitIndex = Arrays.keyBy(omit); | ||
@@ -128,0 +128,0 @@ for (let i = 0; i < keys.length; i++) { |
@@ -17,3 +17,3 @@ { | ||
"main": "./index.js", | ||
"version": "0.0.44", | ||
"version": "0.0.45", | ||
"license": "MIT", | ||
@@ -20,0 +20,0 @@ "repository": { |
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
101860