Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idx

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idx - npm Package Compare versions

Comparing version 2.5.2 to 2.5.3

8

lib/idx.d.ts

@@ -35,2 +35,8 @@ /**

/**
* UnboxDeepRequired
* Unbox type wraped with DeepRequired
*/
type UnboxDeepRequired<T> = T extends DeepRequired<infer R> ? R : T;
/**
* Traverses properties on objects and arrays. If an intermediate property is

@@ -71,3 +77,3 @@ * either null or undefined, it is instead returned. The purpose of this method

accessor: (prop: NonNullable<DeepRequired<T1>>) => T2,
): T2 | null | undefined;
): UnboxDeepRequired<T2> | null | undefined;
export default idx;

@@ -78,1 +78,10 @@ import idx from './idx';

let b: boolean | undefined | null = idx(withMethods, _ => _.genrric(true));
let foo = idx(withMethods, _ => _.foo);
// foo should be { bar?(): number }
let fooTest1: typeof foo = {};
let fooTest2: typeof foo = {
bar(): number {
return 1;
},
};

7

package.json
{
"name": "idx",
"version": "2.5.2",
"version": "2.5.3",
"description": "Utility function for traversing properties on objects and arrays.",

@@ -24,3 +24,3 @@ "main": "lib/idx.js",

"babel-preset-env": "^1.1.11",
"flow-bin": "^0.73.0",
"flow-bin": "^0.92.1",
"jest": "^19.0.2"

@@ -31,3 +31,4 @@ },

"rootDir": "src"
}
},
"gitHead": "44866f559394971e7a4b354df4ac6166ac2e756d"
}
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