diff --git a/.gitignore b/.gitignore index 62bf2cbc..22bd991b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ dist node_modules package-lock.json docs +types +.nyc_output diff --git a/.nyc_output/coverage-final.json b/.nyc_output/coverage-final.json deleted file mode 100644 index 0967ef42..00000000 --- a/.nyc_output/coverage-final.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/interface-blockstore-tests/README.md b/packages/interface-blockstore-tests/README.md index 48ad345e..51c9433f 100644 --- a/packages/interface-blockstore-tests/README.md +++ b/packages/interface-blockstore-tests/README.md @@ -11,8 +11,8 @@ ## Usage ```js -const MyBlockstore = require('./path/to/my-blockstore') -const suite = require('interface-blockstore-tests') +const MyBlockstore from './path/to/my-blockstore') +const suite from 'interface-blockstore-tests') describe('MyBlockstore', () => { describe('interface-blockstore compliance tests', () => { diff --git a/packages/interface-blockstore-tests/package.json b/packages/interface-blockstore-tests/package.json index d4c70c8b..1fcf1eb2 100644 --- a/packages/interface-blockstore-tests/package.json +++ b/packages/interface-blockstore-tests/package.json @@ -4,7 +4,7 @@ "description": "Compliance tests for the blockstore interface", "leadMaintainer": "Alex Potsides ", "main": "src/index.js", - "types": "dist/src/index.d.ts", + "types": "types/src/index.d.ts", "files": [ "src", "dist" @@ -12,7 +12,6 @@ "scripts": { "build": "aegir build", "lint": "aegir ts -p check && aegir lint", - "test": "echo \"No tests configured\"", "dep-check": "aegir dep-check" }, "repository": { @@ -40,6 +39,12 @@ "uint8arrays": "^3.0.0" }, "eslintConfig": { - "extends": "ipfs" + "extends": "ipfs", + "parserOptions": { + "sourceType": "module" + } + }, + "publishConfig": { + "directory": "dist" } } diff --git a/packages/interface-blockstore-tests/src/index.js b/packages/interface-blockstore-tests/src/index.js index 7b643f1a..771f07e9 100644 --- a/packages/interface-blockstore-tests/src/index.js +++ b/packages/interface-blockstore-tests/src/index.js @@ -1,15 +1,14 @@ /* eslint-env mocha */ -'use strict' - -const { expect } = require('aegir/utils/chai') -const all = require('it-all') -const drain = require('it-drain') -const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string') -const { CID } = require('multiformats/cid') -const { sha256 } = require('multiformats/hashes/sha2') -const { base32 } = require('multiformats/bases/base32') -const raw = require('multiformats/codecs/raw') -const length = require('it-length') + +import { expect } from 'aegir/utils/chai.js' +import all from 'it-all' +import drain from 'it-drain' +import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' +import { CID } from 'multiformats/cid' +import { sha256 } from 'multiformats/hashes/sha2' +import { base32 } from 'multiformats/bases/base32' +import * as raw from 'multiformats/codecs/raw' +import length from 'it-length' /** * @typedef {import('interface-blockstore').Blockstore} Blockstore @@ -43,7 +42,7 @@ async function getKeyValuePairs (count) { /** * @param {{ teardown: () => void; setup: () => Blockstore; }} test */ -module.exports = (test) => { +export function interfaceBlockstoreTests (test) { /** * @param {Blockstore} store */ @@ -309,7 +308,7 @@ module.exports = (test) => { try { base32.decode(keyStr.substring(0, j)) prefix = keyStr.substring(0, j) - } catch (err) { + } catch (/** @type {any} */ err) { if (err.message !== 'Unexpected end of data') { throw err } diff --git a/packages/interface-blockstore-tests/tsconfig.json b/packages/interface-blockstore-tests/tsconfig.json index 07e8db2b..b5b370d8 100644 --- a/packages/interface-blockstore-tests/tsconfig.json +++ b/packages/interface-blockstore-tests/tsconfig.json @@ -1,10 +1,17 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "outDir": "dist" + "outDir": "types" }, "include": [ - "test", "src" + ], + "exclude": [ + "dist" + ], + "references": [ + { + "path": "../interface-blockstore" + } ] } diff --git a/packages/interface-blockstore/package.json b/packages/interface-blockstore/package.json index 37308839..5aa2f09c 100644 --- a/packages/interface-blockstore/package.json +++ b/packages/interface-blockstore/package.json @@ -2,13 +2,10 @@ "name": "interface-blockstore", "version": "1.0.2", "description": "An interface for storing and retrieving blocks", - "main": "src/index.js", - "types": "dist/src/index.d.ts", + "types": "types/src/index.d.ts", "scripts": { "build": "aegir build", - "test": "echo \"No tests configured\"", - "lint": "aegir ts -p check && aegir lint", - "dep-check": "aegir dep-check" + "lint": "aegir ts -p check && aegir lint" }, "license": "(Apache-2.0 OR MIT)", "homepage": "https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-blockstore#readme", @@ -18,15 +15,13 @@ "url": "git+https://github.com/ipfs/js-ipfs-interfaces.git" }, "dependencies": { - "err-code": "^3.0.1", "interface-store": "^1.0.2", - "it-all": "^1.0.5", - "it-drain": "^1.0.4", - "it-filter": "^1.0.2", - "it-take": "^1.0.1", "multiformats": "^9.0.4" }, "devDependencies": { "aegir": "^35.0.0" + }, + "publishConfig": { + "directory": "dist" } } diff --git a/packages/interface-blockstore/src/adapter.js b/packages/interface-blockstore/src/adapter.js deleted file mode 100644 index cdbd27a9..00000000 --- a/packages/interface-blockstore/src/adapter.js +++ /dev/null @@ -1,245 +0,0 @@ -'use strict' - -const drain = require('it-drain') -const filter = require('it-filter') -const take = require('it-take') -const all = require('it-all') - -/** - * Collect all values from the iterable and sort them using - * the passed sorter function - * - * @template T - * @param {AsyncIterable | Iterable} iterable - * @param {(a: T, b: T) => -1 | 0 | 1} sorter - * @returns {AsyncIterable} - */ -const sortAll = (iterable, sorter) => { - return (async function * () { - const values = await all(iterable) - yield * values.sort(sorter) - })() -} - -/** - * @typedef {import('./types').Options} Options - * @typedef {import('./types').Pair} Pair - * @typedef {import('./types').Blockstore} Blockstore - * @typedef {import('./types').Query} Query - * @typedef {import('./types').KeyQuery} KeyQuery - * @typedef {import('./types').Batch} Batch - * - * @typedef {import('multiformats').CID} CID - */ - -/** - * @template O - * @typedef {import('interface-store').AwaitIterable} AwaitIterable - */ - -/** - * @implements {Blockstore} - */ -class BlockstoreAdapter { - /** - * @returns {Promise} - */ - open () { - return Promise.reject(new Error('.open is not implemented')) - } - - /** - * @returns {Promise} - */ - close () { - return Promise.reject(new Error('.close is not implemented')) - } - - /** - * @param {CID} key - * @param {Uint8Array} val - * @param {Options} [options] - * @returns {Promise} - */ - put (key, val, options) { - return Promise.reject(new Error('.put is not implemented')) - } - - /** - * @param {CID} key - * @param {Options} [options] - * @returns {Promise} - */ - get (key, options) { - return Promise.reject(new Error('.get is not implemented')) - } - - /** - * @param {CID} key - * @param {Options} [options] - * @returns {Promise} - */ - has (key, options) { - return Promise.reject(new Error('.has is not implemented')) - } - - /** - * @param {CID} key - * @param {Options} [options] - * @returns {Promise} - */ - delete (key, options) { - return Promise.reject(new Error('.delete is not implemented')) - } - - /** - * @param {AwaitIterable} source - * @param {Options} [options] - * @returns {AsyncIterable} - */ - async * putMany (source, options = {}) { - for await (const { key, value } of source) { - await this.put(key, value, options) - yield { key, value } - } - } - - /** - * @param {AwaitIterable} source - * @param {Options} [options] - * @returns {AsyncIterable} - */ - async * getMany (source, options = {}) { - for await (const key of source) { - yield this.get(key, options) - } - } - - /** - * @param {AwaitIterable} source - * @param {Options} [options] - * @returns {AsyncIterable} - */ - async * deleteMany (source, options = {}) { - for await (const key of source) { - await this.delete(key, options) - yield key - } - } - - /** - * @returns {Batch} - */ - batch () { - /** @type {Pair[]} */ - let puts = [] - /** @type {CID[]} */ - let dels = [] - - return { - put (key, value) { - puts.push({ key, value }) - }, - - delete (key) { - dels.push(key) - }, - commit: async (options) => { - await drain(this.putMany(puts, options)) - puts = [] - await drain(this.deleteMany(dels, options)) - dels = [] - } - } - } - - /** - * Extending classes should override `query` or implement this method - * - * @param {Query} q - * @param {Options} [options] - * @returns {AsyncIterable} - */ - // eslint-disable-next-line require-yield - async * _all (q, options) { - throw new Error('._all is not implemented') - } - - /** - * Extending classes should override `queryKeys` or implement this method - * - * @param {KeyQuery} q - * @param {Options} [options] - * @returns {AsyncIterable} - */ - // eslint-disable-next-line require-yield - async * _allKeys (q, options) { - throw new Error('._allKeys is not implemented') - } - - /** - * @param {Query} q - * @param {Options} [options] - */ - query (q, options) { - let it = this._all(q, options) - - if (q.prefix != null) { - it = filter(it, (/** @type {Pair} */ e) => - e.key.toString().startsWith(q.prefix || '') - ) - } - - if (Array.isArray(q.filters)) { - it = q.filters.reduce((it, f) => filter(it, f), it) - } - - if (Array.isArray(q.orders)) { - it = q.orders.reduce((it, f) => sortAll(it, f), it) - } - - if (q.offset != null) { - let i = 0 - it = filter(it, () => i++ >= (q.offset || 0)) - } - - if (q.limit != null) { - it = take(it, q.limit) - } - - return it - } - - /** - * @param {KeyQuery} q - * @param {Options} [options] - */ - queryKeys (q, options) { - let it = this._allKeys(q, options) - - if (q.prefix != null) { - it = filter(it, (/** @type {CID} */ cid) => cid.toString().startsWith(q.prefix || '')) - } - - if (Array.isArray(q.filters)) { - it = q.filters.reduce((it, f) => filter(it, f), it) - } - - if (Array.isArray(q.orders)) { - it = q.orders.reduce((it, f) => sortAll(it, f), it) - } - - if (q.offset != null) { - let i = 0 - it = filter(it, () => i++ >= /** @type {number} */ (q.offset)) - } - - if (q.limit != null) { - it = take(it, q.limit) - } - - return it - } -} - -module.exports = BlockstoreAdapter diff --git a/packages/interface-blockstore/src/errors.js b/packages/interface-blockstore/src/errors.js deleted file mode 100644 index 5436deb9..00000000 --- a/packages/interface-blockstore/src/errors.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -const errCode = require('err-code') - -/** - * @param {Error} [err] - */ -function notFoundError (err) { - err = err || new Error('Not Found') - return errCode(err, 'ERR_NOT_FOUND') -} - -module.exports = { - notFoundError -} diff --git a/packages/interface-blockstore/src/index.js b/packages/interface-blockstore/src/index.js deleted file mode 100644 index 87034558..00000000 --- a/packages/interface-blockstore/src/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -const BlockstoreAdapter = require('./adapter') -const MemoryBlockstore = require('./memory') - -/** - * @typedef {import('./types').Options} Options - * @typedef {import('./types').Pair} Pair - * @typedef {import('./types').Batch} Batch - * @typedef {import('./types').Blockstore} Blockstore - * @typedef {import('./types').QueryFilter} QueryFilter - * @typedef {import('./types').QueryOrder} QueryOrder - * @typedef {import('./types').Query} Query - * @typedef {import('./types').KeyQueryFilter} KeyQueryFilter - * @typedef {import('./types').KeyQueryOrder} KeyQueryOrder - * @typedef {import('./types').KeyQuery} KeyQuery - */ - -module.exports = { - BlockstoreAdapter, - MemoryBlockstore -} diff --git a/packages/interface-blockstore/src/types.ts b/packages/interface-blockstore/src/index.ts similarity index 100% rename from packages/interface-blockstore/src/types.ts rename to packages/interface-blockstore/src/index.ts diff --git a/packages/interface-blockstore/src/memory.js b/packages/interface-blockstore/src/memory.js deleted file mode 100644 index c3223f9f..00000000 --- a/packages/interface-blockstore/src/memory.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict' - -const Adapter = require('./adapter') -const { base32 } = require('multiformats/bases/base32') -const raw = require('multiformats/codecs/raw') -const { CID } = require('multiformats/cid') -const Digest = require('multiformats/hashes/digest') -const Errors = require('./errors') - -/** - * @typedef {import('./types').Pair} Pair - * @typedef {import('./types').Blockstore} Blockstore - * @typedef {import('interface-store').Options} Options - */ - -/** - * @class MemoryBlockstore - * @implements {Blockstore} - */ -class MemoryBlockstore extends Adapter { - constructor () { - super() - - /** @type {Record} */ - this.data = {} - } - - open () { - return Promise.resolve() - } - - close () { - return Promise.resolve() - } - - /** - * @param {CID} key - * @param {Uint8Array} val - */ - async put (key, val) { // eslint-disable-line require-await - this.data[base32.encode(key.multihash.bytes)] = val - } - - /** - * @param {CID} key - */ - async get (key) { - const exists = await this.has(key) - if (!exists) throw Errors.notFoundError() - return this.data[base32.encode(key.multihash.bytes)] - } - - /** - * @param {CID} key - */ - async has (key) { // eslint-disable-line require-await - return this.data[base32.encode(key.multihash.bytes)] !== undefined - } - - /** - * @param {CID} key - */ - async delete (key) { // eslint-disable-line require-await - delete this.data[base32.encode(key.multihash.bytes)] - } - - async * _all () { - yield * Object.entries(this.data) - .map(([key, value]) => ({ key: CID.createV1(raw.code, Digest.decode(base32.decode(key))), value })) - } - - async * _allKeys () { - yield * Object.entries(this.data) - .map(([key]) => CID.createV1(raw.code, Digest.decode(base32.decode(key)))) - } -} - -module.exports = MemoryBlockstore diff --git a/packages/interface-blockstore/tsconfig.json b/packages/interface-blockstore/tsconfig.json index 3865f348..5fd2bf1b 100644 --- a/packages/interface-blockstore/tsconfig.json +++ b/packages/interface-blockstore/tsconfig.json @@ -1,11 +1,17 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "outDir": "dist", - "skipLibCheck": false + "outDir": "types" }, "include": [ - "test", "src" + ], + "exclude": [ + "dist" + ], + "references": [ + { + "path": "../interface-store" + } ] } diff --git a/packages/interface-datastore-tests/README.md b/packages/interface-datastore-tests/README.md index 1b64bddc..4fc60bef 100644 --- a/packages/interface-datastore-tests/README.md +++ b/packages/interface-datastore-tests/README.md @@ -11,8 +11,8 @@ ## Usage ```js -const MyDatastore = require('./path/to/my-datastore') -const suite = require('interface-datastore-tests') +const MyDatastore from './path/to/my-datastore') +const suite from 'interface-datastore-tests') describe('MyDatastore', () => { describe('interface-datastore compliance tests', () => { diff --git a/packages/interface-datastore-tests/package.json b/packages/interface-datastore-tests/package.json index 9a735f8c..a07aeccb 100644 --- a/packages/interface-datastore-tests/package.json +++ b/packages/interface-datastore-tests/package.json @@ -3,8 +3,7 @@ "version": "1.0.3", "description": "Compliance tests for the datastore interface", "leadMaintainer": "Alex Potsides ", - "main": "src/index.js", - "types": "dist/src/index.d.ts", + "types": "types/src/index.d.ts", "files": [ "src", "dist" @@ -12,7 +11,6 @@ "scripts": { "build": "aegir build", "lint": "aegir ts -p check && aegir lint", - "test": "echo \"No tests configured\"", "dep-check": "aegir dep-check" }, "repository": { @@ -39,6 +37,9 @@ "uint8arrays": "^3.0.0" }, "eslintConfig": { - "extends": "ipfs" + "extends": "ipfs", + "parserOptions": { + "sourceType": "module" + } } } diff --git a/packages/interface-datastore-tests/src/index.js b/packages/interface-datastore-tests/src/index.js index 64b487ae..e107d785 100644 --- a/packages/interface-datastore-tests/src/index.js +++ b/packages/interface-datastore-tests/src/index.js @@ -1,12 +1,11 @@ /* eslint-env mocha */ -'use strict' -const { randomBytes } = require('iso-random-stream') -const { expect } = require('aegir/utils/chai') -const all = require('it-all') -const drain = require('it-drain') -const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string') -const { Key } = require('interface-datastore') +import { randomBytes } from 'iso-random-stream' +import { expect } from 'aegir/utils/chai.js' +import all from 'it-all' +import drain from 'it-drain' +import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' +import { Key } from 'interface-datastore' /** * @typedef {import('interface-datastore').Datastore} Datastore @@ -20,7 +19,7 @@ const { Key } = require('interface-datastore') /** * @param {{ teardown: () => void; setup: () => Datastore; }} test */ -module.exports = (test) => { +export function interfaceDatastoreTests (test) { /** * @param {Datastore} store */ diff --git a/packages/interface-datastore-tests/tsconfig.json b/packages/interface-datastore-tests/tsconfig.json index 07e8db2b..93abdbb3 100644 --- a/packages/interface-datastore-tests/tsconfig.json +++ b/packages/interface-datastore-tests/tsconfig.json @@ -1,10 +1,17 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "outDir": "dist" + "outDir": "types" }, "include": [ - "test", "src" + ], + "exclude": [ + "dist" + ], + "references": [ + { + "path": "../interface-datastore" + } ] } diff --git a/packages/interface-datastore/.nyc_output/coverage-final.json b/packages/interface-datastore/.nyc_output/coverage-final.json deleted file mode 100644 index 123bc3d9..00000000 --- a/packages/interface-datastore/.nyc_output/coverage-final.json +++ /dev/null @@ -1,7 +0,0 @@ -{"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/adapter.js": {"path":"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/adapter.js","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":38}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":35}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":31}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":0}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":3}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":55}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":41}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":51}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":43}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":49}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":43}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":3}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":0}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":3}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":14}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":70}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":3}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":0}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":3}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":26}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":3}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":15}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":5}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":29}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":5}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":11}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":64}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":3}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":0}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":5}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":29}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":5}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":12}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":65}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":3}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":0}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":5}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":21}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":28}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":31}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":29}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":5}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":27}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":63}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":3}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":0}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":5}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":21}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":31}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":35}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":5}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":22}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":63}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":3}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":0}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":5}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":21}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":31}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":32}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":5}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":22}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":63}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":3}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":0}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":5}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":21}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":31}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":29}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":5}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":25}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":66}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":3}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":0}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":5}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":40}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":31}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":35}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":5}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":42}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":48}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":41}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":26}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":5}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":3}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":0}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":5}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":39}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":31}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":41}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":5}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":42}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":37}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":34}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":5}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":3}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":0}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":5}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":39}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":31}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":34}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":5}},"105":{"start":{"line":106,"column":0},"end":{"line":106,"column":45}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":37}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":37}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":15}},"109":{"start":{"line":110,"column":0},"end":{"line":110,"column":5}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":3}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":0}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":5}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":21}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":5}},"115":{"start":{"line":116,"column":0},"end":{"line":116,"column":12}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":25}},"117":{"start":{"line":118,"column":0},"end":{"line":118,"column":17}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":24}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":17}},"120":{"start":{"line":121,"column":0},"end":{"line":121,"column":0}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":12}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":24}},"123":{"start":{"line":124,"column":0},"end":{"line":124,"column":33}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":8}},"125":{"start":{"line":126,"column":0},"end":{"line":126,"column":0}},"126":{"start":{"line":127,"column":0},"end":{"line":127,"column":20}},"127":{"start":{"line":128,"column":0},"end":{"line":128,"column":22}},"128":{"start":{"line":129,"column":0},"end":{"line":129,"column":8}},"129":{"start":{"line":130,"column":0},"end":{"line":130,"column":34}},"130":{"start":{"line":131,"column":0},"end":{"line":131,"column":48}},"131":{"start":{"line":132,"column":0},"end":{"line":132,"column":17}},"132":{"start":{"line":133,"column":0},"end":{"line":133,"column":51}},"133":{"start":{"line":134,"column":0},"end":{"line":134,"column":17}},"134":{"start":{"line":135,"column":0},"end":{"line":135,"column":7}},"135":{"start":{"line":136,"column":0},"end":{"line":136,"column":5}},"136":{"start":{"line":137,"column":0},"end":{"line":137,"column":3}},"137":{"start":{"line":138,"column":0},"end":{"line":138,"column":0}},"138":{"start":{"line":139,"column":0},"end":{"line":139,"column":5}},"139":{"start":{"line":140,"column":0},"end":{"line":140,"column":71}},"140":{"start":{"line":141,"column":0},"end":{"line":141,"column":4}},"141":{"start":{"line":142,"column":0},"end":{"line":142,"column":21}},"142":{"start":{"line":143,"column":0},"end":{"line":143,"column":31}},"143":{"start":{"line":144,"column":0},"end":{"line":144,"column":35}},"144":{"start":{"line":145,"column":0},"end":{"line":145,"column":5}},"145":{"start":{"line":146,"column":0},"end":{"line":146,"column":43}},"146":{"start":{"line":147,"column":0},"end":{"line":147,"column":29}},"147":{"start":{"line":148,"column":0},"end":{"line":148,"column":47}},"148":{"start":{"line":149,"column":0},"end":{"line":149,"column":3}},"149":{"start":{"line":150,"column":0},"end":{"line":150,"column":0}},"150":{"start":{"line":151,"column":0},"end":{"line":151,"column":5}},"151":{"start":{"line":152,"column":0},"end":{"line":152,"column":75}},"152":{"start":{"line":153,"column":0},"end":{"line":153,"column":4}},"153":{"start":{"line":154,"column":0},"end":{"line":154,"column":24}},"154":{"start":{"line":155,"column":0},"end":{"line":155,"column":31}},"155":{"start":{"line":156,"column":0},"end":{"line":156,"column":34}},"156":{"start":{"line":157,"column":0},"end":{"line":157,"column":5}},"157":{"start":{"line":158,"column":0},"end":{"line":158,"column":43}},"158":{"start":{"line":159,"column":0},"end":{"line":159,"column":33}},"159":{"start":{"line":160,"column":0},"end":{"line":160,"column":51}},"160":{"start":{"line":161,"column":0},"end":{"line":161,"column":3}},"161":{"start":{"line":162,"column":0},"end":{"line":162,"column":0}},"162":{"start":{"line":163,"column":0},"end":{"line":163,"column":5}},"163":{"start":{"line":164,"column":0},"end":{"line":164,"column":21}},"164":{"start":{"line":165,"column":0},"end":{"line":165,"column":31}},"165":{"start":{"line":166,"column":0},"end":{"line":166,"column":5}},"166":{"start":{"line":167,"column":0},"end":{"line":167,"column":22}},"167":{"start":{"line":168,"column":0},"end":{"line":168,"column":34}},"168":{"start":{"line":169,"column":0},"end":{"line":169,"column":0}},"169":{"start":{"line":170,"column":0},"end":{"line":170,"column":27}},"170":{"start":{"line":171,"column":0},"end":{"line":171,"column":28}},"171":{"start":{"line":172,"column":0},"end":{"line":172,"column":69}},"172":{"start":{"line":173,"column":0},"end":{"line":173,"column":7}},"173":{"start":{"line":174,"column":0},"end":{"line":174,"column":5}},"174":{"start":{"line":175,"column":0},"end":{"line":175,"column":0}},"175":{"start":{"line":176,"column":0},"end":{"line":176,"column":35}},"176":{"start":{"line":177,"column":0},"end":{"line":177,"column":57}},"177":{"start":{"line":178,"column":0},"end":{"line":178,"column":5}},"178":{"start":{"line":179,"column":0},"end":{"line":179,"column":0}},"179":{"start":{"line":180,"column":0},"end":{"line":180,"column":34}},"180":{"start":{"line":181,"column":0},"end":{"line":181,"column":57}},"181":{"start":{"line":182,"column":0},"end":{"line":182,"column":5}},"182":{"start":{"line":183,"column":0},"end":{"line":183,"column":0}},"183":{"start":{"line":184,"column":0},"end":{"line":184,"column":27}},"184":{"start":{"line":185,"column":0},"end":{"line":185,"column":15}},"185":{"start":{"line":186,"column":0},"end":{"line":186,"column":68}},"186":{"start":{"line":187,"column":0},"end":{"line":187,"column":5}},"187":{"start":{"line":188,"column":0},"end":{"line":188,"column":0}},"188":{"start":{"line":189,"column":0},"end":{"line":189,"column":26}},"189":{"start":{"line":190,"column":0},"end":{"line":190,"column":28}},"190":{"start":{"line":191,"column":0},"end":{"line":191,"column":5}},"191":{"start":{"line":192,"column":0},"end":{"line":192,"column":0}},"192":{"start":{"line":193,"column":0},"end":{"line":193,"column":13}},"193":{"start":{"line":194,"column":0},"end":{"line":194,"column":3}},"194":{"start":{"line":195,"column":0},"end":{"line":195,"column":0}},"195":{"start":{"line":196,"column":0},"end":{"line":196,"column":5}},"196":{"start":{"line":197,"column":0},"end":{"line":197,"column":24}},"197":{"start":{"line":198,"column":0},"end":{"line":198,"column":31}},"198":{"start":{"line":199,"column":0},"end":{"line":199,"column":5}},"199":{"start":{"line":200,"column":0},"end":{"line":200,"column":26}},"200":{"start":{"line":201,"column":0},"end":{"line":201,"column":38}},"201":{"start":{"line":202,"column":0},"end":{"line":202,"column":0}},"202":{"start":{"line":203,"column":0},"end":{"line":203,"column":27}},"203":{"start":{"line":204,"column":0},"end":{"line":204,"column":30}},"204":{"start":{"line":205,"column":0},"end":{"line":205,"column":67}},"205":{"start":{"line":206,"column":0},"end":{"line":206,"column":7}},"206":{"start":{"line":207,"column":0},"end":{"line":207,"column":5}},"207":{"start":{"line":208,"column":0},"end":{"line":208,"column":0}},"208":{"start":{"line":209,"column":0},"end":{"line":209,"column":35}},"209":{"start":{"line":210,"column":0},"end":{"line":210,"column":57}},"210":{"start":{"line":211,"column":0},"end":{"line":211,"column":5}},"211":{"start":{"line":212,"column":0},"end":{"line":212,"column":0}},"212":{"start":{"line":213,"column":0},"end":{"line":213,"column":34}},"213":{"start":{"line":214,"column":0},"end":{"line":214,"column":57}},"214":{"start":{"line":215,"column":0},"end":{"line":215,"column":5}},"215":{"start":{"line":216,"column":0},"end":{"line":216,"column":0}},"216":{"start":{"line":217,"column":0},"end":{"line":217,"column":27}},"217":{"start":{"line":218,"column":0},"end":{"line":218,"column":15}},"218":{"start":{"line":219,"column":0},"end":{"line":219,"column":68}},"219":{"start":{"line":220,"column":0},"end":{"line":220,"column":5}},"220":{"start":{"line":221,"column":0},"end":{"line":221,"column":0}},"221":{"start":{"line":222,"column":0},"end":{"line":222,"column":26}},"222":{"start":{"line":223,"column":0},"end":{"line":223,"column":28}},"223":{"start":{"line":224,"column":0},"end":{"line":224,"column":5}},"224":{"start":{"line":225,"column":0},"end":{"line":225,"column":0}},"225":{"start":{"line":226,"column":0},"end":{"line":226,"column":13}},"226":{"start":{"line":227,"column":0},"end":{"line":227,"column":3}},"227":{"start":{"line":228,"column":0},"end":{"line":228,"column":1}},"228":{"start":{"line":229,"column":0},"end":{"line":229,"column":0}},"229":{"start":{"line":230,"column":0},"end":{"line":230,"column":24}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":0,"31":0,"32":1,"33":1,"34":1,"35":1,"36":1,"37":0,"38":0,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":0,"48":0,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":0,"57":0,"58":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":0,"66":0,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":0,"75":0,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":6,"84":1409,"85":1409,"86":1409,"87":6,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":4,"96":202,"97":201,"98":4,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":5,"107":101,"108":101,"109":101,"110":5,"111":1,"112":1,"113":1,"114":1,"115":1,"116":4,"117":4,"118":4,"119":4,"120":4,"121":4,"122":4,"123":1209,"124":4,"125":4,"126":4,"127":1,"128":4,"129":4,"130":4,"131":4,"132":4,"133":4,"134":4,"135":4,"136":4,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":0,"148":0,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":0,"160":0,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":14,"168":14,"169":14,"170":4,"171":3603,"172":4,"173":4,"174":14,"175":14,"176":2,"177":2,"178":14,"179":14,"180":2,"181":2,"182":14,"183":14,"184":1,"185":1,"186":1,"187":14,"188":14,"189":1,"190":1,"191":14,"192":14,"193":14,"194":1,"195":1,"196":1,"197":1,"198":1,"199":1,"200":11,"201":11,"202":11,"203":1,"204":3,"205":1,"206":1,"207":11,"208":11,"209":2,"210":2,"211":11,"212":11,"213":2,"214":2,"215":11,"216":11,"217":1,"218":1,"219":1,"220":11,"221":11,"222":1,"223":1,"224":11,"225":11,"226":11,"227":1,"228":1,"229":1},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":230,"column":24}},"locations":[{"start":{"line":1,"column":0},"end":{"line":230,"column":24}}]},"1":{"type":"branch","line":83,"loc":{"start":{"line":83,"column":2},"end":{"line":88,"column":3}},"locations":[{"start":{"line":83,"column":2},"end":{"line":88,"column":3}}]},"2":{"type":"branch","line":84,"loc":{"start":{"line":84,"column":47},"end":{"line":87,"column":5}},"locations":[{"start":{"line":84,"column":47},"end":{"line":87,"column":5}}]},"3":{"type":"branch","line":95,"loc":{"start":{"line":95,"column":2},"end":{"line":99,"column":3}},"locations":[{"start":{"line":95,"column":2},"end":{"line":99,"column":3}}]},"4":{"type":"branch","line":96,"loc":{"start":{"line":96,"column":36},"end":{"line":98,"column":5}},"locations":[{"start":{"line":96,"column":36},"end":{"line":98,"column":5}}]},"5":{"type":"branch","line":98,"loc":{"start":{"line":98,"column":-1},"end":{"line":98,"column":5}},"locations":[{"start":{"line":98,"column":-1},"end":{"line":98,"column":5}}]},"6":{"type":"branch","line":99,"loc":{"start":{"line":99,"column":-1},"end":{"line":99,"column":2}},"locations":[{"start":{"line":99,"column":-1},"end":{"line":99,"column":2}}]},"7":{"type":"branch","line":106,"loc":{"start":{"line":106,"column":2},"end":{"line":111,"column":3}},"locations":[{"start":{"line":106,"column":2},"end":{"line":111,"column":3}}]},"8":{"type":"branch","line":107,"loc":{"start":{"line":107,"column":36},"end":{"line":110,"column":5}},"locations":[{"start":{"line":107,"column":36},"end":{"line":110,"column":5}}]},"9":{"type":"branch","line":116,"loc":{"start":{"line":116,"column":2},"end":{"line":137,"column":3}},"locations":[{"start":{"line":116,"column":2},"end":{"line":137,"column":3}}]},"10":{"type":"branch","line":123,"loc":{"start":{"line":123,"column":6},"end":{"line":125,"column":7}},"locations":[{"start":{"line":123,"column":6},"end":{"line":125,"column":7}}]},"11":{"type":"branch","line":127,"loc":{"start":{"line":127,"column":6},"end":{"line":129,"column":7}},"locations":[{"start":{"line":127,"column":6},"end":{"line":129,"column":7}}]},"12":{"type":"branch","line":130,"loc":{"start":{"line":130,"column":14},"end":{"line":135,"column":7}},"locations":[{"start":{"line":130,"column":14},"end":{"line":135,"column":7}}]},"13":{"type":"branch","line":167,"loc":{"start":{"line":167,"column":2},"end":{"line":194,"column":3}},"locations":[{"start":{"line":167,"column":2},"end":{"line":194,"column":3}}]},"14":{"type":"branch","line":170,"loc":{"start":{"line":170,"column":26},"end":{"line":174,"column":5}},"locations":[{"start":{"line":170,"column":26},"end":{"line":174,"column":5}}]},"15":{"type":"branch","line":176,"loc":{"start":{"line":176,"column":34},"end":{"line":178,"column":5}},"locations":[{"start":{"line":176,"column":34},"end":{"line":178,"column":5}}]},"16":{"type":"branch","line":180,"loc":{"start":{"line":180,"column":33},"end":{"line":182,"column":5}},"locations":[{"start":{"line":180,"column":33},"end":{"line":182,"column":5}}]},"17":{"type":"branch","line":184,"loc":{"start":{"line":184,"column":26},"end":{"line":187,"column":5}},"locations":[{"start":{"line":184,"column":26},"end":{"line":187,"column":5}}]},"18":{"type":"branch","line":189,"loc":{"start":{"line":189,"column":25},"end":{"line":191,"column":5}},"locations":[{"start":{"line":189,"column":25},"end":{"line":191,"column":5}}]},"19":{"type":"branch","line":171,"loc":{"start":{"line":171,"column":22},"end":{"line":172,"column":69}},"locations":[{"start":{"line":171,"column":22},"end":{"line":172,"column":69}}]},"20":{"type":"branch","line":177,"loc":{"start":{"line":177,"column":28},"end":{"line":177,"column":52}},"locations":[{"start":{"line":177,"column":28},"end":{"line":177,"column":52}}]},"21":{"type":"branch","line":181,"loc":{"start":{"line":181,"column":27},"end":{"line":181,"column":52}},"locations":[{"start":{"line":181,"column":27},"end":{"line":181,"column":52}}]},"22":{"type":"branch","line":186,"loc":{"start":{"line":186,"column":22},"end":{"line":186,"column":67}},"locations":[{"start":{"line":186,"column":22},"end":{"line":186,"column":67}}]},"23":{"type":"branch","line":200,"loc":{"start":{"line":200,"column":2},"end":{"line":227,"column":3}},"locations":[{"start":{"line":200,"column":2},"end":{"line":227,"column":3}}]},"24":{"type":"branch","line":203,"loc":{"start":{"line":203,"column":26},"end":{"line":207,"column":5}},"locations":[{"start":{"line":203,"column":26},"end":{"line":207,"column":5}}]},"25":{"type":"branch","line":209,"loc":{"start":{"line":209,"column":34},"end":{"line":211,"column":5}},"locations":[{"start":{"line":209,"column":34},"end":{"line":211,"column":5}}]},"26":{"type":"branch","line":213,"loc":{"start":{"line":213,"column":33},"end":{"line":215,"column":5}},"locations":[{"start":{"line":213,"column":33},"end":{"line":215,"column":5}}]},"27":{"type":"branch","line":217,"loc":{"start":{"line":217,"column":26},"end":{"line":220,"column":5}},"locations":[{"start":{"line":217,"column":26},"end":{"line":220,"column":5}}]},"28":{"type":"branch","line":222,"loc":{"start":{"line":222,"column":25},"end":{"line":224,"column":5}},"locations":[{"start":{"line":222,"column":25},"end":{"line":224,"column":5}}]},"29":{"type":"branch","line":204,"loc":{"start":{"line":204,"column":22},"end":{"line":205,"column":67}},"locations":[{"start":{"line":204,"column":22},"end":{"line":205,"column":67}}]},"30":{"type":"branch","line":210,"loc":{"start":{"line":210,"column":28},"end":{"line":210,"column":52}},"locations":[{"start":{"line":210,"column":28},"end":{"line":210,"column":52}}]},"31":{"type":"branch","line":214,"loc":{"start":{"line":214,"column":27},"end":{"line":214,"column":52}},"locations":[{"start":{"line":214,"column":27},"end":{"line":214,"column":52}}]},"32":{"type":"branch","line":219,"loc":{"start":{"line":219,"column":22},"end":{"line":219,"column":67}},"locations":[{"start":{"line":219,"column":22},"end":{"line":219,"column":67}}]}},"b":{"0":[1],"1":[6],"2":[1409],"3":[4],"4":[202],"5":[201],"6":[3],"7":[5],"8":[101],"9":[4],"10":[1209],"11":[1],"12":[4],"13":[14],"14":[4],"15":[2],"16":[2],"17":[1],"18":[1],"19":[3603],"20":[3],"21":[2],"22":[3],"23":[11],"24":[1],"25":[2],"26":[2],"27":[1],"28":[1],"29":[3],"30":[3],"31":[2],"32":[3]},"fnMap":{"0":{"name":"open","decl":{"start":{"line":30,"column":2},"end":{"line":32,"column":3}},"loc":{"start":{"line":30,"column":2},"end":{"line":32,"column":3}},"line":30},"1":{"name":"close","decl":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"line":37},"2":{"name":"put","decl":{"start":{"line":47,"column":2},"end":{"line":49,"column":3}},"loc":{"start":{"line":47,"column":2},"end":{"line":49,"column":3}},"line":47},"3":{"name":"get","decl":{"start":{"line":56,"column":2},"end":{"line":58,"column":3}},"loc":{"start":{"line":56,"column":2},"end":{"line":58,"column":3}},"line":56},"4":{"name":"has","decl":{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},"loc":{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},"line":65},"5":{"name":"delete","decl":{"start":{"line":74,"column":2},"end":{"line":76,"column":3}},"loc":{"start":{"line":74,"column":2},"end":{"line":76,"column":3}},"line":74},"6":{"name":"putMany","decl":{"start":{"line":83,"column":2},"end":{"line":88,"column":3}},"loc":{"start":{"line":83,"column":2},"end":{"line":88,"column":3}},"line":83},"7":{"name":"getMany","decl":{"start":{"line":95,"column":2},"end":{"line":99,"column":3}},"loc":{"start":{"line":95,"column":2},"end":{"line":99,"column":3}},"line":95},"8":{"name":"deleteMany","decl":{"start":{"line":106,"column":2},"end":{"line":111,"column":3}},"loc":{"start":{"line":106,"column":2},"end":{"line":111,"column":3}},"line":106},"9":{"name":"batch","decl":{"start":{"line":116,"column":2},"end":{"line":137,"column":3}},"loc":{"start":{"line":116,"column":2},"end":{"line":137,"column":3}},"line":116},"10":{"name":"put","decl":{"start":{"line":123,"column":6},"end":{"line":125,"column":7}},"loc":{"start":{"line":123,"column":6},"end":{"line":125,"column":7}},"line":123},"11":{"name":"delete","decl":{"start":{"line":127,"column":6},"end":{"line":129,"column":7}},"loc":{"start":{"line":127,"column":6},"end":{"line":129,"column":7}},"line":127},"12":{"name":"commit","decl":{"start":{"line":130,"column":14},"end":{"line":135,"column":7}},"loc":{"start":{"line":130,"column":14},"end":{"line":135,"column":7}},"line":130},"13":{"name":"_all","decl":{"start":{"line":147,"column":2},"end":{"line":149,"column":3}},"loc":{"start":{"line":147,"column":2},"end":{"line":149,"column":3}},"line":147},"14":{"name":"_allKeys","decl":{"start":{"line":159,"column":2},"end":{"line":161,"column":3}},"loc":{"start":{"line":159,"column":2},"end":{"line":161,"column":3}},"line":159},"15":{"name":"query","decl":{"start":{"line":167,"column":2},"end":{"line":194,"column":3}},"loc":{"start":{"line":167,"column":2},"end":{"line":194,"column":3}},"line":167},"16":{"name":"queryKeys","decl":{"start":{"line":200,"column":2},"end":{"line":227,"column":3}},"loc":{"start":{"line":200,"column":2},"end":{"line":227,"column":3}},"line":200}},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":6,"7":4,"8":5,"9":4,"10":1209,"11":1,"12":4,"13":0,"14":0,"15":14,"16":11}} -,"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/errors.js": {"path":"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/errors.js","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":35}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":0}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":3}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":23}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":3}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":48}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":43}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":1}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":0}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":3}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":23}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":3}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":36}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":41}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":45}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":1}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":0}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":3}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":23}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":3}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":35}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":40}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":44}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":1}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":0}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":3}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":23}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":3}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":30}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":37}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":38}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":1}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":0}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":3}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":23}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":3}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":29}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":35}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":36}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":1}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":0}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":18}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":20}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":22}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":21}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":16}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":14}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":0,"8":0,"9":0,"10":0,"11":1,"12":1,"13":1,"14":1,"15":0,"16":0,"17":0,"18":0,"19":1,"20":1,"21":1,"22":1,"23":0,"24":0,"25":0,"26":0,"27":1,"28":1,"29":1,"30":1,"31":2,"32":2,"33":2,"34":2,"35":1,"36":1,"37":1,"38":1,"39":0,"40":0,"41":0,"42":0,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":51,"column":1}},"locations":[{"start":{"line":1,"column":0},"end":{"line":51,"column":1}}]},"1":{"type":"branch","line":32,"loc":{"start":{"line":32,"column":0},"end":{"line":35,"column":1}},"locations":[{"start":{"line":32,"column":0},"end":{"line":35,"column":1}}]}},"b":{"0":[1],"1":[2]},"fnMap":{"0":{"name":"dbOpenFailedError","decl":{"start":{"line":8,"column":0},"end":{"line":11,"column":1}},"loc":{"start":{"line":8,"column":0},"end":{"line":11,"column":1}},"line":8},"1":{"name":"dbDeleteFailedError","decl":{"start":{"line":16,"column":0},"end":{"line":19,"column":1}},"loc":{"start":{"line":16,"column":0},"end":{"line":19,"column":1}},"line":16},"2":{"name":"dbWriteFailedError","decl":{"start":{"line":24,"column":0},"end":{"line":27,"column":1}},"loc":{"start":{"line":24,"column":0},"end":{"line":27,"column":1}},"line":24},"3":{"name":"notFoundError","decl":{"start":{"line":32,"column":0},"end":{"line":35,"column":1}},"loc":{"start":{"line":32,"column":0},"end":{"line":35,"column":1}},"line":32},"4":{"name":"abortedError","decl":{"start":{"line":40,"column":0},"end":{"line":43,"column":1}},"loc":{"start":{"line":40,"column":0},"end":{"line":43,"column":1}},"line":40}},"f":{"0":0,"1":0,"2":0,"3":2,"4":0}} -,"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/index.js": {"path":"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/index.js","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":3}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":51}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":43}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":55}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":43}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":55}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":53}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":49}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":61}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":59}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":41}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":3}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":0}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":28}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":43}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":32}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":34}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":36}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":0}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":18}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":6}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":18}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":8}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":9}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":9}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":28,"column":1}},"locations":[{"start":{"line":1,"column":0},"end":{"line":28,"column":1}}]}},"b":{"0":[1]},"fnMap":{},"f":{}} -,"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/key.js": {"path":"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/key.js","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":36}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":0}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":73}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":79}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":0}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":20}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":51}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":27}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":0}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":3}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":55}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":78}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":70}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":75}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":43}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":25}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":37}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":69}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":75}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":27}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":54}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":55}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":77}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":2}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":3}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":11}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":5}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":35}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":29}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":5}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":26}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":32}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":41}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":41}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":19}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":12}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":68}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":5}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":0}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":24}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":18}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":5}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":0}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":16}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":18}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":5}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":0}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":65}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":36}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":5}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":3}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":0}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":5}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":41}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":4}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":105}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":22}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":5}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":32}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":50}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":3}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":0}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":5}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":52}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":4}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":26}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":5}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":17}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":20}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":3}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":0}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":5}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":44}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":4}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":22}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":5}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":31}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":36}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":3}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":0}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":5}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":47}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":4}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":58}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":19}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":4}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":13}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":10}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":39}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":26}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":8}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":5}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":32}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":39}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":3}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":0}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":5}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":45}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":4}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":19}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":4}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":13}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":10}},"105":{"start":{"line":106,"column":0},"end":{"line":106,"column":17}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":51}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":8}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":5}},"109":{"start":{"line":110,"column":0},"end":{"line":110,"column":20}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":46}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":3}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":0}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":5}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":28}},"115":{"start":{"line":116,"column":0},"end":{"line":116,"column":4}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":20}},"117":{"start":{"line":118,"column":0},"end":{"line":118,"column":5}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":12}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":51}},"120":{"start":{"line":121,"column":0},"end":{"line":121,"column":26}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":5}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":0}},"123":{"start":{"line":124,"column":0},"end":{"line":124,"column":35}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":60}},"125":{"start":{"line":126,"column":0},"end":{"line":126,"column":31}},"126":{"start":{"line":127,"column":0},"end":{"line":127,"column":29}},"127":{"start":{"line":128,"column":0},"end":{"line":128,"column":23}},"128":{"start":{"line":129,"column":0},"end":{"line":129,"column":5}},"129":{"start":{"line":130,"column":0},"end":{"line":130,"column":0}},"130":{"start":{"line":131,"column":0},"end":{"line":131,"column":49}},"131":{"start":{"line":132,"column":0},"end":{"line":132,"column":89}},"132":{"start":{"line":133,"column":0},"end":{"line":133,"column":43}},"133":{"start":{"line":134,"column":0},"end":{"line":134,"column":5}},"134":{"start":{"line":135,"column":0},"end":{"line":135,"column":3}},"135":{"start":{"line":136,"column":0},"end":{"line":136,"column":0}},"136":{"start":{"line":137,"column":0},"end":{"line":137,"column":5}},"137":{"start":{"line":138,"column":0},"end":{"line":138,"column":57}},"138":{"start":{"line":139,"column":0},"end":{"line":139,"column":4}},"139":{"start":{"line":140,"column":0},"end":{"line":140,"column":54}},"140":{"start":{"line":141,"column":0},"end":{"line":141,"column":23}},"141":{"start":{"line":142,"column":0},"end":{"line":142,"column":5}},"142":{"start":{"line":143,"column":0},"end":{"line":143,"column":14}},"143":{"start":{"line":144,"column":0},"end":{"line":144,"column":29}},"144":{"start":{"line":145,"column":0},"end":{"line":145,"column":28}},"145":{"start":{"line":146,"column":0},"end":{"line":146,"column":0}},"146":{"start":{"line":147,"column":0},"end":{"line":147,"column":44}},"147":{"start":{"line":148,"column":0},"end":{"line":148,"column":33}},"148":{"start":{"line":149,"column":0},"end":{"line":149,"column":20}},"149":{"start":{"line":150,"column":0},"end":{"line":150,"column":7}},"150":{"start":{"line":151,"column":0},"end":{"line":151,"column":0}},"151":{"start":{"line":152,"column":0},"end":{"line":152,"column":25}},"152":{"start":{"line":153,"column":0},"end":{"line":153,"column":25}},"153":{"start":{"line":154,"column":0},"end":{"line":154,"column":0}},"154":{"start":{"line":155,"column":0},"end":{"line":155,"column":20}},"155":{"start":{"line":156,"column":0},"end":{"line":156,"column":19}},"156":{"start":{"line":157,"column":0},"end":{"line":157,"column":27}},"157":{"start":{"line":158,"column":0},"end":{"line":158,"column":20}},"158":{"start":{"line":159,"column":0},"end":{"line":159,"column":7}},"159":{"start":{"line":160,"column":0},"end":{"line":160,"column":5}},"160":{"start":{"line":161,"column":0},"end":{"line":161,"column":0}},"161":{"start":{"line":162,"column":0},"end":{"line":162,"column":38}},"162":{"start":{"line":163,"column":0},"end":{"line":163,"column":3}},"163":{"start":{"line":164,"column":0},"end":{"line":164,"column":0}},"164":{"start":{"line":165,"column":0},"end":{"line":165,"column":5}},"165":{"start":{"line":166,"column":0},"end":{"line":166,"column":54}},"166":{"start":{"line":167,"column":0},"end":{"line":167,"column":4}},"167":{"start":{"line":168,"column":0},"end":{"line":168,"column":19}},"168":{"start":{"line":169,"column":0},"end":{"line":169,"column":4}},"169":{"start":{"line":170,"column":0},"end":{"line":170,"column":13}},"170":{"start":{"line":171,"column":0},"end":{"line":171,"column":10}},"171":{"start":{"line":172,"column":0},"end":{"line":172,"column":62}},"172":{"start":{"line":173,"column":0},"end":{"line":173,"column":54}},"173":{"start":{"line":174,"column":0},"end":{"line":174,"column":8}},"174":{"start":{"line":175,"column":0},"end":{"line":175,"column":5}},"175":{"start":{"line":176,"column":0},"end":{"line":176,"column":14}},"176":{"start":{"line":177,"column":0},"end":{"line":177,"column":60}},"177":{"start":{"line":178,"column":0},"end":{"line":178,"column":3}},"178":{"start":{"line":179,"column":0},"end":{"line":179,"column":0}},"179":{"start":{"line":180,"column":0},"end":{"line":180,"column":5}},"180":{"start":{"line":181,"column":0},"end":{"line":181,"column":49}},"181":{"start":{"line":182,"column":0},"end":{"line":182,"column":4}},"182":{"start":{"line":183,"column":0},"end":{"line":183,"column":29}},"183":{"start":{"line":184,"column":0},"end":{"line":184,"column":5}},"184":{"start":{"line":185,"column":0},"end":{"line":185,"column":17}},"185":{"start":{"line":186,"column":0},"end":{"line":186,"column":22}},"186":{"start":{"line":187,"column":0},"end":{"line":187,"column":3}},"187":{"start":{"line":188,"column":0},"end":{"line":188,"column":0}},"188":{"start":{"line":189,"column":0},"end":{"line":189,"column":47}},"189":{"start":{"line":190,"column":0},"end":{"line":190,"column":4}},"190":{"start":{"line":191,"column":0},"end":{"line":191,"column":22}},"191":{"start":{"line":192,"column":0},"end":{"line":192,"column":4}},"192":{"start":{"line":193,"column":0},"end":{"line":193,"column":13}},"193":{"start":{"line":194,"column":0},"end":{"line":194,"column":10}},"194":{"start":{"line":195,"column":0},"end":{"line":195,"column":68}},"195":{"start":{"line":196,"column":0},"end":{"line":196,"column":29}},"196":{"start":{"line":197,"column":0},"end":{"line":197,"column":8}},"197":{"start":{"line":198,"column":0},"end":{"line":198,"column":5}},"198":{"start":{"line":199,"column":0},"end":{"line":199,"column":20}},"199":{"start":{"line":200,"column":0},"end":{"line":200,"column":32}},"200":{"start":{"line":201,"column":0},"end":{"line":201,"column":28}},"201":{"start":{"line":202,"column":0},"end":{"line":202,"column":3}},"202":{"start":{"line":203,"column":0},"end":{"line":203,"column":0}},"203":{"start":{"line":204,"column":0},"end":{"line":204,"column":5}},"204":{"start":{"line":205,"column":0},"end":{"line":205,"column":51}},"205":{"start":{"line":206,"column":0},"end":{"line":206,"column":4}},"206":{"start":{"line":207,"column":0},"end":{"line":207,"column":29}},"207":{"start":{"line":208,"column":0},"end":{"line":208,"column":4}},"208":{"start":{"line":209,"column":0},"end":{"line":209,"column":13}},"209":{"start":{"line":210,"column":0},"end":{"line":210,"column":10}},"210":{"start":{"line":211,"column":0},"end":{"line":211,"column":59}},"211":{"start":{"line":212,"column":0},"end":{"line":212,"column":57}},"212":{"start":{"line":213,"column":0},"end":{"line":213,"column":8}},"213":{"start":{"line":214,"column":0},"end":{"line":214,"column":5}},"214":{"start":{"line":215,"column":0},"end":{"line":215,"column":11}},"215":{"start":{"line":216,"column":0},"end":{"line":216,"column":51}},"216":{"start":{"line":217,"column":0},"end":{"line":217,"column":3}},"217":{"start":{"line":218,"column":0},"end":{"line":218,"column":0}},"218":{"start":{"line":219,"column":0},"end":{"line":219,"column":5}},"219":{"start":{"line":220,"column":0},"end":{"line":220,"column":62}},"220":{"start":{"line":221,"column":0},"end":{"line":221,"column":4}},"221":{"start":{"line":222,"column":0},"end":{"line":222,"column":22}},"222":{"start":{"line":223,"column":0},"end":{"line":223,"column":4}},"223":{"start":{"line":224,"column":0},"end":{"line":224,"column":13}},"224":{"start":{"line":225,"column":0},"end":{"line":225,"column":10}},"225":{"start":{"line":226,"column":0},"end":{"line":226,"column":59}},"226":{"start":{"line":227,"column":0},"end":{"line":227,"column":18}},"227":{"start":{"line":228,"column":0},"end":{"line":228,"column":8}},"228":{"start":{"line":229,"column":0},"end":{"line":229,"column":5}},"229":{"start":{"line":230,"column":0},"end":{"line":230,"column":11}},"230":{"start":{"line":231,"column":0},"end":{"line":231,"column":46}},"231":{"start":{"line":232,"column":0},"end":{"line":232,"column":3}},"232":{"start":{"line":233,"column":0},"end":{"line":233,"column":0}},"233":{"start":{"line":234,"column":0},"end":{"line":234,"column":5}},"234":{"start":{"line":235,"column":0},"end":{"line":235,"column":62}},"235":{"start":{"line":236,"column":0},"end":{"line":236,"column":4}},"236":{"start":{"line":237,"column":0},"end":{"line":237,"column":22}},"237":{"start":{"line":238,"column":0},"end":{"line":238,"column":4}},"238":{"start":{"line":239,"column":0},"end":{"line":239,"column":13}},"239":{"start":{"line":240,"column":0},"end":{"line":240,"column":10}},"240":{"start":{"line":241,"column":0},"end":{"line":241,"column":59}},"241":{"start":{"line":242,"column":0},"end":{"line":242,"column":23}},"242":{"start":{"line":243,"column":0},"end":{"line":243,"column":8}},"243":{"start":{"line":244,"column":0},"end":{"line":244,"column":5}},"244":{"start":{"line":245,"column":0},"end":{"line":245,"column":11}},"245":{"start":{"line":246,"column":0},"end":{"line":246,"column":47}},"246":{"start":{"line":247,"column":0},"end":{"line":247,"column":3}},"247":{"start":{"line":248,"column":0},"end":{"line":248,"column":0}},"248":{"start":{"line":249,"column":0},"end":{"line":249,"column":5}},"249":{"start":{"line":250,"column":0},"end":{"line":250,"column":73}},"250":{"start":{"line":251,"column":0},"end":{"line":251,"column":4}},"251":{"start":{"line":252,"column":0},"end":{"line":252,"column":46}},"252":{"start":{"line":253,"column":0},"end":{"line":253,"column":19}},"253":{"start":{"line":254,"column":0},"end":{"line":254,"column":4}},"254":{"start":{"line":255,"column":0},"end":{"line":255,"column":13}},"255":{"start":{"line":256,"column":0},"end":{"line":256,"column":10}},"256":{"start":{"line":257,"column":0},"end":{"line":257,"column":64}},"257":{"start":{"line":258,"column":0},"end":{"line":258,"column":54}},"258":{"start":{"line":259,"column":0},"end":{"line":259,"column":8}},"259":{"start":{"line":260,"column":0},"end":{"line":260,"column":5}},"260":{"start":{"line":261,"column":0},"end":{"line":261,"column":16}},"261":{"start":{"line":262,"column":0},"end":{"line":262,"column":45}},"262":{"start":{"line":263,"column":0},"end":{"line":263,"column":3}},"263":{"start":{"line":264,"column":0},"end":{"line":264,"column":0}},"264":{"start":{"line":265,"column":0},"end":{"line":265,"column":5}},"265":{"start":{"line":266,"column":0},"end":{"line":266,"column":52}},"266":{"start":{"line":267,"column":0},"end":{"line":267,"column":4}},"267":{"start":{"line":268,"column":0},"end":{"line":268,"column":19}},"268":{"start":{"line":269,"column":0},"end":{"line":269,"column":4}},"269":{"start":{"line":270,"column":0},"end":{"line":270,"column":13}},"270":{"start":{"line":271,"column":0},"end":{"line":271,"column":10}},"271":{"start":{"line":272,"column":0},"end":{"line":272,"column":59}},"272":{"start":{"line":273,"column":0},"end":{"line":273,"column":43}},"273":{"start":{"line":274,"column":0},"end":{"line":274,"column":8}},"274":{"start":{"line":275,"column":0},"end":{"line":275,"column":5}},"275":{"start":{"line":276,"column":0},"end":{"line":276,"column":11}},"276":{"start":{"line":277,"column":0},"end":{"line":277,"column":36}},"277":{"start":{"line":278,"column":0},"end":{"line":278,"column":32}},"278":{"start":{"line":279,"column":0},"end":{"line":279,"column":19}},"279":{"start":{"line":280,"column":0},"end":{"line":280,"column":5}},"280":{"start":{"line":281,"column":0},"end":{"line":281,"column":20}},"281":{"start":{"line":282,"column":0},"end":{"line":282,"column":21}},"282":{"start":{"line":283,"column":0},"end":{"line":283,"column":3}},"283":{"start":{"line":284,"column":0},"end":{"line":284,"column":0}},"284":{"start":{"line":285,"column":0},"end":{"line":285,"column":5}},"285":{"start":{"line":286,"column":0},"end":{"line":286,"column":42}},"286":{"start":{"line":287,"column":0},"end":{"line":287,"column":4}},"287":{"start":{"line":288,"column":0},"end":{"line":288,"column":19}},"288":{"start":{"line":289,"column":0},"end":{"line":289,"column":4}},"289":{"start":{"line":290,"column":0},"end":{"line":290,"column":13}},"290":{"start":{"line":291,"column":0},"end":{"line":291,"column":10}},"291":{"start":{"line":292,"column":0},"end":{"line":292,"column":61}},"292":{"start":{"line":293,"column":0},"end":{"line":293,"column":37}},"293":{"start":{"line":294,"column":0},"end":{"line":294,"column":8}},"294":{"start":{"line":295,"column":0},"end":{"line":295,"column":5}},"295":{"start":{"line":296,"column":0},"end":{"line":296,"column":13}},"296":{"start":{"line":297,"column":0},"end":{"line":297,"column":28}},"297":{"start":{"line":298,"column":0},"end":{"line":298,"column":28}},"298":{"start":{"line":299,"column":0},"end":{"line":299,"column":30}},"299":{"start":{"line":300,"column":0},"end":{"line":300,"column":5}},"300":{"start":{"line":301,"column":0},"end":{"line":301,"column":0}},"301":{"start":{"line":302,"column":0},"end":{"line":302,"column":52}},"302":{"start":{"line":303,"column":0},"end":{"line":303,"column":3}},"303":{"start":{"line":304,"column":0},"end":{"line":304,"column":0}},"304":{"start":{"line":305,"column":0},"end":{"line":305,"column":5}},"305":{"start":{"line":306,"column":0},"end":{"line":306,"column":41}},"306":{"start":{"line":307,"column":0},"end":{"line":307,"column":4}},"307":{"start":{"line":308,"column":0},"end":{"line":308,"column":44}},"308":{"start":{"line":309,"column":0},"end":{"line":309,"column":19}},"309":{"start":{"line":310,"column":0},"end":{"line":310,"column":4}},"310":{"start":{"line":311,"column":0},"end":{"line":311,"column":13}},"311":{"start":{"line":312,"column":0},"end":{"line":312,"column":10}},"312":{"start":{"line":313,"column":0},"end":{"line":313,"column":70}},"313":{"start":{"line":314,"column":0},"end":{"line":314,"column":54}},"314":{"start":{"line":315,"column":0},"end":{"line":315,"column":8}},"315":{"start":{"line":316,"column":0},"end":{"line":316,"column":5}},"316":{"start":{"line":317,"column":0},"end":{"line":317,"column":15}},"317":{"start":{"line":318,"column":0},"end":{"line":318,"column":39}},"318":{"start":{"line":319,"column":0},"end":{"line":319,"column":16}},"319":{"start":{"line":320,"column":0},"end":{"line":320,"column":45}},"320":{"start":{"line":321,"column":0},"end":{"line":321,"column":17}},"321":{"start":{"line":322,"column":0},"end":{"line":322,"column":5}},"322":{"start":{"line":323,"column":0},"end":{"line":323,"column":0}},"323":{"start":{"line":324,"column":0},"end":{"line":324,"column":59}},"324":{"start":{"line":325,"column":0},"end":{"line":325,"column":3}},"325":{"start":{"line":326,"column":0},"end":{"line":326,"column":0}},"326":{"start":{"line":327,"column":0},"end":{"line":327,"column":5}},"327":{"start":{"line":328,"column":0},"end":{"line":328,"column":52}},"328":{"start":{"line":329,"column":0},"end":{"line":329,"column":4}},"329":{"start":{"line":330,"column":0},"end":{"line":330,"column":55}},"330":{"start":{"line":331,"column":0},"end":{"line":331,"column":23}},"331":{"start":{"line":332,"column":0},"end":{"line":332,"column":4}},"332":{"start":{"line":333,"column":0},"end":{"line":333,"column":13}},"333":{"start":{"line":334,"column":0},"end":{"line":334,"column":10}},"334":{"start":{"line":335,"column":0},"end":{"line":335,"column":59}},"335":{"start":{"line":336,"column":0},"end":{"line":336,"column":15}},"336":{"start":{"line":337,"column":0},"end":{"line":337,"column":8}},"337":{"start":{"line":338,"column":0},"end":{"line":338,"column":5}},"338":{"start":{"line":339,"column":0},"end":{"line":339,"column":24}},"339":{"start":{"line":340,"column":0},"end":{"line":340,"column":47}},"340":{"start":{"line":341,"column":0},"end":{"line":341,"column":18}},"341":{"start":{"line":342,"column":0},"end":{"line":342,"column":5}},"342":{"start":{"line":343,"column":0},"end":{"line":343,"column":0}},"343":{"start":{"line":344,"column":0},"end":{"line":344,"column":55}},"344":{"start":{"line":345,"column":0},"end":{"line":345,"column":3}},"345":{"start":{"line":346,"column":0},"end":{"line":346,"column":0}},"346":{"start":{"line":347,"column":0},"end":{"line":347,"column":5}},"347":{"start":{"line":348,"column":0},"end":{"line":348,"column":62}},"348":{"start":{"line":349,"column":0},"end":{"line":349,"column":4}},"349":{"start":{"line":350,"column":0},"end":{"line":350,"column":55}},"350":{"start":{"line":351,"column":0},"end":{"line":351,"column":23}},"351":{"start":{"line":352,"column":0},"end":{"line":352,"column":4}},"352":{"start":{"line":353,"column":0},"end":{"line":353,"column":13}},"353":{"start":{"line":354,"column":0},"end":{"line":354,"column":10}},"354":{"start":{"line":355,"column":0},"end":{"line":355,"column":60}},"355":{"start":{"line":356,"column":0},"end":{"line":356,"column":15}},"356":{"start":{"line":357,"column":0},"end":{"line":357,"column":8}},"357":{"start":{"line":358,"column":0},"end":{"line":358,"column":5}},"358":{"start":{"line":359,"column":0},"end":{"line":359,"column":25}},"359":{"start":{"line":360,"column":0},"end":{"line":360,"column":47}},"360":{"start":{"line":361,"column":0},"end":{"line":361,"column":18}},"361":{"start":{"line":362,"column":0},"end":{"line":362,"column":5}},"362":{"start":{"line":363,"column":0},"end":{"line":363,"column":0}},"363":{"start":{"line":364,"column":0},"end":{"line":364,"column":55}},"364":{"start":{"line":365,"column":0},"end":{"line":365,"column":3}},"365":{"start":{"line":366,"column":0},"end":{"line":366,"column":0}},"366":{"start":{"line":367,"column":0},"end":{"line":367,"column":5}},"367":{"start":{"line":368,"column":0},"end":{"line":368,"column":47}},"368":{"start":{"line":369,"column":0},"end":{"line":369,"column":4}},"369":{"start":{"line":370,"column":0},"end":{"line":370,"column":23}},"370":{"start":{"line":371,"column":0},"end":{"line":371,"column":4}},"371":{"start":{"line":372,"column":0},"end":{"line":372,"column":5}},"372":{"start":{"line":373,"column":0},"end":{"line":373,"column":17}},"373":{"start":{"line":374,"column":0},"end":{"line":374,"column":35}},"374":{"start":{"line":375,"column":0},"end":{"line":375,"column":3}},"375":{"start":{"line":376,"column":0},"end":{"line":376,"column":0}},"376":{"start":{"line":377,"column":0},"end":{"line":377,"column":5}},"377":{"start":{"line":378,"column":0},"end":{"line":378,"column":47}},"378":{"start":{"line":379,"column":0},"end":{"line":379,"column":4}},"379":{"start":{"line":380,"column":0},"end":{"line":380,"column":64}},"380":{"start":{"line":381,"column":0},"end":{"line":381,"column":19}},"381":{"start":{"line":382,"column":0},"end":{"line":382,"column":5}},"382":{"start":{"line":383,"column":0},"end":{"line":383,"column":20}},"383":{"start":{"line":384,"column":0},"end":{"line":384,"column":100}},"384":{"start":{"line":385,"column":0},"end":{"line":385,"column":3}},"385":{"start":{"line":386,"column":0},"end":{"line":386,"column":1}},"386":{"start":{"line":387,"column":0},"end":{"line":387,"column":0}},"387":{"start":{"line":388,"column":0},"end":{"line":388,"column":3}},"388":{"start":{"line":389,"column":0},"end":{"line":389,"column":57}},"389":{"start":{"line":390,"column":0},"end":{"line":390,"column":2}},"390":{"start":{"line":391,"column":0},"end":{"line":391,"column":21}},"391":{"start":{"line":392,"column":0},"end":{"line":392,"column":20}},"392":{"start":{"line":393,"column":0},"end":{"line":393,"column":3}},"393":{"start":{"line":394,"column":0},"end":{"line":394,"column":29}},"394":{"start":{"line":395,"column":0},"end":{"line":395,"column":29}},"395":{"start":{"line":396,"column":0},"end":{"line":396,"column":25}},"396":{"start":{"line":397,"column":0},"end":{"line":397,"column":13}},"397":{"start":{"line":398,"column":0},"end":{"line":398,"column":3}},"398":{"start":{"line":399,"column":0},"end":{"line":399,"column":37}},"399":{"start":{"line":400,"column":0},"end":{"line":400,"column":1}},"400":{"start":{"line":401,"column":0},"end":{"line":401,"column":0}},"401":{"start":{"line":402,"column":0},"end":{"line":402,"column":3}},"402":{"start":{"line":403,"column":0},"end":{"line":403,"column":61}},"403":{"start":{"line":404,"column":0},"end":{"line":404,"column":2}},"404":{"start":{"line":405,"column":0},"end":{"line":405,"column":21}},"405":{"start":{"line":406,"column":0},"end":{"line":406,"column":20}},"406":{"start":{"line":407,"column":0},"end":{"line":407,"column":3}},"407":{"start":{"line":408,"column":0},"end":{"line":408,"column":30}},"408":{"start":{"line":409,"column":0},"end":{"line":409,"column":29}},"409":{"start":{"line":410,"column":0},"end":{"line":410,"column":32}},"410":{"start":{"line":411,"column":0},"end":{"line":411,"column":1}},"411":{"start":{"line":412,"column":0},"end":{"line":412,"column":0}},"412":{"start":{"line":413,"column":0},"end":{"line":413,"column":3}},"413":{"start":{"line":414,"column":0},"end":{"line":414,"column":43}},"414":{"start":{"line":415,"column":0},"end":{"line":415,"column":2}},"415":{"start":{"line":416,"column":0},"end":{"line":416,"column":14}},"416":{"start":{"line":417,"column":0},"end":{"line":417,"column":28}},"417":{"start":{"line":418,"column":0},"end":{"line":418,"column":17}},"418":{"start":{"line":419,"column":0},"end":{"line":419,"column":3}},"419":{"start":{"line":420,"column":0},"end":{"line":420,"column":24}},"420":{"start":{"line":421,"column":0},"end":{"line":421,"column":46}},"421":{"start":{"line":422,"column":0},"end":{"line":422,"column":1}},"422":{"start":{"line":423,"column":0},"end":{"line":423,"column":0}},"423":{"start":{"line":424,"column":0},"end":{"line":424,"column":20}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":5547,"34":5544,"35":5547,"36":3,"37":3,"38":0,"39":0,"40":5547,"41":5547,"42":5528,"43":5528,"44":5547,"45":5547,"46":5528,"47":5528,"48":5547,"49":5547,"50":0,"51":0,"52":5547,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":6973,"62":6973,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":3,"71":3,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":56,"80":56,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":4,"96":4,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":100,"111":100,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":5528,"120":3,"121":3,"122":5528,"123":5528,"124":156,"125":156,"126":156,"127":156,"128":156,"129":5528,"130":5528,"131":5528,"132":14,"133":14,"134":5528,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":14,"144":14,"145":14,"146":14,"147":27,"148":3,"149":3,"150":24,"151":24,"152":24,"153":24,"154":27,"155":4,"156":27,"157":4,"158":4,"159":27,"160":3,"161":3,"162":14,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":0,"177":0,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":53,"186":53,"187":1,"188":1,"189":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1,"196":1,"197":1,"198":1,"199":36,"200":36,"201":36,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":136,"216":136,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":26,"231":26,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":10,"246":10,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":10,"262":10,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":12,"277":12,"278":5,"279":5,"280":12,"281":12,"282":12,"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1,"290":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":35,"297":35,"298":15,"299":15,"300":20,"301":20,"302":35,"303":1,"304":1,"305":1,"306":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1,"314":1,"315":1,"316":1,"317":21,"318":2,"319":21,"320":0,"321":0,"322":19,"323":19,"324":21,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":8,"340":2,"341":2,"342":6,"343":6,"344":8,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":6,"360":0,"361":0,"362":6,"363":6,"364":6,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":0,"374":0,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":4,"384":4,"385":1,"386":1,"387":1,"388":1,"389":1,"390":1,"391":1,"392":1,"393":26,"394":26,"395":26,"396":14,"397":14,"398":12,"399":26,"400":1,"401":1,"402":1,"403":1,"404":1,"405":1,"406":1,"407":10,"408":10,"409":10,"410":10,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"418":1,"419":4,"420":4,"421":4,"422":1,"423":1},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":424,"column":20}},"locations":[{"start":{"line":1,"column":0},"end":{"line":424,"column":20}}]},"1":{"type":"branch","line":33,"loc":{"start":{"line":33,"column":2},"end":{"line":53,"column":3}},"locations":[{"start":{"line":33,"column":2},"end":{"line":53,"column":3}}]},"2":{"type":"branch","line":34,"loc":{"start":{"line":34,"column":31},"end":{"line":36,"column":5}},"locations":[{"start":{"line":34,"column":31},"end":{"line":36,"column":5}}]},"3":{"type":"branch","line":36,"loc":{"start":{"line":36,"column":5},"end":{"line":40,"column":5}},"locations":[{"start":{"line":36,"column":5},"end":{"line":40,"column":5}}]},"4":{"type":"branch","line":38,"loc":{"start":{"line":38,"column":5},"end":{"line":40,"column":5}},"locations":[{"start":{"line":38,"column":5},"end":{"line":40,"column":5}}]},"5":{"type":"branch","line":42,"loc":{"start":{"line":42,"column":23},"end":{"line":44,"column":5}},"locations":[{"start":{"line":42,"column":23},"end":{"line":44,"column":5}}]},"6":{"type":"branch","line":46,"loc":{"start":{"line":46,"column":15},"end":{"line":48,"column":5}},"locations":[{"start":{"line":46,"column":15},"end":{"line":48,"column":5}}]},"7":{"type":"branch","line":50,"loc":{"start":{"line":50,"column":64},"end":{"line":52,"column":5}},"locations":[{"start":{"line":50,"column":64},"end":{"line":52,"column":5}}]},"8":{"type":"branch","line":61,"loc":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"locations":[{"start":{"line":61,"column":2},"end":{"line":63,"column":3}}]},"9":{"type":"branch","line":70,"loc":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"locations":[{"start":{"line":70,"column":2},"end":{"line":72,"column":3}}]},"10":{"type":"branch","line":79,"loc":{"start":{"line":79,"column":2},"end":{"line":81,"column":3}},"locations":[{"start":{"line":79,"column":2},"end":{"line":81,"column":3}}]},"11":{"type":"branch","line":95,"loc":{"start":{"line":95,"column":9},"end":{"line":97,"column":3}},"locations":[{"start":{"line":95,"column":9},"end":{"line":97,"column":3}}]},"12":{"type":"branch","line":110,"loc":{"start":{"line":110,"column":9},"end":{"line":112,"column":3}},"locations":[{"start":{"line":110,"column":9},"end":{"line":112,"column":3}}]},"13":{"type":"branch","line":119,"loc":{"start":{"line":119,"column":2},"end":{"line":135,"column":3}},"locations":[{"start":{"line":119,"column":2},"end":{"line":135,"column":3}}]},"14":{"type":"branch","line":120,"loc":{"start":{"line":120,"column":50},"end":{"line":122,"column":5}},"locations":[{"start":{"line":120,"column":50},"end":{"line":122,"column":5}}]},"15":{"type":"branch","line":124,"loc":{"start":{"line":124,"column":34},"end":{"line":129,"column":5}},"locations":[{"start":{"line":124,"column":34},"end":{"line":129,"column":5}}]},"16":{"type":"branch","line":132,"loc":{"start":{"line":132,"column":36},"end":{"line":132,"column":86}},"locations":[{"start":{"line":132,"column":36},"end":{"line":132,"column":86}}]},"17":{"type":"branch","line":132,"loc":{"start":{"line":132,"column":88},"end":{"line":134,"column":5}},"locations":[{"start":{"line":132,"column":88},"end":{"line":134,"column":5}}]},"18":{"type":"branch","line":143,"loc":{"start":{"line":143,"column":2},"end":{"line":163,"column":3}},"locations":[{"start":{"line":143,"column":2},"end":{"line":163,"column":3}}]},"19":{"type":"branch","line":147,"loc":{"start":{"line":147,"column":43},"end":{"line":160,"column":5}},"locations":[{"start":{"line":147,"column":43},"end":{"line":160,"column":5}}]},"20":{"type":"branch","line":148,"loc":{"start":{"line":148,"column":32},"end":{"line":150,"column":7}},"locations":[{"start":{"line":148,"column":32},"end":{"line":150,"column":7}}]},"21":{"type":"branch","line":151,"loc":{"start":{"line":151,"column":-1},"end":{"line":155,"column":19}},"locations":[{"start":{"line":151,"column":-1},"end":{"line":155,"column":19}}]},"22":{"type":"branch","line":155,"loc":{"start":{"line":155,"column":19},"end":{"line":157,"column":7}},"locations":[{"start":{"line":155,"column":19},"end":{"line":157,"column":7}}]},"23":{"type":"branch","line":157,"loc":{"start":{"line":157,"column":7},"end":{"line":159,"column":7}},"locations":[{"start":{"line":157,"column":7},"end":{"line":159,"column":7}}]},"24":{"type":"branch","line":157,"loc":{"start":{"line":157,"column":26},"end":{"line":159,"column":7}},"locations":[{"start":{"line":157,"column":26},"end":{"line":159,"column":7}}]},"25":{"type":"branch","line":161,"loc":{"start":{"line":161,"column":-1},"end":{"line":163,"column":2}},"locations":[{"start":{"line":161,"column":-1},"end":{"line":163,"column":2}}]},"26":{"type":"branch","line":185,"loc":{"start":{"line":185,"column":2},"end":{"line":187,"column":3}},"locations":[{"start":{"line":185,"column":2},"end":{"line":187,"column":3}}]},"27":{"type":"branch","line":199,"loc":{"start":{"line":199,"column":2},"end":{"line":202,"column":3}},"locations":[{"start":{"line":199,"column":2},"end":{"line":202,"column":3}}]},"28":{"type":"branch","line":215,"loc":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"locations":[{"start":{"line":215,"column":2},"end":{"line":217,"column":3}}]},"29":{"type":"branch","line":230,"loc":{"start":{"line":230,"column":2},"end":{"line":232,"column":3}},"locations":[{"start":{"line":230,"column":2},"end":{"line":232,"column":3}}]},"30":{"type":"branch","line":245,"loc":{"start":{"line":245,"column":2},"end":{"line":247,"column":3}},"locations":[{"start":{"line":245,"column":2},"end":{"line":247,"column":3}}]},"31":{"type":"branch","line":261,"loc":{"start":{"line":261,"column":2},"end":{"line":263,"column":3}},"locations":[{"start":{"line":261,"column":2},"end":{"line":263,"column":3}}]},"32":{"type":"branch","line":276,"loc":{"start":{"line":276,"column":2},"end":{"line":283,"column":3}},"locations":[{"start":{"line":276,"column":2},"end":{"line":283,"column":3}}]},"33":{"type":"branch","line":278,"loc":{"start":{"line":278,"column":31},"end":{"line":280,"column":5}},"locations":[{"start":{"line":278,"column":31},"end":{"line":280,"column":5}}]},"34":{"type":"branch","line":296,"loc":{"start":{"line":296,"column":2},"end":{"line":303,"column":3}},"locations":[{"start":{"line":296,"column":2},"end":{"line":303,"column":3}}]},"35":{"type":"branch","line":298,"loc":{"start":{"line":298,"column":27},"end":{"line":300,"column":5}},"locations":[{"start":{"line":298,"column":27},"end":{"line":300,"column":5}}]},"36":{"type":"branch","line":301,"loc":{"start":{"line":301,"column":-1},"end":{"line":303,"column":2}},"locations":[{"start":{"line":301,"column":-1},"end":{"line":303,"column":2}}]},"37":{"type":"branch","line":317,"loc":{"start":{"line":317,"column":2},"end":{"line":325,"column":3}},"locations":[{"start":{"line":317,"column":2},"end":{"line":325,"column":3}}]},"38":{"type":"branch","line":318,"loc":{"start":{"line":318,"column":38},"end":{"line":320,"column":5}},"locations":[{"start":{"line":318,"column":38},"end":{"line":320,"column":5}}]},"39":{"type":"branch","line":320,"loc":{"start":{"line":320,"column":5},"end":{"line":325,"column":2}},"locations":[{"start":{"line":320,"column":5},"end":{"line":325,"column":2}}]},"40":{"type":"branch","line":320,"loc":{"start":{"line":320,"column":44},"end":{"line":322,"column":5}},"locations":[{"start":{"line":320,"column":44},"end":{"line":322,"column":5}}]},"41":{"type":"branch","line":339,"loc":{"start":{"line":339,"column":2},"end":{"line":345,"column":3}},"locations":[{"start":{"line":339,"column":2},"end":{"line":345,"column":3}}]},"42":{"type":"branch","line":340,"loc":{"start":{"line":340,"column":46},"end":{"line":342,"column":5}},"locations":[{"start":{"line":340,"column":46},"end":{"line":342,"column":5}}]},"43":{"type":"branch","line":343,"loc":{"start":{"line":343,"column":-1},"end":{"line":345,"column":2}},"locations":[{"start":{"line":343,"column":-1},"end":{"line":345,"column":2}}]},"44":{"type":"branch","line":359,"loc":{"start":{"line":359,"column":2},"end":{"line":365,"column":3}},"locations":[{"start":{"line":359,"column":2},"end":{"line":365,"column":3}}]},"45":{"type":"branch","line":360,"loc":{"start":{"line":360,"column":46},"end":{"line":362,"column":5}},"locations":[{"start":{"line":360,"column":46},"end":{"line":362,"column":5}}]},"46":{"type":"branch","line":383,"loc":{"start":{"line":383,"column":2},"end":{"line":385,"column":3}},"locations":[{"start":{"line":383,"column":2},"end":{"line":385,"column":3}}]},"47":{"type":"branch","line":384,"loc":{"start":{"line":384,"column":73},"end":{"line":384,"column":96}},"locations":[{"start":{"line":384,"column":73},"end":{"line":384,"column":96}}]},"48":{"type":"branch","line":394,"loc":{"start":{"line":394,"column":0},"end":{"line":400,"column":1}},"locations":[{"start":{"line":394,"column":0},"end":{"line":400,"column":1}}]},"49":{"type":"branch","line":396,"loc":{"start":{"line":396,"column":24},"end":{"line":398,"column":3}},"locations":[{"start":{"line":396,"column":24},"end":{"line":398,"column":3}}]},"50":{"type":"branch","line":399,"loc":{"start":{"line":399,"column":-1},"end":{"line":400,"column":0}},"locations":[{"start":{"line":399,"column":-1},"end":{"line":400,"column":0}}]},"51":{"type":"branch","line":408,"loc":{"start":{"line":408,"column":0},"end":{"line":411,"column":1}},"locations":[{"start":{"line":408,"column":0},"end":{"line":411,"column":1}}]},"52":{"type":"branch","line":420,"loc":{"start":{"line":420,"column":0},"end":{"line":422,"column":1}},"locations":[{"start":{"line":420,"column":0},"end":{"line":422,"column":1}}]}},"b":{"0":[1],"1":[5547],"2":[5544],"3":[3],"4":[0],"5":[5528],"6":[5528],"7":[0],"8":[6973],"9":[3],"10":[56],"11":[4],"12":[100],"13":[5528],"14":[3],"15":[156],"16":[5519],"17":[14],"18":[14],"19":[27],"20":[3],"21":[24],"22":[4],"23":[20],"24":[4],"25":[3],"26":[53],"27":[36],"28":[136],"29":[26],"30":[10],"31":[10],"32":[12],"33":[5],"34":[35],"35":[15],"36":[20],"37":[21],"38":[2],"39":[19],"40":[0],"41":[8],"42":[2],"43":[6],"44":[6],"45":[0],"46":[4],"47":[3],"48":[26],"49":[14],"50":[12],"51":[10],"52":[4]},"fnMap":{"0":{"name":"Key","decl":{"start":{"line":33,"column":2},"end":{"line":53,"column":3}},"loc":{"start":{"line":33,"column":2},"end":{"line":53,"column":3}},"line":33},"1":{"name":"toString","decl":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"loc":{"start":{"line":61,"column":2},"end":{"line":63,"column":3}},"line":61},"2":{"name":"uint8Array","decl":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"loc":{"start":{"line":70,"column":2},"end":{"line":72,"column":3}},"line":70},"3":{"name":"withNamespaces","decl":{"start":{"line":95,"column":9},"end":{"line":97,"column":3}},"loc":{"start":{"line":95,"column":9},"end":{"line":97,"column":3}},"line":95},"4":{"name":"random","decl":{"start":{"line":110,"column":9},"end":{"line":112,"column":3}},"loc":{"start":{"line":110,"column":9},"end":{"line":112,"column":3}},"line":110},"5":{"name":"clean","decl":{"start":{"line":119,"column":2},"end":{"line":135,"column":3}},"loc":{"start":{"line":119,"column":2},"end":{"line":135,"column":3}},"line":119},"6":{"name":"less","decl":{"start":{"line":143,"column":2},"end":{"line":163,"column":3}},"loc":{"start":{"line":143,"column":2},"end":{"line":163,"column":3}},"line":143},"7":{"name":"reverse","decl":{"start":{"line":176,"column":2},"end":{"line":178,"column":3}},"loc":{"start":{"line":176,"column":2},"end":{"line":178,"column":3}},"line":176},"8":{"name":"namespaces","decl":{"start":{"line":185,"column":2},"end":{"line":187,"column":3}},"loc":{"start":{"line":185,"column":2},"end":{"line":187,"column":3}},"line":185},"9":{"name":"baseNamespace","decl":{"start":{"line":199,"column":2},"end":{"line":202,"column":3}},"loc":{"start":{"line":199,"column":2},"end":{"line":202,"column":3}},"line":199},"10":{"name":"list","decl":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"loc":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"line":215},"11":{"name":"type","decl":{"start":{"line":230,"column":2},"end":{"line":232,"column":3}},"loc":{"start":{"line":230,"column":2},"end":{"line":232,"column":3}},"line":230},"12":{"name":"name","decl":{"start":{"line":245,"column":2},"end":{"line":247,"column":3}},"loc":{"start":{"line":245,"column":2},"end":{"line":247,"column":3}},"line":245},"13":{"name":"instance","decl":{"start":{"line":261,"column":2},"end":{"line":263,"column":3}},"loc":{"start":{"line":261,"column":2},"end":{"line":263,"column":3}},"line":261},"14":{"name":"path","decl":{"start":{"line":276,"column":2},"end":{"line":283,"column":3}},"loc":{"start":{"line":276,"column":2},"end":{"line":283,"column":3}},"line":276},"15":{"name":"parent","decl":{"start":{"line":296,"column":2},"end":{"line":303,"column":3}},"loc":{"start":{"line":296,"column":2},"end":{"line":303,"column":3}},"line":296},"16":{"name":"child","decl":{"start":{"line":317,"column":2},"end":{"line":325,"column":3}},"loc":{"start":{"line":317,"column":2},"end":{"line":325,"column":3}},"line":317},"17":{"name":"isAncestorOf","decl":{"start":{"line":339,"column":2},"end":{"line":345,"column":3}},"loc":{"start":{"line":339,"column":2},"end":{"line":345,"column":3}},"line":339},"18":{"name":"isDecendantOf","decl":{"start":{"line":359,"column":2},"end":{"line":365,"column":3}},"loc":{"start":{"line":359,"column":2},"end":{"line":365,"column":3}},"line":359},"19":{"name":"isTopLevel","decl":{"start":{"line":373,"column":2},"end":{"line":375,"column":3}},"loc":{"start":{"line":373,"column":2},"end":{"line":375,"column":3}},"line":373},"20":{"name":"concat","decl":{"start":{"line":383,"column":2},"end":{"line":385,"column":3}},"loc":{"start":{"line":383,"column":2},"end":{"line":385,"column":3}},"line":383},"21":{"name":"namespaceType","decl":{"start":{"line":394,"column":0},"end":{"line":400,"column":1}},"loc":{"start":{"line":394,"column":0},"end":{"line":400,"column":1}},"line":394},"22":{"name":"namespaceValue","decl":{"start":{"line":408,"column":0},"end":{"line":411,"column":1}},"loc":{"start":{"line":408,"column":0},"end":{"line":411,"column":1}},"line":408},"23":{"name":"flatten","decl":{"start":{"line":420,"column":0},"end":{"line":422,"column":1}},"loc":{"start":{"line":420,"column":0},"end":{"line":422,"column":1}},"line":420}},"f":{"0":5547,"1":6973,"2":3,"3":4,"4":100,"5":5528,"6":14,"7":0,"8":53,"9":36,"10":136,"11":26,"12":10,"13":10,"14":12,"15":35,"16":21,"17":8,"18":6,"19":0,"20":4,"21":26,"22":10,"23":4}} -,"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/memory.js": {"path":"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/memory.js","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":28}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":36}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":34}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":0}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":3}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":41}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":51}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":55}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":3}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":0}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":3}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":25}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":26}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":3}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":39}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":18}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":11}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":0}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":45}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":18}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":3}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":0}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":11}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":28}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":3}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":0}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":12}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":28}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":3}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":0}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":5}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":21}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":28}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":5}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":61}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":35}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":3}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":0}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":5}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":21}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":5}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":19}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":38}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":45}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":36}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":3}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":0}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":5}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":21}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":5}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":56}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":50}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":3}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":0}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":5}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":21}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":5}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":59}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":36}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":3}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":0}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":19}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":37}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":60}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":3}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":0}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":23}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":37}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":35}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":3}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":1}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":0}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":32}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":15,"19":15,"20":15,"21":15,"22":15,"23":1,"24":1,"25":16,"26":16,"27":1,"28":1,"29":17,"30":17,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1618,"38":1618,"39":1,"40":1,"41":1,"42":1,"43":1,"44":205,"45":205,"46":203,"47":205,"48":1,"49":1,"50":1,"51":1,"52":1,"53":614,"54":614,"55":1,"56":1,"57":1,"58":1,"59":1,"60":204,"61":204,"62":1,"63":1,"64":14,"65":14,"66":14,"67":1,"68":1,"69":11,"70":11,"71":11,"72":1,"73":1,"74":1},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":75,"column":32}},"locations":[{"start":{"line":1,"column":0},"end":{"line":75,"column":32}}]},"1":{"type":"branch","line":18,"loc":{"start":{"line":18,"column":2},"end":{"line":23,"column":3}},"locations":[{"start":{"line":18,"column":2},"end":{"line":23,"column":3}}]},"2":{"type":"branch","line":25,"loc":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"locations":[{"start":{"line":25,"column":2},"end":{"line":27,"column":3}}]},"3":{"type":"branch","line":29,"loc":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"locations":[{"start":{"line":29,"column":2},"end":{"line":31,"column":3}}]},"4":{"type":"branch","line":37,"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"locations":[{"start":{"line":37,"column":2},"end":{"line":39,"column":3}}]},"5":{"type":"branch","line":44,"loc":{"start":{"line":44,"column":2},"end":{"line":48,"column":3}},"locations":[{"start":{"line":44,"column":2},"end":{"line":48,"column":3}}]},"6":{"type":"branch","line":46,"loc":{"start":{"line":46,"column":17},"end":{"line":46,"column":45}},"locations":[{"start":{"line":46,"column":17},"end":{"line":46,"column":45}}]},"7":{"type":"branch","line":47,"loc":{"start":{"line":47,"column":-1},"end":{"line":48,"column":2}},"locations":[{"start":{"line":47,"column":-1},"end":{"line":48,"column":2}}]},"8":{"type":"branch","line":53,"loc":{"start":{"line":53,"column":2},"end":{"line":55,"column":3}},"locations":[{"start":{"line":53,"column":2},"end":{"line":55,"column":3}}]},"9":{"type":"branch","line":60,"loc":{"start":{"line":60,"column":2},"end":{"line":62,"column":3}},"locations":[{"start":{"line":60,"column":2},"end":{"line":62,"column":3}}]},"10":{"type":"branch","line":64,"loc":{"start":{"line":64,"column":2},"end":{"line":67,"column":3}},"locations":[{"start":{"line":64,"column":2},"end":{"line":67,"column":3}}]},"11":{"type":"branch","line":67,"loc":{"start":{"line":67,"column":-1},"end":{"line":67,"column":2}},"locations":[{"start":{"line":67,"column":-1},"end":{"line":67,"column":2}}]},"12":{"type":"branch","line":66,"loc":{"start":{"line":66,"column":11},"end":{"line":66,"column":59}},"locations":[{"start":{"line":66,"column":11},"end":{"line":66,"column":59}}]},"13":{"type":"branch","line":69,"loc":{"start":{"line":69,"column":2},"end":{"line":72,"column":3}},"locations":[{"start":{"line":69,"column":2},"end":{"line":72,"column":3}}]},"14":{"type":"branch","line":72,"loc":{"start":{"line":72,"column":-1},"end":{"line":72,"column":2}},"locations":[{"start":{"line":72,"column":-1},"end":{"line":72,"column":2}}]},"15":{"type":"branch","line":71,"loc":{"start":{"line":71,"column":11},"end":{"line":71,"column":34}},"locations":[{"start":{"line":71,"column":11},"end":{"line":71,"column":34}}]}},"b":{"0":[1],"1":[15],"2":[16],"3":[17],"4":[1618],"5":[205],"6":[2],"7":[203],"8":[614],"9":[204],"10":[14],"11":[13],"12":[3634],"13":[11],"14":[10],"15":[34]},"fnMap":{"0":{"name":"MemoryDatastore","decl":{"start":{"line":18,"column":2},"end":{"line":23,"column":3}},"loc":{"start":{"line":18,"column":2},"end":{"line":23,"column":3}},"line":18},"1":{"name":"open","decl":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"loc":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"line":25},"2":{"name":"close","decl":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"loc":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"line":29},"3":{"name":"put","decl":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"line":37},"4":{"name":"get","decl":{"start":{"line":44,"column":2},"end":{"line":48,"column":3}},"loc":{"start":{"line":44,"column":2},"end":{"line":48,"column":3}},"line":44},"5":{"name":"has","decl":{"start":{"line":53,"column":2},"end":{"line":55,"column":3}},"loc":{"start":{"line":53,"column":2},"end":{"line":55,"column":3}},"line":53},"6":{"name":"delete","decl":{"start":{"line":60,"column":2},"end":{"line":62,"column":3}},"loc":{"start":{"line":60,"column":2},"end":{"line":62,"column":3}},"line":60},"7":{"name":"_all","decl":{"start":{"line":64,"column":2},"end":{"line":67,"column":3}},"loc":{"start":{"line":64,"column":2},"end":{"line":67,"column":3}},"line":64},"8":{"name":"_allKeys","decl":{"start":{"line":69,"column":2},"end":{"line":72,"column":3}},"loc":{"start":{"line":69,"column":2},"end":{"line":72,"column":3}},"line":69}},"f":{"0":15,"1":16,"2":17,"3":1618,"4":205,"5":614,"6":204,"7":14,"8":11}} -,"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/utils.js": {"path":"/Users/alex/Documents/Workspaces/ipfs/js-ipfs-interfaces/packages/interface-datastore/src/utils.js","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":50}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":29}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":0}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":3}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":59}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":29}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":2}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":14}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":51}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":45}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":30}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":3}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":39}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":31}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":38}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":31}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":6}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":1}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":0}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":3}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":20}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":20}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":3}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":36}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":37}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":31}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":1}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":0}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":18}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":10}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":18}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":18}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":6,"16":6,"17":6,"18":6,"19":6,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":2,"27":2,"28":2,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":0},"end":{"line":35,"column":1}},"locations":[{"start":{"line":1,"column":0},"end":{"line":35,"column":1}}]},"1":{"type":"branch","line":15,"loc":{"start":{"line":15,"column":16},"end":{"line":20,"column":1}},"locations":[{"start":{"line":15,"column":16},"end":{"line":20,"column":1}}]},"2":{"type":"branch","line":16,"loc":{"start":{"line":16,"column":10},"end":{"line":19,"column":3}},"locations":[{"start":{"line":16,"column":10},"end":{"line":19,"column":3}}]},"3":{"type":"branch","line":19,"loc":{"start":{"line":19,"column":-1},"end":{"line":19,"column":2}},"locations":[{"start":{"line":19,"column":-1},"end":{"line":19,"column":2}}]},"4":{"type":"branch","line":26,"loc":{"start":{"line":26,"column":25},"end":{"line":29,"column":1}},"locations":[{"start":{"line":26,"column":25},"end":{"line":29,"column":1}}]}},"b":{"0":[1],"1":[6],"2":[6],"3":[5],"4":[2]},"fnMap":{"0":{"name":"sortAll","decl":{"start":{"line":15,"column":16},"end":{"line":20,"column":1}},"loc":{"start":{"line":15,"column":16},"end":{"line":20,"column":1}},"line":15},"1":{"name":"replaceStartWith","decl":{"start":{"line":26,"column":25},"end":{"line":29,"column":1}},"loc":{"start":{"line":26,"column":25},"end":{"line":29,"column":1}},"line":26}},"f":{"0":6,"1":2}} -} diff --git a/packages/interface-datastore/README.md b/packages/interface-datastore/README.md index c9bb7d13..815f86be 100644 --- a/packages/interface-datastore/README.md +++ b/packages/interface-datastore/README.md @@ -43,9 +43,9 @@ If you want the same functionality as [go-ds-flatfs](https://github.com/ipfs/go-ds-flatfs), use sharding with fs. ```js -const FsStore = require('datastore-fs') -const ShardingStore = require('datastore-core').ShardingDatatstore -const NextToLast = require('datastore-core').shard.NextToLast +const FsStore from 'datastore-fs') +const ShardingStore from 'datastore-core').ShardingDatatstore +const NextToLast from 'datastore-core').shard.NextToLast const fs = new FsStore('path/to/store') @@ -58,7 +58,7 @@ const flatfs = await ShardingStore.createOrOpen(fs, new NextToLast(2)) An adapter is made available to make implementing your own datastore easier: ```javascript -const { Adapter } = require('interface-datastore') +const { Adapter } from 'interface-datastore') class MyDatastore extends Adapter { constructor () { @@ -90,9 +90,9 @@ $ npm install interface-datastore ### Wrapping Stores ```js -const MemoryStore = require('interface-datastore').MemoryDatastore -const MountStore = require('datastore-core').MountDatastore -const Key = require('interface-datastore').Key +const MemoryStore from 'interface-datastore').MemoryDatastore +const MountStore from 'datastore-core').MountDatastore +const Key from 'interface-datastore').Key const store = new MountStore({ prefix: new Key('/a'), datastore: new MemoryStore() }) ``` @@ -123,7 +123,7 @@ Most API methods accept an [AbortSignal][] as part of an options object. Implem The streaming `(put|get|delete)Many` methods are intended to be used with modules such as [it-parallel-batch](https://www.npmjs.com/package/it-parallel-batch) to allow calling code to control levels of parallelisation. The batching method ensures results are returned in the correct order, but interface implementations should be thread safe. ```js -const batch = require('it-parallel-batch') +const batch from 'it-parallel-batch') const source = [{ key: .., value: .. diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index 2ac2db69..36f2e3b3 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -3,8 +3,16 @@ "version": "5.1.3", "description": "datastore interface", "leadMaintainer": "Alex Potsides ", - "main": "src/index.js", - "types": "dist/src/index.d.ts", + "types": "types/src/index.d.ts", + "type": "module", + "exports": { + ".": { + "import": "./src/index.js" + }, + "./key": { + "import": "./src/key.js" + } + }, "files": [ "src", "dist" @@ -12,9 +20,8 @@ "scripts": { "build": "aegir build", "lint": "aegir ts -p check && aegir lint", - "test": "aegir test", "coverage": "aegir test --cov", - "dep-check": "aegir dep-check -i interface-datastore-tests" + "dep-check": "aegir dep-check" }, "repository": { "type": "git", @@ -32,23 +39,18 @@ }, "homepage": "https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-datastore#readme", "devDependencies": { - "aegir": "^35.0.0", - "it-map": "^1.0.5", - "util": "^0.12.4" + "aegir": "^35.0.0" }, "dependencies": { - "err-code": "^3.0.1", "interface-store": "^1.0.2", - "ipfs-utils": "^8.1.2", - "it-all": "^1.0.2", - "it-drain": "^1.0.1", - "it-filter": "^1.0.2", - "it-take": "^1.0.1", "nanoid": "^3.0.2", "uint8arrays": "^3.0.0" }, "eslintConfig": { - "extends": "ipfs" + "extends": "ipfs", + "parserOptions": { + "sourceType": "module" + } }, "contributors": [ "achingbrain ", @@ -67,5 +69,8 @@ "Erin Dachtler ", "tcme ", "Adam Uhlir " - ] + ], + "publishConfig": { + "directory": "dist" + } } diff --git a/packages/interface-datastore/src/adapter.js b/packages/interface-datastore/src/adapter.js deleted file mode 100644 index 52802f76..00000000 --- a/packages/interface-datastore/src/adapter.js +++ /dev/null @@ -1,230 +0,0 @@ -'use strict' - -const { sortAll } = require('./utils') -const drain = require('it-drain') -const filter = require('it-filter') -const take = require('it-take') - -/** - * @typedef {import('interface-store').Options} Options - * @typedef {import('./key')} Key - * @typedef {import('./types').Pair} Pair - * @typedef {import('./types').Datastore} Datastore - * @typedef {import('./types').Query} Query - * @typedef {import('./types').KeyQuery} KeyQuery - * @typedef {import('./types').Batch} Batch - */ - -/** - * @template O - * @typedef {import('interface-store').AwaitIterable} AwaitIterable - */ - -/** - * @implements {Datastore} - */ -class Adapter { - /** - * @returns {Promise} - */ - open () { - return Promise.reject(new Error('.open is not implemented')) - } - - /** - * @returns {Promise} - */ - close () { - return Promise.reject(new Error('.close is not implemented')) - } - - /** - * @param {Key} key - * @param {Uint8Array} val - * @param {Options} [options] - * @returns {Promise} - */ - put (key, val, options) { - return Promise.reject(new Error('.put is not implemented')) - } - - /** - * @param {Key} key - * @param {Options} [options] - * @returns {Promise} - */ - get (key, options) { - return Promise.reject(new Error('.get is not implemented')) - } - - /** - * @param {Key} key - * @param {Options} [options] - * @returns {Promise} - */ - has (key, options) { - return Promise.reject(new Error('.has is not implemented')) - } - - /** - * @param {Key} key - * @param {Options} [options] - * @returns {Promise} - */ - delete (key, options) { - return Promise.reject(new Error('.delete is not implemented')) - } - - /** - * @param {AwaitIterable} source - * @param {Options} [options] - * @returns {AsyncIterable} - */ - async * putMany (source, options = {}) { - for await (const { key, value } of source) { - await this.put(key, value, options) - yield { key, value } - } - } - - /** - * @param {AwaitIterable} source - * @param {Options} [options] - * @returns {AsyncIterable} - */ - async * getMany (source, options = {}) { - for await (const key of source) { - yield this.get(key, options) - } - } - - /** - * @param {AwaitIterable} source - * @param {Options} [options] - * @returns {AsyncIterable} - */ - async * deleteMany (source, options = {}) { - for await (const key of source) { - await this.delete(key, options) - yield key - } - } - - /** - * @returns {Batch} - */ - batch () { - /** @type {Pair[]} */ - let puts = [] - /** @type {Key[]} */ - let dels = [] - - return { - put (key, value) { - puts.push({ key, value }) - }, - - delete (key) { - dels.push(key) - }, - commit: async (options) => { - await drain(this.putMany(puts, options)) - puts = [] - await drain(this.deleteMany(dels, options)) - dels = [] - } - } - } - - /** - * Extending classes should override `query` or implement this method - * - * @param {Query} q - * @param {Options} [options] - * @returns {AsyncIterable} - */ - // eslint-disable-next-line require-yield - async * _all (q, options) { - throw new Error('._all is not implemented') - } - - /** - * Extending classes should override `queryKeys` or implement this method - * - * @param {KeyQuery} q - * @param {Options} [options] - * @returns {AsyncIterable} - */ - // eslint-disable-next-line require-yield - async * _allKeys (q, options) { - throw new Error('._allKeys is not implemented') - } - - /** - * @param {Query} q - * @param {Options} [options] - */ - query (q, options) { - let it = this._all(q, options) - - if (q.prefix != null) { - it = filter(it, (e) => - e.key.toString().startsWith(/** @type {string} */ (q.prefix)) - ) - } - - if (Array.isArray(q.filters)) { - it = q.filters.reduce((it, f) => filter(it, f), it) - } - - if (Array.isArray(q.orders)) { - it = q.orders.reduce((it, f) => sortAll(it, f), it) - } - - if (q.offset != null) { - let i = 0 - it = filter(it, () => i++ >= /** @type {number} */ (q.offset)) - } - - if (q.limit != null) { - it = take(it, q.limit) - } - - return it - } - - /** - * @param {KeyQuery} q - * @param {Options} [options] - */ - queryKeys (q, options) { - let it = this._allKeys(q, options) - - if (q.prefix != null) { - it = filter(it, (key) => - key.toString().startsWith(/** @type {string} */ (q.prefix)) - ) - } - - if (Array.isArray(q.filters)) { - it = q.filters.reduce((it, f) => filter(it, f), it) - } - - if (Array.isArray(q.orders)) { - it = q.orders.reduce((it, f) => sortAll(it, f), it) - } - - if (q.offset != null) { - let i = 0 - it = filter(it, () => i++ >= /** @type {number} */ (q.offset)) - } - - if (q.limit != null) { - it = take(it, q.limit) - } - - return it - } -} - -module.exports = Adapter diff --git a/packages/interface-datastore/src/errors.js b/packages/interface-datastore/src/errors.js deleted file mode 100644 index c1285874..00000000 --- a/packages/interface-datastore/src/errors.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' - -const errCode = require('err-code') - -/** - * @param {Error} [err] - */ -function dbOpenFailedError (err) { - err = err || new Error('Cannot open database') - return errCode(err, 'ERR_DB_OPEN_FAILED') -} - -/** - * @param {Error} [err] - */ -function dbDeleteFailedError (err) { - err = err || new Error('Delete failed') - return errCode(err, 'ERR_DB_DELETE_FAILED') -} - -/** - * @param {Error} [err] - */ -function dbWriteFailedError (err) { - err = err || new Error('Write failed') - return errCode(err, 'ERR_DB_WRITE_FAILED') -} - -/** - * @param {Error} [err] - */ -function notFoundError (err) { - err = err || new Error('Not Found') - return errCode(err, 'ERR_NOT_FOUND') -} - -/** - * @param {Error} [err] - */ -function abortedError (err) { - err = err || new Error('Aborted') - return errCode(err, 'ERR_ABORTED') -} - -module.exports = { - dbOpenFailedError, - dbDeleteFailedError, - dbWriteFailedError, - notFoundError, - abortedError -} diff --git a/packages/interface-datastore/src/index.js b/packages/interface-datastore/src/index.js index 3375ed14..02ce9820 100644 --- a/packages/interface-datastore/src/index.js +++ b/packages/interface-datastore/src/index.js @@ -1,28 +1,2 @@ -'use strict' -/** - * @typedef {import('./types').Datastore} Datastore - * @typedef {import('./types').Batch} Batch - * @typedef {import('interface-store').Options} Options - * @typedef {import('./types').Query} Query - * @typedef {import('./types').QueryFilter} QueryFilter - * @typedef {import('./types').QueryOrder} QueryOrder - * @typedef {import('./types').KeyQuery} KeyQuery - * @typedef {import('./types').KeyQueryFilter} KeyQueryFilter - * @typedef {import('./types').KeyQueryOrder} KeyQueryOrder - * @typedef {import('./types').Pair} Pair - */ - -const Key = require('./key') -const MemoryDatastore = require('./memory') -const utils = require('./utils') -const Errors = require('./errors') -const Adapter = require('./adapter') - -module.exports = { - Key, - MemoryDatastore, - utils, - Errors, - Adapter -} +export { Key } from './key' diff --git a/packages/interface-datastore/src/types.ts b/packages/interface-datastore/src/index.ts similarity index 94% rename from packages/interface-datastore/src/types.ts rename to packages/interface-datastore/src/index.ts index 5257cfed..ffd4ad19 100644 --- a/packages/interface-datastore/src/types.ts +++ b/packages/interface-datastore/src/index.ts @@ -10,7 +10,7 @@ import type { Options as StoreOptions, Store } from 'interface-store' -import type Key from './key' +import type { Key } from './key' export interface Options extends StoreOptions{ @@ -51,3 +51,5 @@ export interface KeyQueryOrder extends StoreKeyQueryOrder { export interface KeyQuery extends StoreKeyQuery { } + +export { Key } from './key' diff --git a/packages/interface-datastore/src/key.js b/packages/interface-datastore/src/key.js index 7034d64d..cae03f42 100644 --- a/packages/interface-datastore/src/key.js +++ b/packages/interface-datastore/src/key.js @@ -1,9 +1,7 @@ -'use strict' -const { nanoid } = require('nanoid') - -const { toString: uint8ArrayToString } = require('uint8arrays/to-string') -const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string') +import { nanoid } from 'nanoid' +import { toString as uint8ArrayToString } from 'uint8arrays/to-string' +import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' const pathSepS = '/' const pathSepB = new TextEncoder().encode(pathSepS) @@ -25,7 +23,7 @@ const pathSep = pathSepB[0] * - `new Key('/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender')` * */ -class Key { +export class Key { /** * @param {string | Uint8Array} s * @param {boolean} [clean] @@ -420,5 +418,3 @@ function namespaceValue (ns) { function flatten (arr) { return /** @type {T[]} */([]).concat(...arr) } - -module.exports = Key diff --git a/packages/interface-datastore/src/memory.js b/packages/interface-datastore/src/memory.js deleted file mode 100644 index 15602017..00000000 --- a/packages/interface-datastore/src/memory.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict' - -const Key = require('./key') -const Adapter = require('./adapter') -const Errors = require('./errors') - -/** - * @typedef {import('./types').Pair} Pair - * @typedef {import('./types').Datastore} Datastore - * @typedef {import('interface-store').Options} Options - */ - -/** - * @class MemoryDatastore - * @implements {Datastore} - */ -class MemoryDatastore extends Adapter { - constructor () { - super() - - /** @type {Record} */ - this.data = {} - } - - open () { - return Promise.resolve() - } - - close () { - return Promise.resolve() - } - - /** - * @param {Key} key - * @param {Uint8Array} val - */ - async put (key, val) { // eslint-disable-line require-await - this.data[key.toString()] = val - } - - /** - * @param {Key} key - */ - async get (key) { - const exists = await this.has(key) - if (!exists) throw Errors.notFoundError() - return this.data[key.toString()] - } - - /** - * @param {Key} key - */ - async has (key) { // eslint-disable-line require-await - return this.data[key.toString()] !== undefined - } - - /** - * @param {Key} key - */ - async delete (key) { // eslint-disable-line require-await - delete this.data[key.toString()] - } - - async * _all () { - yield * Object.entries(this.data) - .map(([key, value]) => ({ key: new Key(key), value })) - } - - async * _allKeys () { - yield * Object.entries(this.data) - .map(([key]) => new Key(key)) - } -} - -module.exports = MemoryDatastore diff --git a/packages/interface-datastore/src/utils.js b/packages/interface-datastore/src/utils.js deleted file mode 100644 index 4253a35e..00000000 --- a/packages/interface-datastore/src/utils.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' - -const tempdir = require('ipfs-utils/src/temp-dir') -const all = require('it-all') - -/** - * Collect all values from the iterable and sort them using - * the passed sorter function - * - * @template T - * @param {AsyncIterable | Iterable} iterable - * @param {(a: T, b: T) => -1 | 0 | 1} sorter - * @returns {AsyncIterable} - */ -const sortAll = (iterable, sorter) => { - return (async function * () { - const values = await all(iterable) - yield * values.sort(sorter) - })() -} - -/** - * @param {string} s - * @param {string} r - */ -const replaceStartWith = (s, r) => { - const matcher = new RegExp('^' + r) - return s.replace(matcher, '') -} - -module.exports = { - sortAll, - tmpdir: tempdir, - replaceStartWith -} diff --git a/packages/interface-datastore/test/key.spec.js b/packages/interface-datastore/test/key.spec.js deleted file mode 100644 index 59d78fe5..00000000 --- a/packages/interface-datastore/test/key.spec.js +++ /dev/null @@ -1,209 +0,0 @@ -/* eslint-env mocha */ -'use strict' - -const { expect } = require('aegir/utils/chai') -const Key = require('../src').Key - -const pathSep = '/' - -describe('Key', () => { - /** - * @param {string} s - */ - const clean = (s) => { - let fixed = s - if (fixed.startsWith(pathSep + pathSep)) { - fixed = fixed.slice(1) - } - if (fixed.length > 1 && fixed.endsWith(pathSep)) { - fixed = fixed.slice(0, -1) - } - - return fixed - } - - describe('basic', () => { - /** - * @param {string} s - */ - const validKey = (s) => it(s, () => { - const fixed = clean(pathSep + s) - const namespaces = fixed.split(pathSep).slice(1) - const lastNamespace = namespaces[namespaces.length - 1] - const lnparts = lastNamespace.split(':') - let ktype = '' - if (lnparts.length > 1) { - ktype = lnparts.slice(0, -1).join(':') - } - const kname = lnparts[lnparts.length - 1] - const kchild = clean(fixed + '/cchildd') - const kparent = pathSep + namespaces.slice(0, -1).join(pathSep) - const kpath = clean(kparent + pathSep + ktype) - const kinstance = fixed + ':inst' - - const k = new Key(s) - expect(k.toString()).to.eql(fixed) - expect(k).to.eql(new Key(s)) - expect(k.toString()).to.eql(new Key(s).toString()) - expect(k.name()).to.eql(kname) - expect(k.type()).to.eql(ktype) - expect(k.path().toString()).to.eql(kpath) - expect(k.instance('inst').toString()).to.eql(kinstance) - - const child = new Key('cchildd') - expect(k.child(child).toString()).to.eql(kchild) - expect(k.child(child).parent().toString()).to.eql(fixed) - expect(k.parent().toString()).to.eql(kparent) - expect(k.list()).to.have.length(namespaces.length) - expect(k.namespaces()).to.have.length(namespaces.length) - k.list().forEach((e, i) => { - expect(namespaces[i]).to.eql(e) - }) - }) - - validKey('') - validKey('abcde') - validKey('disahfidsalfhduisaufidsail') - validKey('/fdisahfodisa/fdsa/fdsafdsafdsafdsa/fdsafdsa/') - validKey('4215432143214321432143214321') - validKey('a/b/c/d/') - validKey('abcde:fdsfd') - validKey('disahfidsalfhduisaufidsail:fdsa') - validKey('/fdisahfodisa/fdsa/fdsafdsafdsafdsa/fdsafdsa/:') - validKey('4215432143214321432143214321:') - }) - - it('ancestry', () => { - const k1 = new Key('/A/B/C') - const k2 = new Key('/A/B/C/D') - - expect(k1.toString()).to.be.eql('/A/B/C') - expect(k2.toString()).to.be.eql('/A/B/C/D') - - const checks = [ - k1.isAncestorOf(k2), - k2.isDecendantOf(k1), - new Key('/A').isAncestorOf(k2), - new Key('/A').isAncestorOf(k1), - !new Key('/A').isDecendantOf(k2), - !new Key('/A').isDecendantOf(k1), - k2.isDecendantOf(new Key('/A')), - k1.isDecendantOf(new Key('/A')), - !k2.isAncestorOf(new Key('/A')), - !k1.isAncestorOf(new Key('/A')), - !k2.isAncestorOf(k2), - !k1.isAncestorOf(k1) - ] - - checks.forEach((check) => expect(check).to.equal(true)) - - expect(k1.child(new Key('D')).toString()).to.eql(k2.toString()) - expect(k1.toString()).to.eql(k2.parent().toString()) - expect(k1.path().toString()).to.eql(k2.parent().path().toString()) - }) - - it('type', () => { - const k1 = new Key('/A/B/C:c') - const k2 = new Key('/A/B/C:c/D:d') - - expect(k1.isAncestorOf(k2)).to.eql(true) - expect(k2.isDecendantOf(k1)).to.eql(true) - - expect(k1.type()).to.eql('C') - expect(k2.type()).to.eql('D') - expect(k1.type()).to.eql(k2.parent().type()) - }) - - it('random', () => { - /** @type {Record} */ - const keys = {} - const k = 100 - for (let i = 0; i < k; i++) { - const r = Key.random() - expect(keys).to.not.have.key(r.toString()) - keys[r.toString()] = true - } - - expect(Object.keys(keys)).to.have.length(k) - }) - - it('less', () => { - /** - * @param {string | Uint8Array} a - * @param {string | Uint8Array} b - */ - const checkLess = (a, b) => { - const ak = new Key(a) - const bk = new Key(b) - - expect(ak.less(bk)).to.eql(true) - expect(bk.less(ak)).to.eql(false) - } - - checkLess('/a/b/c', '/a/b/c/d') - checkLess('/a/b', '/a/b/c/d') - checkLess('/a', '/a/b/c/d') - checkLess('/a/a/c', '/a/b/c') - checkLess('/a/a/d', '/a/b/c') - checkLess('/a/b/c/d/e/f/g/h', '/b') - checkLess(pathSep, '/a') - }) - - it('concat', () => { - const originalKey = new Key('/a/b/c') - - const concattedKey = originalKey.concat(new Key('/d/e/f')) - expect(concattedKey.toString()).to.equal('/a/b/c/d/e/f') - - // Original key is not changed - expect(originalKey.toString()).to.equal('/a/b/c') - - const concattedMultipleKeys = originalKey.concat(new Key('/d/e'), new Key('/f/g')) - expect(concattedMultipleKeys.toString()).to.equal('/a/b/c/d/e/f/g') - - // New instance of Key is always created - expect(originalKey.concat()).to.not.equal(originalKey) - // but has the same value - expect(originalKey.concat().toString()).to.equal('/a/b/c') - }) - - it('uint8Array', () => { - const arr = Uint8Array.from(['/'.charCodeAt(0), 0, 1, 2, 3]) - const key = new Key(arr) - const buf = key.uint8Array() - - expect(buf).to.deep.equal(arr) - }) - - it('uint8Array with surplus bytes', () => { - const arr = Uint8Array.from(['/'.charCodeAt(0), 0, 1, 2, 3, 4]) - const view = new Uint8Array(arr.buffer, 0, arr.length - 1) - - // should be same buffer - expect(view.buffer).to.equal(arr.buffer) - expect(view.buffer.byteLength).to.equal(arr.buffer.byteLength) - - // view should be shorter than wrapped buffer - expect(view.length).to.be.lessThan(arr.buffer.byteLength) - expect(view.byteLength).to.be.lessThan(arr.buffer.byteLength) - - const key = new Key(view) - const buf = key.uint8Array() - - expect(buf).to.deep.equal(view) - }) - - it('uint8Array with trailing slashes', () => { - const slash = '/'.charCodeAt(0) - const arrWithSlashes = Uint8Array.from([slash, 0, 1, 2, 3, slash, slash, slash]) - const arrWithoutSlashes = Uint8Array.from([slash, 0, 1, 2, 3]) - const key = new Key(arrWithSlashes) - const buf = key.uint8Array() - - // slashes should have been stripped - expect(buf).to.deep.equal(arrWithoutSlashes) - - // should be a view on the original buffer - expect(buf.buffer).to.equal(arrWithSlashes.buffer) - }) -}) diff --git a/packages/interface-datastore/test/memory.spec.js b/packages/interface-datastore/test/memory.spec.js deleted file mode 100644 index 5a955323..00000000 --- a/packages/interface-datastore/test/memory.spec.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-env mocha */ -'use strict' - -const MemoryDatastore = require('../src').MemoryDatastore - -describe('Memory', () => { - describe('interface-datastore', () => { - require('interface-datastore-tests')({ - setup () { - return new MemoryDatastore() - }, - teardown () {} - }) - }) -}) diff --git a/packages/interface-datastore/test/utils.spec.js b/packages/interface-datastore/test/utils.spec.js deleted file mode 100644 index 696ea75e..00000000 --- a/packages/interface-datastore/test/utils.spec.js +++ /dev/null @@ -1,126 +0,0 @@ -/* eslint-env mocha */ -'use strict' - -const { expect } = require('aegir/utils/chai') -const utils = require('../src').utils -const filter = require('it-filter') -const take = require('it-take') -const map = require('it-map') - -describe('utils', () => { - it('filter - sync', async () => { - const data = [1, 2, 3, 4] - /** - * @param {number} val - */ - const filterer = val => val % 2 === 0 - const res = [] - for await (const val of filter(data, filterer)) { - res.push(val) - } - expect(res).to.be.eql([2, 4]) - }) - - it('filter - async', async () => { - const data = [1, 2, 3, 4] - /** - * @param {number} val - */ - const filterer = val => val % 2 === 0 - const res = [] - for await (const val of filter(data, filterer)) { - res.push(val) - } - expect(res).to.be.eql([2, 4]) - }) - - it('sortAll', async () => { - const data = [1, 2, 3, 4] - /** - * @param {number} a - * @param {number} b - */ - const sorter = (a, b) => { - if (a < b) { - return 1 - } - - if (a > b) { - return -1 - } - - return 0 - } - const res = [] - for await (const val of utils.sortAll(data, sorter)) { - res.push(val) - } - expect(res).to.be.eql([4, 3, 2, 1]) - }) - - it('sortAll - fail', async () => { - const data = [1, 2, 3, 4] - const sorter = () => { throw new Error('fail') } - const res = [] - - try { - for await (const val of utils.sortAll(data, sorter)) { - res.push(val) - } - } catch (err) { - expect(err.message).to.be.eql('fail') - return - } - - throw new Error('expected error to be thrown') - }) - - it('should take n values from iterator', async () => { - const data = [1, 2, 3, 4] - const n = 3 - const res = [] - for await (const val of take(data, n)) { - res.push(val) - } - expect(res).to.be.eql([1, 2, 3]) - }) - - it('should take nothing from iterator', async () => { - const data = [1, 2, 3, 4] - const n = 0 - for await (const _ of take(data, n)) { // eslint-disable-line - throw new Error('took a value') - } - }) - - it('should map iterator values', async () => { - const data = [1, 2, 3, 4] - /** - * @param {number} n - */ - const mapper = n => n * 2 - const res = [] - for await (const val of map(data, mapper)) { - res.push(val) - } - expect(res).to.be.eql([2, 4, 6, 8]) - }) - - it('replaceStartWith', () => { - expect( - utils.replaceStartWith('helloworld', 'hello') - ).to.eql( - 'world' - ) - - expect( - utils.replaceStartWith('helloworld', 'world') - ).to.eql( - 'helloworld' - ) - }) - - it('provides a temp folder', () => { - expect(utils.tmpdir()).to.not.equal('') - }) -}) diff --git a/packages/interface-datastore/tsconfig.json b/packages/interface-datastore/tsconfig.json index fe3cbd6a..5fd2bf1b 100644 --- a/packages/interface-datastore/tsconfig.json +++ b/packages/interface-datastore/tsconfig.json @@ -1,10 +1,17 @@ { - "extends": "aegir/src/config/tsconfig.aegir.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "test", - "src" - ] + "extends": "aegir/src/config/tsconfig.aegir.json", + "compilerOptions": { + "outDir": "types" + }, + "include": [ + "src" + ], + "exclude": [ + "dist" + ], + "references": [ + { + "path": "../interface-store" + } + ] } diff --git a/packages/interface-store/package.json b/packages/interface-store/package.json index 8eff6565..9eae11ba 100644 --- a/packages/interface-store/package.json +++ b/packages/interface-store/package.json @@ -3,12 +3,10 @@ "version": "1.0.2", "description": "A generic interface for storing and retrieving data", "main": "src/index.js", - "types": "dist/src/index.d.ts", + "types": "types/src/index.d.ts", "scripts": { "build": "aegir build", - "test": "echo \"No tests configured\"", - "lint": "aegir ts -p check && aegir lint", - "dep-check": "aegir dep-check" + "lint": "aegir ts -p check && aegir lint" }, "homepage": "https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-store#readme", "bugs": "https://github.com/ipfs/js-ipfs-interfaces/issues", diff --git a/packages/interface-store/src/index.js b/packages/interface-store/src/index.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/interface-store/src/index.ts b/packages/interface-store/src/index.ts index 6d986365..4d60b676 100644 --- a/packages/interface-store/src/index.ts +++ b/packages/interface-store/src/index.ts @@ -156,9 +156,9 @@ export interface Store { * console.log('ALL THE VALUES', list) * ``` */ - query: (query: Query, options?: Options) => AsyncIterable> + query: (query: Query, options?: Options) => AsyncIterable> - /** + /** * Query the store. * * @example @@ -171,27 +171,27 @@ export interface Store { * console.log('ALL THE KEYS', key) * ``` */ - queryKeys: (query: KeyQuery, options?: Options) => AsyncIterable + queryKeys: (query: KeyQuery, options?: Options) => AsyncIterable } -export type QueryFilter = (item: Pair) => boolean -export type QueryOrder = (a: Pair, b: Pair) => -1 | 0 | 1 +export interface QueryFilter { (item: Pair): boolean } +export interface QueryOrder { (a: Pair, b: Pair): -1 | 0 | 1 } export interface Query { prefix?: string - filters?: QueryFilter[] - orders?: QueryOrder[] + filters?: Array> + orders?: Array> limit?: number offset?: number } -export type KeyQueryFilter = (item: Key) => boolean -export type KeyQueryOrder = (a: Key, b: Key) => -1 | 0 | 1 +export interface KeyQueryFilter { (item: Key): boolean } +export interface KeyQueryOrder { (a: Key, b: Key): -1 | 0 | 1 } export interface KeyQuery { prefix?: string - filters?: KeyQueryFilter[] - orders?: KeyQueryOrder[] + filters?: Array> + orders?: Array> limit?: number offset?: number } diff --git a/packages/interface-store/tsconfig.json b/packages/interface-store/tsconfig.json index 3865f348..0affc059 100644 --- a/packages/interface-store/tsconfig.json +++ b/packages/interface-store/tsconfig.json @@ -1,11 +1,13 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "outDir": "dist", - "skipLibCheck": false + "outDir": "types" }, "include": [ - "test", "src" + ], + "exclude": [ + "dist", + "node_modules" ] }