File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- // Lightweight serverless version - requires resource loading at runtime
21export * from 'libphonenumber-js'
2+
3+ import { type Document , deserialize } from 'bson'
34import type { PhoneNumber } from 'libphonenumber-js'
5+ import { type LRU , lru } from 'tiny-lru'
46import type { CarrierLocale , GeocoderLocale } from './locales'
5- import { deserialize , type Document } from 'bson'
6- import { lru , type LRU } from 'tiny-lru'
77
88const DEFAULT_CACHE_SIZE = 100
99let codeDataCache : LRU < Document > = lru < Document > ( DEFAULT_CACHE_SIZE )
1010
1111// Resource loader interface - platforms must implement this
1212export interface ResourceLoader {
1313 loadResource ( path : string ) : Promise < Uint8Array | null >
14+
1415 loadResourceSync ?( path : string ) : Uint8Array | null
1516}
1617
You can’t perform that action at this time.
0 commit comments