Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74ccf00
commit fa532a2
Showing
11 changed files
with
14,457 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,6 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Build | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1 @@ | ||
export interface City { | ||
id: number; | ||
name: string; | ||
state_id: number; | ||
state_code: string; | ||
country_id: number; | ||
country_code: string; | ||
latitude: string; | ||
longitude: string; | ||
} | ||
declare type Cities = City[]; | ||
declare type Args = { | ||
filters?: { | ||
country_code?: never; | ||
state_code?: never; | ||
} | { | ||
country_code: string | string[]; | ||
state_code?: string; | ||
}; | ||
sort?: { | ||
mode: 'asc'; | ||
key?: never; | ||
} | { | ||
mode: 'desc'; | ||
key?: never; | ||
} | { | ||
mode: 'alphabetical'; | ||
key: 'name'; | ||
}; | ||
}; | ||
export declare function getCities(args?: Args): Cities; | ||
declare const _default: { | ||
getCities: typeof getCities; | ||
}; | ||
export default _default; | ||
//# sourceMappingURL=cities.d.ts.map | ||
export interface City{id:number;name:string;state_id:number;state_code:string;country_id:number;country_code:string;latitude:string;longitude:string;}declare type Cities=City[];declare type Args={filters?:{country_code?:never;state_code?:never;}|{country_code:string|string[];state_code?:string;};sort?:{mode:'asc';key?:never;}|{mode:'desc';key?:never;}|{mode:'alphabetical';key:'name';};};export declare function getCities(args?:Args):Cities;declare const _default:{getCities:typeof getCities;};export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
export { default as Cities } from './cities'; | ||
export type { City } from './cities'; | ||
export declare type SortType = 'alphabetical' | 'asc' | 'desc'; | ||
//# sourceMappingURL=index.d.ts.map | ||
export{default as Cities}from'./cities';export type{City}from'./cities';export declare type SortType='alphabetical'|'asc'|'desc'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
import { SortType } from './index'; | ||
export declare function dataFiltered<D, F extends keyof D>(data: D[], filters: Record<F, any>): D[]; | ||
declare type O = { | ||
mode: SortType; | ||
key?: any; | ||
}; | ||
export declare function sorter<D, S extends O>(data: D[], options: S): D[]; | ||
export {}; | ||
//# sourceMappingURL=utils.d.ts.map | ||
import{SortType}from'./index';export declare function dataFiltered<D,F extends keyof D>(data:D[],filters:Record<F,any>):D[];declare type O={mode:SortType;key?:any;};export declare function sorter<D,S extends O>(data:D[],options:S):D[];export{}; |
Oops, something went wrong.