From bc1a6f1c43e847c0a5d2beda7aedf3e783f9232e Mon Sep 17 00:00:00 2001 From: KillerBossOriginal Date: Mon, 6 Feb 2023 10:15:19 +0100 Subject: [PATCH] Hello There --- data/file.json | 1 + readme.md | 87 ++++++++++++++++++-------- src/index.ts | 141 ++++++++++++++++++++++++++++++++----------- test.js | 12 ++++ tsconfig.tsbuildinfo | 2 +- 5 files changed, 181 insertions(+), 62 deletions(-) create mode 100644 data/file.json create mode 100644 test.js diff --git a/data/file.json b/data/file.json new file mode 100644 index 0000000..e68b324 --- /dev/null +++ b/data/file.json @@ -0,0 +1 @@ +[{"key":"ciao","value":"hello"},{"key":"arrivederci","value":"bye"}] \ No newline at end of file diff --git a/readme.md b/readme.md index 7d783dc..3192bcc 100644 --- a/readme.md +++ b/readme.md @@ -1,34 +1,14 @@ # Mit.db -MapDB A Map that stores data locally and loads it at startup. Written in JavaScript - -### How does it work? - -Map.db works just like the JavaScript built-in **Map**, with the same methods and functionalities, and in fact it uses itself a Map, but while the built-in Map only stores data in internal memory, this module **stores data locally in a file and loads it back in the Map at startup**. - -The purpose of this module is to make the JavaScript built-in Map an actual **database**, and there comes the name `mit.db`: a Map that can be used as a database. - -The file structure is easily accessible and the data is stored in JSON format, allowing manual editing - -You also have the option to only use local storage without touching internal memory - -### Differences - -Although this module works in fact the same way as a Map, there are still some little differences between them, which are listed below: - -> - `Mit#set()` and `Mit#delete()` return **promises** -> - When a value is reassigned to a key, it is only saved in the Map but not in the actual save file, so you always have to **set the key/value pair with the new value**. -> Example: - ```js -const { MapDB } = require('mit.db'); -const mapdb = new MapDB('file.db'); // this is the save file's name + extension +const MitDB = require('mit.db'); +const db = new MitDB('file.db'); // this is the save file's name + extension async function sample() { // assuming 'somekey' exists in the Map and has a value { cool: false } - const data = mapdb.get('somekey'); + const data = db.get('somekey'); // reassigning the 'cool' property a new value data.cool = true; - await mapdb.set('somekey', data); + await db.set('somekey', data); // now 'somekey' has a new value { cool: true } } ``` @@ -52,11 +32,66 @@ const db = new MapDB('database.json') // this is the save file's name + extensio #### set() ```js -await db.set('what', 'how') + await db.set('ciao', 'hello') + await db.set('arrivederci', 'bye') ``` #### get() ```js -var answ = db.get('what') // answ = how +var ansa = db.get('ciao') // ansa = hello ``` + +#### has() + +```js +var asnb = db.has('arrivederci') // ansb = true +``` + +#### entries() + +```js +var ansc = db.entries() // ansc = [ 'ciao', 'hello' ], [ 'arrivederci', 'bye' ] ] +``` + +#### keys() + +```js +var ansd = db.keys() // ansd = [ 'ciao', 'arrivederci' ] +``` + +#### values() + +```js +var anse = db.values() // anse = [ 'hello', 'bye' ] +``` + +#### forEach() + +```js +db.forEach((value, key) => console.log(value, key)) // console.log = hello ciao +// console.log = bye arrivederci +``` + +#### delete() + +```js +// [{"key":"ciao","value":"hello"}, {"key":"arrivederci","value":"bye"}] +await db.delete('ciao') +// [{"key":"arrivederci","value":"bye"}] +``` + +#### clear() + +```js +// [{"key":"ciao","value":"hello"}, {"key":"arrivederci","value":"bye"}] +await db.delete('ciao') +// [] +``` + +#### size() + +```js +// [{"key":"ciao","value":"hello"}, {"key":"arrivederci","value":"bye"}] +var ansf = db.size() // size = 2 +``` \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index bbce76f..6cb9b90 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,72 +1,143 @@ -import fsp from "fs/promises"; -import fs from "fs"; +import { promisify } from 'util'; +import * as fs from 'fs'; -let writeDB: any, map: any, filename: string | undefined = 'database.db', dirname: string = './data/', db: any, file: any, data: any; +const writeDB = promisify(fs.writeFile); -writeDB = fsp.writeFile; +let map: any, db: any, filename: string, dirname: string = 'data'; -export class MitDB { +class MitDB { /** * @constructor * @param filename If not set, MapDB will only use internal memory * @example 'file.db' - * @param options Options to pass to the constructor - * @param options.dirname - * @example 'data' + * @param options Options to pass in the constructor + * @param options.dirname where to put the database? */ - constructor(fn: string | undefined, options: any) { + constructor(fn?: string, options?: { dirname: string }) { map = new Map(); if (fn) filename = fn; - if (options.dirname) dirname = options.dirname; + if (options && options.dirname) dirname = options.dirname; if (!fs.existsSync(dirname)) fs.mkdirSync(dirname); db = `./${dirname}/${filename}` - - try { - file = fs.readFileSync(db); - data = JSON.parse(file.toString()); - - for (let i = 0; i < data.length; i++) { - map.set(data[i].key, data[i].value); - } - } catch {} } /** - * @param key - * @param value + * + * @param key + * @param value */ async set(key: string | number, value: any) { try { - file = fs.readFileSync(db); - data = JSON.parse(data); - - let i = data.findIndex((pair: any) => pair.key == key); + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + const i = data.findIndex((pair: any) => pair.key == key); + !data[i] ? data.push({ key, value }) : data[i] = { key, value }; await writeDB(db, JSON.stringify(data)); + return data; } catch { - await await writeDB(db, `[${JSON.stringify({ key, value })}]`) + await writeDB(db, `[${JSON.stringify({ key, value })}]`).then(() => { + return JSON.parse(fs.readFileSync(db).toString()); + }); } - return map.set(key, value) + return 'error' } /** + * * @param key */ get(key: string | number) { - if (map) { - return map.get(key) - } else { - file = fs.readFileSync(db); - data = JSON.parse(file.toString()); + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); - return data.find((pair: any) => pair.key == key)?.value || undefined; - } + return data.find((pair: any) => pair.key == key)?.value || undefined; } -} \ No newline at end of file + + /** + * + * @param key + */ + has(key: string | number) { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + return data.find((pair: any) => pair.key == key) ? true : false; + } + + entries() { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + return data.map((pair: any) => [pair.key, pair.value]); + } + + keys() { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + return data.map((pair: any) => pair.key); + } + + values() { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + return data.map((pair: any) => pair.value); + } + + /** + * + * @param callbackfn + */ + forEach(callback: (value: any, key: any, map: Map) => void) { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + data.forEach((pair: any) => callback(pair.value, pair.key, map)); + } + + /** + * + * @param key + */ + async delete(key: string | number) { + try { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + const i = data.findIndex((pair: any) => pair.key == key); + + if (data[i]) { + data.splice(i, 1); + await writeDB(db, JSON.stringify(data)); + + return true; + } else if (!map) { + return false; + } + } catch {} + return 'error'; + } + + async clear() { + await writeDB(db, JSON.stringify([])).catch(() => {}); + } + + size() { + const file = fs.readFileSync(db); + const data: any[] = JSON.parse(file.toString()); + + return data.length; + } +} + +export = MitDB; \ No newline at end of file diff --git a/test.js b/test.js new file mode 100644 index 0000000..5a394b7 --- /dev/null +++ b/test.js @@ -0,0 +1,12 @@ +const MitDB = require('./build/index.js') + +var db = new MitDB('file.json') + +async function run () { + await db.set('ciao', 'hello') + await db.set('arrivederci', 'bye') + + console.log(db.size()) +} + +run() \ No newline at end of file diff --git a/tsconfig.tsbuildinfo b/tsconfig.tsbuildinfo index 1f609e6..5a655a1 100644 --- a/tsconfig.tsbuildinfo +++ b/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../../../../usr/share/nodejs/typescript/lib/lib.es5.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2016.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2017.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2018.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2019.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2021.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.esnext.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.dom.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.dom.iterable.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.webworker.importscripts.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.scripthost.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.core.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.collection.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.generator.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.iterable.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.promise.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.proxy.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.reflect.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.symbol.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2016.array.include.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2017.object.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2017.string.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2017.intl.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2018.intl.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2018.promise.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2018.regexp.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2019.array.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2019.object.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2019.string.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2019.symbol.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.bigint.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.promise.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.string.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2020.intl.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2021.promise.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2021.string.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2021.weakref.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.es2021.intl.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.esnext.intl.d.ts","../../../../usr/share/nodejs/typescript/lib/lib.esnext.full.d.ts","./src/index.ts"],"fileInfos":[{"version":"dadcdf3a8c37080fb5bc64750a3c27b178e376ff02142f6df03ac0778850b622","affectsGlobalScope":true},"e8d2e50f9e8fdd312d31f97571b4c7295b8f29f7f8363498edae2a9eb113ee36","4b1854aec637e8e041eff02899e16fd3c0c78685c622336aadfd67e6604bbe1b","d6f7d47355a0167969e9a8eedfb0994f21e038d360965ec06c30f6871038900b","4735756aff7c5857de387f321633f272e2daba4950c427ab200de954340c7c13","4cac3201303b24c71d334bcdab63aee38b7424f51ba9f8884515705b7cba7606","f59097764af44b6038195f8ef1ac7fb21a8ab5ca66585982e3028430c6846ed6","80510205fb587019e1ad42bfbc046d4f55f3c5a1c8b3debca7d6fe0adc93959f","03cd07455741090d72ba6a7b21c67900b18cf68366b5e8c29ac239329fd789bc",{"version":"4ccd8a7993c9cfb684fefc2d082674cbd1ee1bfc2e58df6e4320b729f8efdea6","affectsGlobalScope":true},{"version":"52c80cc26accc88eed5d64b7e518ab2435b6d81c1da13a6031dd66ba2fb2d68d","affectsGlobalScope":true},{"version":"c364b5b0e0598d670c5ef4468e6e256c8d3a26b229e7699b6499befb2978373f","affectsGlobalScope":true},{"version":"3c7bf0c38d837f3bcc222f55d3b1a5808dbbcb13dba2a891a0956e8d2625ae26","affectsGlobalScope":true},{"version":"1698099d91846788bb88832710d14690d1474ac5b911a4cc40c40640202549af","affectsGlobalScope":true},{"version":"5a8c535851f6cb0d376f135a2a6640dec8070d48d03072c2f1ab70528d7cb4fe","affectsGlobalScope":true},{"version":"28065193ddf88bf697915b9236d2d00a27e85726563e88474f166790376e10d8","affectsGlobalScope":true},{"version":"5ae8604583db39e78e2d0a0685186f2cb6816fcd107e4ec290aa21d67dc6d64e","affectsGlobalScope":true},{"version":"93244f18d7b4e03df9b368257cdbcc90e7f833c9fd473213c4d182d02bde5df6","affectsGlobalScope":true},{"version":"fabe256ae14920149045215ce771a898aa2698b1b91fabaf5b716b53a33e9f8e","affectsGlobalScope":true},{"version":"6bea5787583501f63a4038b4d90962d044f99ac739dda29d03bc0ce6702b8fba","affectsGlobalScope":true},{"version":"e5d8d715990d96a37f3521a3f1460679507b261eec1b42dc84d4de835997b794","affectsGlobalScope":true},{"version":"622b6f32c2b022056eaced4449675b73b963d2c95e812e7c994e9a1d678395e5","affectsGlobalScope":true},{"version":"a003a6051b48dc64eaa8ad83789e4c2a540f3482bed821053b6770969bd598fb","affectsGlobalScope":true},{"version":"e90857fa86cecc3bc964a2d7db9d95a0c406bebfadeb4853a01a0079936f12f7","affectsGlobalScope":true},{"version":"8bbb03589e48f10b49996064f35256e858d205dcb364428fb4cc045061b1d786","affectsGlobalScope":true},{"version":"5044747370afee4b4c247e8a14c2969d245bbcf8396295dc5a60c659d796a71f","affectsGlobalScope":true},{"version":"d42841f3fb4fc368f35cba018a81bd0b38f1d00ae9b0449a63ab47ac1bcaba10","affectsGlobalScope":true},{"version":"a894424c7058bcc77c1a3c92fe289c0ff93792e583e064c683d021879479f7b8","affectsGlobalScope":true},{"version":"8f03386d697248c5d356fd53f2729b920ea124cd1414a6c22de03c5d24729277","affectsGlobalScope":true},{"version":"21ac76354ecc1324ee2e31ac5fcebfa91b1b6beb3e8c3fe6f3988538e9629c73","affectsGlobalScope":true},{"version":"0f71e010899461f256a976d1bece8f39710a8661ced0ae3a4a757f61e0b0200d","affectsGlobalScope":true},{"version":"fe7acdc1039eca904399190766d1c8766b7d2621413f972c8542dddd69612097","affectsGlobalScope":true},{"version":"c25aa843b930662d62f0e853dd1f347d08b66cdec09bd760151d4ba6ce220fe6","affectsGlobalScope":true},{"version":"3e47477f297e4fa0d556c40a872c2c45bddefa487fd054bf1f80bceb527a682b","affectsGlobalScope":true},{"version":"a902be9f4116b449dbac07ffe3f4d69abb664f8eddfaeb892225612469213788","affectsGlobalScope":true},{"version":"155d8d1e367e05af5e5708a860825785f00eabae01744cf7bc569664301415a4","affectsGlobalScope":true},{"version":"5b30b81cdeb239772daf44e6c0d5bf6adec9dbf8d534ed25c9a0e8a43b9abfff","affectsGlobalScope":true},{"version":"061f40294b7ad6ac2167c63159a20a50cee9f90299bf15584c35b251fef62990","affectsGlobalScope":true},{"version":"d836a4258d6b5ee12054b802002d7c9c5eb6a1adb6a654f0ee9429cbda03e1a0","affectsGlobalScope":true},{"version":"c021bff90eb33d29edfde16c9b861097bbf99aa290726d0d0ac65330aa7be85a","affectsGlobalScope":true},{"version":"1c4e64dc374ea5922d7632a52b167187ba7c7e35b34d3c1e22625be66ca1576d","affectsGlobalScope":true},{"version":"cd1bebc4db8fb52c5618ecad3f511f62c78921451c198220c5b2ee5610b4d7b9","affectsGlobalScope":true},{"version":"60232641bf6d841a87a1a6b1712c981fbf19101716f3ef061c325e4b15fcf616","affectsGlobalScope":true},{"version":"868df11ccdabb6de564f70b68aa6b379a243ef32c8f6ee6dc71056a3dd54578a","affectsGlobalScope":true},{"version":"cebef4c7f9b6afb02cd08e7288fab05d0be3e3c898c720775b8aa286e9f7cfed","affectsGlobalScope":true},{"version":"7e3c49afe9bf537f68ce2487d7996c6e5c2350c0f250939726add1efcb1bcf01","affectsGlobalScope":true},{"version":"6edba3b6648ad3377e6bab703ac0bf9e5bd1a8c7bdf627aba60d672fb67e3c6b","affectsGlobalScope":true},{"version":"8adc0c1352e476633bb3acef761c6960bddce23e3e15a180ca4528b4f2fc569b","affectsGlobalScope":true},"5de06a696919e5be6b72598e45f4087b4c1bd57ca13da335b63dbd58f66b3a7c","a877908afdfb81b3d711acd283a625cff3ccd9dbf7f2c85c4c08994cf16960de"],"options":{"declaration":true,"declarationDir":"./build","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./build","removeComments":true,"rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":99,"useUnknownInCatchVariables":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[50,[{"file":"./src/index.ts","start":16,"length":13,"messageText":"Cannot find module 'fs/promises' or its corresponding type declarations.","category":1,"code":2307},{"file":"./src/index.ts","start":46,"length":4,"messageText":"Cannot find module 'fs' or its corresponding type declarations.","category":1,"code":2307}]],10,11,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,35,36,37,38,7,43,39,40,41,42,8,47,44,45,46,1,9,49,48,13,12]},"version":"4.5.4"} \ No newline at end of file +{"program":{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.esnext.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.webworker.importscripts.d.ts","./node_modules/typescript/lib/lib.scripthost.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/typescript/lib/lib.esnext.full.d.ts","./node_modules/tslib/tslib.d.ts","./src/index.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/assert/strict.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/diagnostics_channel.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/dns/promises.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/dom-events.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/readline/promises.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/stream/promises.d.ts","./node_modules/@types/node/stream/consumers.d.ts","./node_modules/@types/node/stream/web.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/test.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/timers/promises.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/globals.global.d.ts","./node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"d96fa8a56871904776165ceb8e00bd56127e1a017bb2664cae76223b5f815141","f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980",{"version":"d63d49478e3444ff59f2a375d6c7ca99323177ca87e4535cb1755637991bc1e5","signature":"1ebafdaa1381a66b65379c27c668413814c2e8c885829bb9b2cfacd9aed1ea2a"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"bb65c6267c5d6676be61acbf6604cf0a4555ac4b505df58ac15c831fcbff4e3e","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","dab86d9604fe40854ef3c0a6f9e8948873dc3509213418e5e457f410fd11200f","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"d076fede3cb042e7b13fc29442aaa03a57806bc51e2b26a67a01fbc66a7c0c12","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","223c37f62ce09a3d99e77498acdee7b2705a4ae14552fbdb4093600cd9164f3f",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"4c50342e1b65d3bee2ed4ab18f84842d5724ad11083bd666d8705dc7a6079d80","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"8dbe725f8d237e70310977afcfa011629804d101ebaa0266cafda6b61ad72236"],"options":{"alwaysStrict":true,"declaration":true,"declarationDir":"./build","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noPropertyAccessFromIndexSignature":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./build","removeComments":true,"rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":99,"useUnknownInCatchVariables":true},"fileIdsList":[[62,108],[65,108],[66,71,99,108],[67,78,79,86,96,107,108],[67,68,78,86,108],[69,108],[70,71,79,87,108],[71,96,104,108],[72,74,78,86,108],[73,108],[74,75,108],[78,108],[76,78,108],[78,79,80,96,107,108],[78,79,80,93,96,99,108],[108,112],[108],[74,81,86,96,107,108],[78,79,81,82,86,96,104,107,108],[81,83,96,104,107,108],[62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114],[78,84,108],[85,107,108],[74,78,86,96,108],[87,108],[88,108],[65,89,108],[90,106,108,112],[91,108],[92,108],[78,93,94,108],[93,95,108,110],[66,78,96,97,98,99,108],[66,96,98,108],[96,97,108],[99,108],[100,108],[78,102,103,108],[102,103,108],[71,86,96,104,108],[105,108],[86,106,108],[66,81,92,107,108],[71,108],[96,108,109],[108,110],[108,111],[66,71,78,80,89,96,107,108,110,112],[96,108,113],[60,79,108]],"referencedMap":[[62,1],[63,1],[65,2],[66,3],[67,4],[68,5],[69,6],[70,7],[71,8],[72,9],[73,10],[74,11],[75,11],[77,12],[76,13],[78,12],[79,14],[80,15],[64,16],[114,17],[81,18],[82,19],[83,20],[115,21],[84,22],[85,23],[86,24],[87,25],[88,26],[89,27],[90,28],[91,29],[92,30],[93,31],[94,31],[95,32],[96,33],[98,34],[97,35],[99,36],[100,37],[101,17],[102,38],[103,39],[104,40],[105,41],[106,42],[107,43],[108,44],[109,45],[110,46],[111,47],[112,48],[113,49],[60,17],[11,17],[12,17],[16,17],[15,17],[2,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[24,17],[3,17],[4,17],[28,17],[25,17],[26,17],[27,17],[29,17],[30,17],[31,17],[5,17],[32,17],[33,17],[34,17],[35,17],[6,17],[39,17],[36,17],[37,17],[38,17],[40,17],[7,17],[41,17],[46,17],[47,17],[42,17],[43,17],[44,17],[45,17],[8,17],[51,17],[48,17],[49,17],[50,17],[52,17],[9,17],[53,17],[54,17],[55,17],[56,17],[57,17],[1,17],[10,17],[59,17],[58,17],[14,17],[13,17],[61,50]],"exportedModulesMap":[[62,1],[63,1],[65,2],[66,3],[67,4],[68,5],[69,6],[70,7],[71,8],[72,9],[73,10],[74,11],[75,11],[77,12],[76,13],[78,12],[79,14],[80,15],[64,16],[114,17],[81,18],[82,19],[83,20],[115,21],[84,22],[85,23],[86,24],[87,25],[88,26],[89,27],[90,28],[91,29],[92,30],[93,31],[94,31],[95,32],[96,33],[98,34],[97,35],[99,36],[100,37],[101,17],[102,38],[103,39],[104,40],[105,41],[106,42],[107,43],[108,44],[109,45],[110,46],[111,47],[112,48],[113,49],[60,17],[11,17],[12,17],[16,17],[15,17],[2,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[24,17],[3,17],[4,17],[28,17],[25,17],[26,17],[27,17],[29,17],[30,17],[31,17],[5,17],[32,17],[33,17],[34,17],[35,17],[6,17],[39,17],[36,17],[37,17],[38,17],[40,17],[7,17],[41,17],[46,17],[47,17],[42,17],[43,17],[44,17],[45,17],[8,17],[51,17],[48,17],[49,17],[50,17],[52,17],[9,17],[53,17],[54,17],[55,17],[56,17],[57,17],[1,17],[10,17],[59,17],[58,17],[14,17],[13,17]],"semanticDiagnosticsPerFile":[62,63,65,66,67,68,69,70,71,72,73,74,75,77,76,78,79,80,64,114,81,82,83,115,84,85,86,87,88,89,90,91,92,93,94,95,96,98,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,60,11,12,16,15,2,17,18,19,20,21,22,23,24,3,4,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,46,47,42,43,44,45,8,51,48,49,50,52,9,53,54,55,56,57,1,10,59,58,14,13,61]},"version":"4.9.5"} \ No newline at end of file -- 2.20.1