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.4 to 2.5.5

26

lib/idx.d.ts

@@ -17,5 +17,5 @@ /**

*/
type DeepRequiredObject<T> = {
[P in keyof T]-?: DeepRequired<NonNullable<T[P]>>
};
type DeepRequiredObject<T> = T extends object
? {[P in keyof T]-?: DeepRequired<NonNullable<T[P]>>}
: T;

@@ -45,17 +45,7 @@ /**

*/
type UnboxDeepRequired<T> = T extends string
? string
: T extends number
? number
: T extends boolean
? boolean
: T extends symbol
? symbol
: T extends bigint
? bigint
: T extends DeepRequiredArray<infer R>
? Array<R>
: T extends (...args: infer A) => DeepRequired<infer R>
? (...args: A) => UnboxDeepRequired<R>
: T extends DeepRequiredObject<infer R> ? R : T;
type UnboxDeepRequired<T> = T extends DeepRequiredArray<infer R>
? Array<R>
: T extends (...args: infer A) => DeepRequired<infer R>
? (...args: A) => UnboxDeepRequired<R>
: T extends DeepRequiredObject<infer R> ? R : T;

@@ -62,0 +52,0 @@ /**

@@ -77,1 +77,14 @@ import idx, {IDXOptional} from './idx';

});
it('can unbox enums', () => {
enum Enum {
ONE = 'ONE',
}
type WithEnum = {
foo?: {
enum?: Enum;
};
};
let e: IDXOptional<Enum> = idx({} as WithEnum, _ => _.foo.enum);
});
{
"name": "idx",
"version": "2.5.4",
"version": "2.5.5",
"description": "Utility function for traversing properties on objects and arrays.",

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

"flow-bin": "^0.92.1",
"jest": "^19.0.2"
"jest": "^19.0.2",
"typescript": "^3.3.3333"
},

@@ -32,3 +33,3 @@ "jest": {

},
"gitHead": "361d07e4979cf7b2b53ad79481411dc1b11dc96a"
"gitHead": "e66b4a6bd1873479d261ba96e3a3ef5c6855bdaf"
}
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