dub 0.72.1 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/funcs/payoutsList.js +1 -0
- package/dist/commonjs/funcs/payoutsList.js.map +1 -1
- package/dist/commonjs/hooks/types.d.ts +1 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/encodings.js +12 -12
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/matchers.js +3 -3
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/primitives.d.ts +1 -0
- package/dist/commonjs/lib/primitives.d.ts.map +1 -1
- package/dist/commonjs/lib/primitives.js +18 -0
- package/dist/commonjs/lib/primitives.js.map +1 -1
- package/dist/commonjs/lib/retries.js +7 -0
- package/dist/commonjs/lib/retries.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +50 -16
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/models/components/folderschema.d.ts +3 -3
- package/dist/commonjs/models/components/folderschema.js +2 -2
- package/dist/commonjs/models/components/folderschema.js.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.d.ts +2 -0
- package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.js +2 -0
- package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/linkclickedevent.d.ts +2 -0
- package/dist/commonjs/models/components/linkclickedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/linkclickedevent.js +2 -0
- package/dist/commonjs/models/components/linkclickedevent.js.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts +1 -0
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.js +1 -0
- package/dist/commonjs/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.d.ts +2 -0
- package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.js +2 -0
- package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
- package/dist/commonjs/models/operations/checkdomainstatus.d.ts +26 -4
- package/dist/commonjs/models/operations/checkdomainstatus.d.ts.map +1 -1
- package/dist/commonjs/models/operations/checkdomainstatus.js +13 -2
- package/dist/commonjs/models/operations/checkdomainstatus.js.map +1 -1
- package/dist/commonjs/models/operations/createfolder.d.ts +3 -3
- package/dist/commonjs/models/operations/createfolder.js +2 -2
- package/dist/commonjs/models/operations/createfolder.js.map +1 -1
- package/dist/commonjs/models/operations/createpartner.d.ts +1 -0
- package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createpartner.js +1 -0
- package/dist/commonjs/models/operations/createpartner.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +3 -0
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +3 -0
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listpartners.d.ts +1 -0
- package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpartners.js +1 -0
- package/dist/commonjs/models/operations/listpartners.js.map +1 -1
- package/dist/commonjs/models/operations/listpayouts.d.ts +7 -0
- package/dist/commonjs/models/operations/listpayouts.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpayouts.js +3 -0
- package/dist/commonjs/models/operations/listpayouts.js.map +1 -1
- package/dist/esm/funcs/payoutsList.js +1 -0
- package/dist/esm/funcs/payoutsList.js.map +1 -1
- package/dist/esm/hooks/types.d.ts +1 -0
- package/dist/esm/hooks/types.d.ts.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/encodings.js +1 -1
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/matchers.js +1 -1
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/primitives.d.ts +1 -0
- package/dist/esm/lib/primitives.d.ts.map +1 -1
- package/dist/esm/lib/primitives.js +17 -0
- package/dist/esm/lib/primitives.js.map +1 -1
- package/dist/esm/lib/retries.js +7 -0
- package/dist/esm/lib/retries.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +50 -16
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/models/components/folderschema.d.ts +3 -3
- package/dist/esm/models/components/folderschema.js +2 -2
- package/dist/esm/models/components/folderschema.js.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.d.ts +2 -0
- package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.js +2 -0
- package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
- package/dist/esm/models/components/linkclickedevent.d.ts +2 -0
- package/dist/esm/models/components/linkclickedevent.d.ts.map +1 -1
- package/dist/esm/models/components/linkclickedevent.js +2 -0
- package/dist/esm/models/components/linkclickedevent.js.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.d.ts +1 -0
- package/dist/esm/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.js +1 -0
- package/dist/esm/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/esm/models/components/salecreatedevent.d.ts +2 -0
- package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/salecreatedevent.js +2 -0
- package/dist/esm/models/components/salecreatedevent.js.map +1 -1
- package/dist/esm/models/operations/checkdomainstatus.d.ts +26 -4
- package/dist/esm/models/operations/checkdomainstatus.d.ts.map +1 -1
- package/dist/esm/models/operations/checkdomainstatus.js +11 -1
- package/dist/esm/models/operations/checkdomainstatus.js.map +1 -1
- package/dist/esm/models/operations/createfolder.d.ts +3 -3
- package/dist/esm/models/operations/createfolder.js +2 -2
- package/dist/esm/models/operations/createfolder.js.map +1 -1
- package/dist/esm/models/operations/createpartner.d.ts +1 -0
- package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
- package/dist/esm/models/operations/createpartner.js +1 -0
- package/dist/esm/models/operations/createpartner.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +3 -0
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +3 -0
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listpartners.d.ts +1 -0
- package/dist/esm/models/operations/listpartners.d.ts.map +1 -1
- package/dist/esm/models/operations/listpartners.js +1 -0
- package/dist/esm/models/operations/listpartners.js.map +1 -1
- package/dist/esm/models/operations/listpayouts.d.ts +7 -0
- package/dist/esm/models/operations/listpayouts.d.ts.map +1 -1
- package/dist/esm/models/operations/listpayouts.js +3 -0
- package/dist/esm/models/operations/listpayouts.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/payoutsList.ts +1 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/retries.ts +8 -0
- package/src/lib/sdks.ts +54 -17
- package/src/models/components/folderschema.ts +4 -4
- package/src/models/components/leadcreatedevent.ts +4 -0
- package/src/models/components/linkclickedevent.ts +4 -0
- package/src/models/components/partnerenrolledevent.ts +1 -0
- package/src/models/components/salecreatedevent.ts +4 -0
- package/src/models/operations/checkdomainstatus.ts +43 -5
- package/src/models/operations/createfolder.ts +4 -4
- package/src/models/operations/createpartner.ts +1 -0
- package/src/models/operations/listevents.ts +6 -0
- package/src/models/operations/listpartners.ts +1 -0
- package/src/models/operations/listpayouts.ts +8 -0
- package/dist/commonjs/lib/dlv.d.ts +0 -14
- package/dist/commonjs/lib/dlv.d.ts.map +0 -1
- package/dist/commonjs/lib/dlv.js +0 -49
- package/dist/commonjs/lib/dlv.js.map +0 -1
- package/dist/commonjs/lib/is-plain-object.d.ts +0 -2
- package/dist/commonjs/lib/is-plain-object.d.ts.map +0 -1
- package/dist/commonjs/lib/is-plain-object.js +0 -41
- package/dist/commonjs/lib/is-plain-object.js.map +0 -1
- package/dist/esm/lib/dlv.d.ts +0 -14
- package/dist/esm/lib/dlv.d.ts.map +0 -1
- package/dist/esm/lib/dlv.js +0 -46
- package/dist/esm/lib/dlv.js.map +0 -1
- package/dist/esm/lib/is-plain-object.d.ts +0 -2
- package/dist/esm/lib/is-plain-object.d.ts.map +0 -1
- package/dist/esm/lib/is-plain-object.js +0 -38
- package/dist/esm/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
|
@@ -19,6 +19,20 @@ export type CheckDomainStatusRequest = {
|
|
|
19
19
|
domains: string | Array<string>;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Price details for the domain. Will be null if the domain is not available.
|
|
24
|
+
*/
|
|
25
|
+
export type Prices = {
|
|
26
|
+
/**
|
|
27
|
+
* The domain's registration price in USD cents.
|
|
28
|
+
*/
|
|
29
|
+
registration: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* The domain's renewal price in USD cents.
|
|
32
|
+
*/
|
|
33
|
+
renewal: number | null;
|
|
34
|
+
};
|
|
35
|
+
|
|
22
36
|
export type CheckDomainStatusResponseBody = {
|
|
23
37
|
/**
|
|
24
38
|
* The domain name.
|
|
@@ -28,14 +42,20 @@ export type CheckDomainStatusResponseBody = {
|
|
|
28
42
|
* Whether the domain is available.
|
|
29
43
|
*/
|
|
30
44
|
available: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* The price description.
|
|
33
|
-
*/
|
|
34
|
-
price: string | null;
|
|
35
45
|
/**
|
|
36
46
|
* Whether the domain is a premium domain.
|
|
37
47
|
*/
|
|
38
48
|
premium: boolean | null;
|
|
49
|
+
/**
|
|
50
|
+
* Price details for the domain. Will be null if the domain is not available.
|
|
51
|
+
*/
|
|
52
|
+
prices: Prices | null;
|
|
53
|
+
/**
|
|
54
|
+
* Deprecated: Use `prices` instead.
|
|
55
|
+
*
|
|
56
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
57
|
+
*/
|
|
58
|
+
price: string | null;
|
|
39
59
|
};
|
|
40
60
|
|
|
41
61
|
/** @internal */
|
|
@@ -74,6 +94,23 @@ export function checkDomainStatusRequestToJSON(
|
|
|
74
94
|
);
|
|
75
95
|
}
|
|
76
96
|
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const Prices$inboundSchema: z.ZodType<Prices, z.ZodTypeDef, unknown> = z
|
|
99
|
+
.object({
|
|
100
|
+
registration: z.nullable(z.number()),
|
|
101
|
+
renewal: z.nullable(z.number()),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export function pricesFromJSON(
|
|
105
|
+
jsonString: string,
|
|
106
|
+
): SafeParseResult<Prices, SDKValidationError> {
|
|
107
|
+
return safeParse(
|
|
108
|
+
jsonString,
|
|
109
|
+
(x) => Prices$inboundSchema.parse(JSON.parse(x)),
|
|
110
|
+
`Failed to parse 'Prices' from JSON`,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
77
114
|
/** @internal */
|
|
78
115
|
export const CheckDomainStatusResponseBody$inboundSchema: z.ZodType<
|
|
79
116
|
CheckDomainStatusResponseBody,
|
|
@@ -82,8 +119,9 @@ export const CheckDomainStatusResponseBody$inboundSchema: z.ZodType<
|
|
|
82
119
|
> = z.object({
|
|
83
120
|
domain: z.string(),
|
|
84
121
|
available: z.boolean(),
|
|
85
|
-
price: z.nullable(z.string()),
|
|
86
122
|
premium: z.nullable(z.boolean()),
|
|
123
|
+
prices: z.nullable(z.lazy(() => Prices$inboundSchema)),
|
|
124
|
+
price: z.nullable(z.string()),
|
|
87
125
|
});
|
|
88
126
|
|
|
89
127
|
export function checkDomainStatusResponseBodyFromJSON(
|
|
@@ -6,14 +6,14 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* The access level
|
|
9
|
+
* The workspace-level access level settings for the folder. Default is `write` which allows full access to the folder for all team members. The other options are `read` (view-only access) and `null` (no access) and are only available on Business plans and above.
|
|
10
10
|
*/
|
|
11
11
|
export const AccessLevel = {
|
|
12
12
|
Write: "write",
|
|
13
13
|
Read: "read",
|
|
14
14
|
} as const;
|
|
15
15
|
/**
|
|
16
|
-
* The access level
|
|
16
|
+
* The workspace-level access level settings for the folder. Default is `write` which allows full access to the folder for all team members. The other options are `read` (view-only access) and `null` (no access) and are only available on Business plans and above.
|
|
17
17
|
*/
|
|
18
18
|
export type AccessLevel = ClosedEnum<typeof AccessLevel>;
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ export type CreateFolderRequestBody = {
|
|
|
27
27
|
*/
|
|
28
28
|
description?: string | null | undefined;
|
|
29
29
|
/**
|
|
30
|
-
* The access level
|
|
30
|
+
* The workspace-level access level settings for the folder. Default is `write` which allows full access to the folder for all team members. The other options are `read` (view-only access) and `null` (no access) and are only available on Business plans and above.
|
|
31
31
|
*/
|
|
32
32
|
accessLevel?: AccessLevel | null | undefined;
|
|
33
33
|
};
|
|
@@ -51,7 +51,7 @@ export const CreateFolderRequestBody$outboundSchema: z.ZodType<
|
|
|
51
51
|
> = z.object({
|
|
52
52
|
name: z.string(),
|
|
53
53
|
description: z.nullable(z.string()).optional(),
|
|
54
|
-
accessLevel: z.nullable(AccessLevel$outboundSchema
|
|
54
|
+
accessLevel: z.nullable(AccessLevel$outboundSchema.default("write")),
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
export function createFolderRequestBodyToJSON(
|
|
@@ -180,6 +180,7 @@ export const CreatePartnerDefaultPayoutMethod = {
|
|
|
180
180
|
Connect: "connect",
|
|
181
181
|
Stablecoin: "stablecoin",
|
|
182
182
|
Paypal: "paypal",
|
|
183
|
+
Tremendous: "tremendous",
|
|
183
184
|
} as const;
|
|
184
185
|
/**
|
|
185
186
|
* The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal
|
|
@@ -483,6 +483,7 @@ export type ListEventsResponseBodyClick = {
|
|
|
483
483
|
device: string;
|
|
484
484
|
browser: string;
|
|
485
485
|
os: string;
|
|
486
|
+
ua?: string | null | undefined;
|
|
486
487
|
trigger?: string | null | undefined;
|
|
487
488
|
referer: string;
|
|
488
489
|
refererUrl: string;
|
|
@@ -660,6 +661,7 @@ export type ResponseBodyClick = {
|
|
|
660
661
|
device: string;
|
|
661
662
|
browser: string;
|
|
662
663
|
os: string;
|
|
664
|
+
ua?: string | null | undefined;
|
|
663
665
|
trigger?: string | null | undefined;
|
|
664
666
|
referer: string;
|
|
665
667
|
refererUrl: string;
|
|
@@ -986,6 +988,7 @@ export type ListEventsResponseBodyEventsClick = {
|
|
|
986
988
|
device: string;
|
|
987
989
|
browser: string;
|
|
988
990
|
os: string;
|
|
991
|
+
ua?: string | null | undefined;
|
|
989
992
|
trigger?: string | null | undefined;
|
|
990
993
|
referer: string;
|
|
991
994
|
refererUrl: string;
|
|
@@ -1542,6 +1545,7 @@ export const ListEventsResponseBodyClick$inboundSchema: z.ZodType<
|
|
|
1542
1545
|
device: z.string(),
|
|
1543
1546
|
browser: z.string(),
|
|
1544
1547
|
os: z.string(),
|
|
1548
|
+
ua: z.nullable(z.string()).optional(),
|
|
1545
1549
|
trigger: z.nullable(z.string()).optional(),
|
|
1546
1550
|
referer: z.string(),
|
|
1547
1551
|
refererUrl: z.string(),
|
|
@@ -1655,6 +1659,7 @@ export const ResponseBodyClick$inboundSchema: z.ZodType<
|
|
|
1655
1659
|
device: z.string(),
|
|
1656
1660
|
browser: z.string(),
|
|
1657
1661
|
os: z.string(),
|
|
1662
|
+
ua: z.nullable(z.string()).optional(),
|
|
1658
1663
|
trigger: z.nullable(z.string()).optional(),
|
|
1659
1664
|
referer: z.string(),
|
|
1660
1665
|
refererUrl: z.string(),
|
|
@@ -1862,6 +1867,7 @@ export const ListEventsResponseBodyEventsClick$inboundSchema: z.ZodType<
|
|
|
1862
1867
|
device: z.string(),
|
|
1863
1868
|
browser: z.string(),
|
|
1864
1869
|
os: z.string(),
|
|
1870
|
+
ua: z.nullable(z.string()).optional(),
|
|
1865
1871
|
trigger: z.nullable(z.string()).optional(),
|
|
1866
1872
|
referer: z.string(),
|
|
1867
1873
|
refererUrl: z.string(),
|
|
@@ -132,6 +132,7 @@ export const DefaultPayoutMethod = {
|
|
|
132
132
|
Connect: "connect",
|
|
133
133
|
Stablecoin: "stablecoin",
|
|
134
134
|
Paypal: "paypal",
|
|
135
|
+
Tremendous: "tremendous",
|
|
135
136
|
} as const;
|
|
136
137
|
/**
|
|
137
138
|
* The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal
|
|
@@ -73,6 +73,10 @@ export type ListPayoutsRequest = {
|
|
|
73
73
|
* Filter the list of payouts by invoice ID (the unique ID of the invoice you receive for each batch payout you process on Dub). Pending payouts will not have an invoice ID.
|
|
74
74
|
*/
|
|
75
75
|
invoiceId?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Filter the list of payouts by the associated partner group. Supports advanced filtering: single value, multiple values (comma-separated), or exclusion (prefix with `-`). Examples: `group_abc`, `group_abc,group_xyz`, `-group_abc`.
|
|
78
|
+
*/
|
|
79
|
+
groupId?: string | undefined;
|
|
76
80
|
/**
|
|
77
81
|
* The field to sort the list of payouts by.
|
|
78
82
|
*/
|
|
@@ -112,6 +116,7 @@ export const Method = {
|
|
|
112
116
|
Connect: "connect",
|
|
113
117
|
Stablecoin: "stablecoin",
|
|
114
118
|
Paypal: "paypal",
|
|
119
|
+
Tremendous: "tremendous",
|
|
115
120
|
} as const;
|
|
116
121
|
export type Method = ClosedEnum<typeof Method>;
|
|
117
122
|
|
|
@@ -122,6 +127,7 @@ export const ListPayoutsDefaultPayoutMethod = {
|
|
|
122
127
|
Connect: "connect",
|
|
123
128
|
Stablecoin: "stablecoin",
|
|
124
129
|
Paypal: "paypal",
|
|
130
|
+
Tremendous: "tremendous",
|
|
125
131
|
} as const;
|
|
126
132
|
/**
|
|
127
133
|
* The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal
|
|
@@ -218,6 +224,7 @@ export type ListPayoutsRequest$Outbound = {
|
|
|
218
224
|
partnerId?: string | undefined;
|
|
219
225
|
tenantId?: string | undefined;
|
|
220
226
|
invoiceId?: string | undefined;
|
|
227
|
+
groupId?: string | undefined;
|
|
221
228
|
sortBy: string;
|
|
222
229
|
sortOrder: string;
|
|
223
230
|
page?: number | undefined;
|
|
@@ -234,6 +241,7 @@ export const ListPayoutsRequest$outboundSchema: z.ZodType<
|
|
|
234
241
|
partnerId: z.string().optional(),
|
|
235
242
|
tenantId: z.string().optional(),
|
|
236
243
|
invoiceId: z.string().optional(),
|
|
244
|
+
groupId: z.string().optional(),
|
|
237
245
|
sortBy: ListPayoutsQueryParamSortBy$outboundSchema.default("amount"),
|
|
238
246
|
sortOrder: ListPayoutsQueryParamSortOrder$outboundSchema.default("desc"),
|
|
239
247
|
page: z.number().optional(),
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param obj The object to walk
|
|
3
|
-
* @param key The key path to walk the object with
|
|
4
|
-
* @param def A default value to return if the result is undefined
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* dlv(obj, "a.b.c.d")
|
|
8
|
-
* @example
|
|
9
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
10
|
-
* @example
|
|
11
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
12
|
-
*/
|
|
13
|
-
export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
|
|
14
|
-
//# sourceMappingURL=dlv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.d.ts","sourceRoot":"","sources":["../../../src/lib/dlv.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,CAAC,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC,GAAG,SAAS,CAOf"}
|
package/dist/commonjs/lib/dlv.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.dlv = dlv;
|
|
7
|
-
/*
|
|
8
|
-
MIT License
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
13
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
14
|
-
the Software without restriction, including without limitation the rights to
|
|
15
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
16
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
17
|
-
subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
24
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
25
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
26
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
27
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* @param obj The object to walk
|
|
31
|
-
* @param key The key path to walk the object with
|
|
32
|
-
* @param def A default value to return if the result is undefined
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* dlv(obj, "a.b.c.d")
|
|
36
|
-
* @example
|
|
37
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
38
|
-
* @example
|
|
39
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
40
|
-
*/
|
|
41
|
-
function dlv(obj, key, def, p, undef) {
|
|
42
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
43
|
-
for (p = 0; p < key.length; p++) {
|
|
44
|
-
const k = key[p];
|
|
45
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
46
|
-
}
|
|
47
|
-
return obj === undef ? def : obj;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=dlv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.js","sourceRoot":"","sources":["../../../src/lib/dlv.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAqCH,kBAaC;AAhDD;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF;;;;;;;;;;;GAWG;AACH,SAAgB,GAAG,CACjB,GAAQ,EACR,GAAsB,EACtB,GAAO,EACP,CAAU,EACV,KAAa;IAEb,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.ts","sourceRoot":"","sources":["../../../src/lib/is-plain-object.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAa7D"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isPlainObject = isPlainObject;
|
|
7
|
-
/*
|
|
8
|
-
MIT License
|
|
9
|
-
|
|
10
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
13
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
14
|
-
the Software without restriction, including without limitation the rights to
|
|
15
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
16
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
17
|
-
subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
24
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
25
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
26
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
27
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
*/
|
|
29
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
30
|
-
function isPlainObject(value) {
|
|
31
|
-
if (typeof value !== "object" || value === null) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
const prototype = Object.getPrototypeOf(value);
|
|
35
|
-
return ((prototype === null ||
|
|
36
|
-
prototype === Object.prototype ||
|
|
37
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
38
|
-
!(Symbol.toStringTag in value) &&
|
|
39
|
-
!(Symbol.iterator in value));
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=is-plain-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.js","sourceRoot":"","sources":["../../../src/lib/is-plain-object.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA2BH,sCAaC;AAtCD;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF,iHAAiH;AAEjH,SAAgB,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CACL,CAAC,SAAS,KAAK,IAAI;QACjB,SAAS,KAAK,MAAM,CAAC,SAAS;QAC9B,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;QAC5C,CAAC,CAAC,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC;QAC9B,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,CAC5B,CAAC;AACJ,CAAC"}
|
package/dist/esm/lib/dlv.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param obj The object to walk
|
|
3
|
-
* @param key The key path to walk the object with
|
|
4
|
-
* @param def A default value to return if the result is undefined
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* dlv(obj, "a.b.c.d")
|
|
8
|
-
* @example
|
|
9
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
10
|
-
* @example
|
|
11
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
12
|
-
*/
|
|
13
|
-
export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
|
|
14
|
-
//# sourceMappingURL=dlv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.d.ts","sourceRoot":"","sources":["../../../src/lib/dlv.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,CAAC,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC,GAAG,SAAS,CAOf"}
|
package/dist/esm/lib/dlv.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
/*
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
10
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
11
|
-
the Software without restriction, including without limitation the rights to
|
|
12
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
13
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
14
|
-
subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
21
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
22
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
23
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
24
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* @param obj The object to walk
|
|
28
|
-
* @param key The key path to walk the object with
|
|
29
|
-
* @param def A default value to return if the result is undefined
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* dlv(obj, "a.b.c.d")
|
|
33
|
-
* @example
|
|
34
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
35
|
-
* @example
|
|
36
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
37
|
-
*/
|
|
38
|
-
export function dlv(obj, key, def, p, undef) {
|
|
39
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
40
|
-
for (p = 0; p < key.length; p++) {
|
|
41
|
-
const k = key[p];
|
|
42
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
43
|
-
}
|
|
44
|
-
return obj === undef ? def : obj;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=dlv.js.map
|
package/dist/esm/lib/dlv.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.js","sourceRoot":"","sources":["../../../src/lib/dlv.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,GAAG,CACjB,GAAQ,EACR,GAAsB,EACtB,GAAO,EACP,CAAU,EACV,KAAa;IAEb,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.ts","sourceRoot":"","sources":["../../../src/lib/is-plain-object.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAa7D"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
/*
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
10
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
11
|
-
the Software without restriction, including without limitation the rights to
|
|
12
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
13
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
14
|
-
subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
21
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
22
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
23
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
24
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
-
*/
|
|
26
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
27
|
-
export function isPlainObject(value) {
|
|
28
|
-
if (typeof value !== "object" || value === null) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
const prototype = Object.getPrototypeOf(value);
|
|
32
|
-
return ((prototype === null ||
|
|
33
|
-
prototype === Object.prototype ||
|
|
34
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
35
|
-
!(Symbol.toStringTag in value) &&
|
|
36
|
-
!(Symbol.iterator in value));
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=is-plain-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.js","sourceRoot":"","sources":["../../../src/lib/is-plain-object.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF,iHAAiH;AAEjH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CACL,CAAC,SAAS,KAAK,IAAI;QACjB,SAAS,KAAK,MAAM,CAAC,SAAS;QAC9B,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;QAC5C,CAAC,CAAC,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC;QAC9B,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,CAC5B,CAAC;AACJ,CAAC"}
|
package/src/lib/dlv.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param obj The object to walk
|
|
30
|
-
* @param key The key path to walk the object with
|
|
31
|
-
* @param def A default value to return if the result is undefined
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* dlv(obj, "a.b.c.d")
|
|
35
|
-
* @example
|
|
36
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
37
|
-
* @example
|
|
38
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
39
|
-
*/
|
|
40
|
-
export function dlv<T = any>(
|
|
41
|
-
obj: any,
|
|
42
|
-
key: string | string[],
|
|
43
|
-
def?: T,
|
|
44
|
-
p?: number,
|
|
45
|
-
undef?: never,
|
|
46
|
-
): T | undefined {
|
|
47
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
48
|
-
for (p = 0; p < key.length; p++) {
|
|
49
|
-
const k = key[p];
|
|
50
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
51
|
-
}
|
|
52
|
-
return obj === undef ? def : obj;
|
|
53
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
29
|
-
|
|
30
|
-
export function isPlainObject(value: unknown): value is object {
|
|
31
|
-
if (typeof value !== "object" || value === null) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const prototype = Object.getPrototypeOf(value);
|
|
36
|
-
return (
|
|
37
|
-
(prototype === null ||
|
|
38
|
-
prototype === Object.prototype ||
|
|
39
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
40
|
-
!(Symbol.toStringTag in value) &&
|
|
41
|
-
!(Symbol.iterator in value)
|
|
42
|
-
);
|
|
43
|
-
}
|