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

@xylabs/object

Package Overview
Dependencies
Maintainers
5
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/object - npm Package Compare versions

Comparing version 4.4.10 to 4.4.11

5

dist/neutral/omitBy.d.ts

@@ -1,3 +0,4 @@

export type OmitByPredicate<T extends object> = (value: T[keyof T], key: keyof T) => boolean;
export declare const omitBy: <T extends object>(obj: T, predicate: OmitByPredicate<T>) => Partial<T>;
import type { EmptyObject } from './EmptyObject.ts';
export type OmitByPredicate<T extends EmptyObject = Record<string, unknown>> = (value: T[keyof T], key: keyof T) => boolean;
export declare const omitBy: <T extends EmptyObject>(obj: T, predicate: OmitByPredicate, maxDepth?: number) => Partial<T>;
//# sourceMappingURL=omitBy.d.ts.map

10

package.json
{
"name": "@xylabs/object",
"version": "4.4.10",
"version": "4.4.11",
"description": "Primary SDK for using XYO Protocol 2.0",

@@ -32,6 +32,6 @@ "homepage": "https://xyo.network",

"dependencies": {
"@xylabs/assert": "^4.4.10",
"@xylabs/logger": "^4.4.10",
"@xylabs/promise": "^4.4.10",
"@xylabs/typeof": "^4.4.10"
"@xylabs/assert": "^4.4.11",
"@xylabs/logger": "^4.4.11",
"@xylabs/promise": "^4.4.11",
"@xylabs/typeof": "^4.4.11"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -1,9 +0,17 @@

export type OmitByPredicate<T extends object> = (value: T[keyof T], key: keyof T) => boolean
import type { EmptyObject } from './EmptyObject.ts'
import type { JsonObject } from './JsonObject.ts'
export const omitBy = <T extends object>(
export type OmitByPredicate<T extends EmptyObject = Record<string, unknown>> = (value: T[keyof T], key: keyof T) => boolean
export const omitBy = <T extends EmptyObject>(
obj: T,
predicate: OmitByPredicate<T>,
predicate: OmitByPredicate,
maxDepth = 1,
): Partial<T> => {
const result: Partial<T> = {}
if (maxDepth <= 0) {
return obj
}
const result: JsonObject = {}
for (const key in obj) {

@@ -13,3 +21,3 @@ if (Object.hasOwn(obj, key)) {

if (!predicate(value, key)) {
result[key] = value
result[key] = ((value !== null && typeof value === 'object') ? omitBy(value, predicate, maxDepth - 1) : value) as JsonObject
}

@@ -19,3 +27,3 @@ }

return result
return result as T
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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