helper-fns
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -18,3 +18,3 @@ interface ISlugifyOptions { | ||
}; | ||
export declare const omit: (obj: Record<string, any>, arr: string[]) => Record<string, any>; | ||
export declare const omit: <T, K extends keyof T>(obj: T, keys: K[]) => Omit<T, K>; | ||
export declare const orderBy: (arr: any, props: any[], orders: Record<string, string>) => void; | ||
@@ -21,0 +21,0 @@ export declare const pipes: (...fns: any[]) => any; |
@@ -7,3 +7,2 @@ "use strict"; | ||
const fs = require("fs"); | ||
; | ||
const DOT_REG = /\./g; | ||
@@ -50,6 +49,10 @@ const isEmpty = (obj) => { | ||
exports.memoize = memoize; | ||
const omit = (obj, arr) => { | ||
return Object.keys(obj) | ||
.filter(k => !arr.includes(k)) | ||
.reduce((acc, key) => ((acc[key] = obj[key]), acc), {}); | ||
const omit = (obj, keys) => { | ||
const ret = {}; | ||
Object.keys(obj).forEach(key => { | ||
if (!key) { | ||
ret[key] = obj[key]; | ||
} | ||
}); | ||
return ret; | ||
}; | ||
@@ -56,0 +59,0 @@ exports.omit = omit; |
{ | ||
"name": "helper-fns", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Some common utilities functions for everyday backend usage with zero dependencies", | ||
@@ -27,12 +27,12 @@ "scripts": { | ||
"devDependencies": { | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.25", | ||
"@types/jest": "^27.5.0", | ||
"@types/node": "^17.0.31", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"husky": "^7.0.4", | ||
"jest": "^27.5.1", | ||
"lint-staged": "^12.4.0", | ||
"jest": "^28.0.3", | ||
"lint-staged": "^12.4.1", | ||
"prettier": "^2.6.2", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^27.1.4", | ||
"typescript": "^4.6.3" | ||
"ts-jest": "^28.0.1", | ||
"typescript": "^4.6.4" | ||
}, | ||
@@ -39,0 +39,0 @@ "publishConfig": { |
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
36374
617