File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export = get ;
2+
3+ declare function get < T > ( obj : T ) : T ;
4+ declare function get ( obj : object , key : string | string [ ] , options ?: get . Options ) : any ;
5+
6+ declare namespace get {
7+ interface Options {
8+ /**
9+ * The default value to return when get-value cannot result a value from the given object.
10+ *
11+ * default: `undefined`
12+ */
13+ default ?: any ;
14+ /**
15+ * If defined, this function is called on each resolved value.
16+ * Useful if you want to do `.hasOwnProperty` or `Object.prototype.propertyIsEnumerable`.
17+ */
18+ isValid ?: ( < K extends string > ( key : K , object : Record < K , any > ) => boolean ) | undefined ;
19+ /**
20+ * Custom function to use for splitting the string into object path segments.
21+ *
22+ * default: `String.split`
23+ */
24+ split ?: ( ( s : string ) => string [ ] ) | undefined ;
25+ /**
26+ * The separator to use for spliting the string.
27+ * (this is probably not needed when `options.split` is used).
28+ *
29+ * default: `"."`
30+ */
31+ separator ?: string | RegExp | undefined ;
32+ /**
33+ * Customize how the object path is created when iterating over path segments.
34+ *
35+ * default: `Array.join`
36+ */
37+ join ?: ( ( segs : string [ ] ) => string ) | undefined ;
38+ /**
39+ * The character to use when re-joining the string to check for keys
40+ * with dots in them (this is probably not needed when `options.join` is used).
41+ * This can be a different value than the separator, since the separator can be a string or regex.
42+ *
43+ * default: `"."`
44+ */
45+ joinChar ?: string | undefined ;
46+ }
47+ }
Original file line number Diff line number Diff line change 1717 "tsup" : " npx tsup"
1818 },
1919 "files" : [
20- " dist/index.js"
20+ " dist/index.js" ,
21+ " dist/index.mjs" ,
22+ " index.d.ts"
2123 ],
2224 "main" : " dist/index.js" ,
2325 "module" : " dist/index.mjs" ,
26+ "types" : " index.d.ts" ,
2427 "exports" : {
2528 "." : {
29+ "types" : " ./index.d.ts" ,
2630 "import" : " ./dist/index.mjs" ,
2731 "require" : " ./dist/index.js"
2832 }
You can’t perform that action at this time.
0 commit comments