{"_id":"@alt-javascript/jsnosqlc-core","_rev":"4-1cfaff997f08e87456aa4562428be3b8","name":"@alt-javascript/jsnosqlc-core","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@alt-javascript/jsnosqlc-core","version":"1.0.0","keywords":["jsnoslqc","nosql","database","driver","filter","mongodb","dynamodb"],"author":{"name":"Craig Parravicini"},"license":"MIT","_id":"@alt-javascript/jsnosqlc-core@1.0.0","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"}],"homepage":"https://github.com/alt-javascript/jsnosqlc/tree/main/packages/core#readme","bugs":{"url":"https://github.com/alt-javascript/jsnosqlc/issues"},"dist":{"shasum":"6c50c0d5b9a810f054cabb3da4d35b8812ba7f43","tarball":"https://registry.npmjs.org/@alt-javascript/jsnosqlc-core/-/jsnosqlc-core-1.0.0.tgz","fileCount":14,"integrity":"sha512-r4fLNSa7YS5Myt5GZzq3gdHDAJu9hK6bvYyzxHDvzmcL7EDHxX0zSkSnP4XlGdGRu5VtlQlQTUdFS+HZ7c5BIA==","signatures":[{"sig":"MEQCIDLSVQVJVDSyjsb8qqohSYMiGwxtTAf8XUnNPoAZFfYEAiBfx0KQLAwG09+010XEqR/uClLJU3d+RhsRcOaHheI4AA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fjsnosqlc-core@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40893},"main":"index.js","type":"module","exports":{".":"./index.js","./test/driverCompliance.js":"./test/driverCompliance.js"},"gitHead":"80cfedbe5f530e7635cfab7c720cbc230731406c","scripts":{"test":"mocha --recursive 'test/**/*.spec.js'"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/jsnosqlc.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"JSNOSLQC core interfaces — Driver, Client, Collection, Cursor, Filter, DriverManager","directories":{},"_nodeVersion":"20.20.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","mocha":"^10.2.0"},"_npmOperationalInternal":{"tmp":"tmp/jsnosqlc-core_1.0.0_1774353590669_0.5812242038171194","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alt-javascript/jsnosqlc-core","version":"1.0.1","keywords":["jsnosqlc","nosql","database","driver","filter","mongodb","dynamodb"],"author":{"name":"Craig Parravicini"},"license":"MIT","_id":"@alt-javascript/jsnosqlc-core@1.0.1","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"}],"homepage":"https://github.com/alt-javascript/jsnosqlc/tree/main/packages/core#readme","bugs":{"url":"https://github.com/alt-javascript/jsnosqlc/issues"},"dist":{"shasum":"0e6207c3fc4da1ed200343f5c7e7cac49cb6ab88","tarball":"https://registry.npmjs.org/@alt-javascript/jsnosqlc-core/-/jsnosqlc-core-1.0.1.tgz","fileCount":14,"integrity":"sha512-8OPk0C8RIiSX/0Xkzt1GI4Hr7hhgpaBICrplvYmqI+QgXdC5SJQLJP/goACNPe+g7GTtr5YiRkL53NG38lF7OA==","signatures":[{"sig":"MEUCIQC7KdSkUUVovXVdd/3A+O7/b154s6babpcSwVFgV8SHSQIgHQQzo9MBcQeDn5+sjTbF6apYBBeWZloWMD4CnF/LZiY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fjsnosqlc-core@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40893},"main":"index.js","type":"module","exports":{".":"./index.js","./test/driverCompliance.js":"./test/driverCompliance.js"},"gitHead":"8aa2fa0b3c0e0ab1bf7252b331fd5f468690fcf1","scripts":{"test":"mocha --recursive 'test/**/*.spec.js'"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/jsnosqlc.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"JSNOSLQC core interfaces — Driver, Client, Collection, Cursor, Filter, DriverManager","directories":{},"_nodeVersion":"20.20.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","mocha":"^10.2.0"},"_npmOperationalInternal":{"tmp":"tmp/jsnosqlc-core_1.0.1_1774354014567_0.7081764003502653","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@alt-javascript/jsnosqlc-core","version":"1.1.0","keywords":["jsnosqlc","nosql","database","driver","filter","mongodb","dynamodb"],"author":{"name":"Craig Parravicini"},"license":"MIT","_id":"@alt-javascript/jsnosqlc-core@1.1.0","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"}],"homepage":"https://github.com/alt-javascript/jsnosqlc/tree/main/packages/core#readme","bugs":{"url":"https://github.com/alt-javascript/jsnosqlc/issues"},"dist":{"shasum":"2f02d5d130363b7b7a7980078768fef65a45173d","tarball":"https://registry.npmjs.org/@alt-javascript/jsnosqlc-core/-/jsnosqlc-core-1.1.0.tgz","fileCount":16,"integrity":"sha512-s88Tix/S9JBb9MpYySKAysa6M0T3l/Y1GlTYHg0yuP0qVmhRFvv49ML5tB0x3D08pO7JVwvdBXPt5SkaCoSbzA==","signatures":[{"sig":"MEUCIGnO8IVAk8NSnNsE5bQfiw7+x0xXWhF1Kdw8hcFP1Sw6AiEA5fzhgs8sDOa2Mb0/Jr8O928PH7NSQuzhSaKIOtKxQq0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fjsnosqlc-core@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56156},"main":"index.js","type":"module","module":"dist/jsnosqlc-core.esm.js","browser":"dist/jsnosqlc-core.esm.js","exports":{".":{"import":"./index.js","browser":"./dist/jsnosqlc-core.esm.js","default":"./index.js"},"./test/driverCompliance.js":"./test/driverCompliance.js"},"gitHead":"e7d60a970273edc4b55165e52762a1f36142c39b","scripts":{"test":"mocha --recursive 'test/**/*.spec.js'","build:browser":"rollup -c"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/jsnosqlc.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"JSNOSLQC core interfaces — Driver, Client, Collection, Cursor, Filter, DriverManager","directories":{},"_nodeVersion":"20.20.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","mocha":"^10.2.0","rollup":"*","@rollup/plugin-node-resolve":"*"},"_npmOperationalInternal":{"tmp":"tmp/jsnosqlc-core_1.1.0_1774502335922_0.3692731433160559","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@alt-javascript/jsnosqlc-core","version":"1.1.1","description":"JSNOSLQC core interfaces — Driver, Client, Collection, Cursor, Filter, DriverManager","keywords":["jsnosqlc","nosql","database","driver","filter","mongodb","dynamodb"],"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"homepage":"https://github.com/alt-javascript/jsnosqlc/tree/main/packages/core#readme","repository":{"type":"git","url":"git+https://github.com/alt-javascript/jsnosqlc.git","directory":"packages/core"},"type":"module","main":"index.js","module":"dist/jsnosqlc-core.esm.js","browser":"dist/jsnosqlc-core.esm.js","exports":{".":{"browser":"./dist/jsnosqlc-core.esm.js","import":"./index.js","default":"./index.js"},"./test/driverCompliance.js":"./test/driverCompliance.js"},"scripts":{"build:browser":"rollup -c","test":"mocha --recursive 'test/**/*.spec.js'"},"devDependencies":{"@rollup/plugin-node-resolve":"*","chai":"^4.3.7","mocha":"^10.2.0","rollup":"*"},"author":{"name":"Craig Parravicini"},"contributors":[{"name":"Claude","url":"Anthropic"}],"license":"MIT","_id":"@alt-javascript/jsnosqlc-core@1.1.1","gitHead":"20256a64a39eb4643b126a3996f360ade0aad2da","bugs":{"url":"https://github.com/alt-javascript/jsnosqlc/issues"},"_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-GHFbD0u11wk9khXP3bOuyvEm6IhbEnLy7Pc0PZpP5Ep3OrtV9TNNOrZ6vav6xjfh2wBYe7/pV+1L1UY2+M8low==","shasum":"432d3c35daa99fbd0ce4f3dcfab75a914cc68f66","tarball":"https://registry.npmjs.org/@alt-javascript/jsnosqlc-core/-/jsnosqlc-core-1.1.1.tgz","fileCount":16,"unpackedSize":56156,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fjsnosqlc-core@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDY+RbZJqziCuSvm+hx8acd7n3FxdZ/6k/YvkNGY/cpbQIhALyznL8dQa2eokRf/w5ukG+eLQMKduy+Yu1W597wyAL+"}]},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"directories":{},"maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jsnosqlc-core_1.1.1_1774503244862_0.3853521362828778"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-24T11:59:50.520Z","modified":"2026-03-26T05:34:05.270Z","1.0.0":"2026-03-24T11:59:50.814Z","1.0.1":"2026-03-24T12:06:54.710Z","1.1.0":"2026-03-26T05:18:56.088Z","1.1.1":"2026-03-26T05:34:05.007Z"},"bugs":{"url":"https://github.com/alt-javascript/jsnosqlc/issues"},"author":{"name":"Craig Parravicini"},"license":"MIT","homepage":"https://github.com/alt-javascript/jsnosqlc/tree/main/packages/core#readme","keywords":["jsnosqlc","nosql","database","driver","filter","mongodb","dynamodb"],"repository":{"type":"git","url":"git+https://github.com/alt-javascript/jsnosqlc.git","directory":"packages/core"},"description":"JSNOSLQC core interfaces — Driver, Client, Collection, Cursor, Filter, DriverManager","contributors":[{"name":"Claude","url":"Anthropic"}],"maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"readme":"# @alt-javascript/jsnosqlc-core\n\n[![Language](https://img.shields.io/badge/language-JavaScript-yellow.svg)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)\n[![npm version](https://img.shields.io/npm/v/%40alt-javascript%2Fjsnosqlc-core)](https://www.npmjs.com/package/@alt-javascript/jsnosqlc-core)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![CI](https://github.com/alt-javascript/jsnosqlc/actions/workflows/node.js.yml/badge.svg)](https://github.com/alt-javascript/jsnosqlc/actions/workflows/node.js.yml)\n\nCore interfaces for the JSNOSLQC unified NoSQL access layer: `Driver`, `Client`, `Collection`, `Cursor`, `Filter`, `FieldCondition`, and `DriverManager`.\n\n**Part of the [@alt-javascript/jsnosqlc](https://github.com/alt-javascript/jsnosqlc) monorepo.**\n\n## Install\n\n```bash\nnpm install @alt-javascript/jsnosqlc-core\n```\n\nInstall a driver alongside core:\n\n```bash\nnpm install @alt-javascript/jsnosqlc-core @alt-javascript/jsnosqlc-memory\n```\n\n## Core API\n\n### DriverManager\n\nRoutes connection requests to the appropriate registered driver.\n\n```javascript\nimport { DriverManager } from '@alt-javascript/jsnosqlc-core';\nimport '@alt-javascript/jsnosqlc-mongodb'; // self-registers on import\n\nconst client = await DriverManager.getClient('jsnosqlc:mongodb://localhost:27017/mydb');\n```\n\n### ClientDataSource\n\nConvenience factory that mirrors the `DataSource` pattern from [jsdbc](https://github.com/alt-javascript/jsdbc).\n\n```javascript\nimport { ClientDataSource } from '@alt-javascript/jsnosqlc-core';\nimport '@alt-javascript/jsnosqlc-memory';\n\nconst ds = new ClientDataSource({ url: 'jsnosqlc:memory:' });\nconst client = await ds.getClient();\n```\n\n### Client\n\nManages the session lifecycle and a collection cache.\n\n```javascript\nconst client = await DriverManager.getClient(url);\n\nconst users = client.getCollection('users'); // returns cached instance on repeat calls\nconsole.log(client.isClosed()); // false\n\nawait client.close();\n```\n\n### Collection\n\nSix operations on a named collection.\n\n```javascript\nconst col = client.getCollection('products');\n\n// Key-value operations\nawait col.store('sku-001', { name: 'Widget', price: 9.99 });\nconst doc = await col.get('sku-001');     // { name: 'Widget', price: 9.99 }\nawait col.delete('sku-001');\n\n// Document operations (backend-assigned id)\nconst id = await col.insert({ name: 'Gadget', price: 24.99 });\nawait col.update(id, { price: 19.99 }); // patch — other fields preserved\n\n// Query\nconst filter = Filter.where('price').lt(20).build();\nconst cursor = await col.find(filter);\n```\n\n### Cursor\n\nSupports both cursor iteration and bulk access, with async iterator support.\n\n```javascript\n// Bulk access\nconst cursor = await col.find(filter);\nconst docs = cursor.getDocuments();\n\n// Cursor iteration\nwhile (await cursor.next()) {\n  const doc = cursor.getDocument();\n  console.log(doc);\n}\n\n// Async iterator\nfor await (const doc of cursor) {\n  console.log(doc);\n}\n```\n\n### Filter\n\nChainable filter builder. Produces an AST consumed by driver translators.\n\n```javascript\nimport { Filter } from '@alt-javascript/jsnosqlc-core';\n\n// Single condition\nconst f1 = Filter.where('status').eq('active').build();\n\n// AND chain\nconst f2 = Filter.where('age').gt(18).and('country').eq('AU').build();\n\n// OR compound (static factory — takes built AST nodes)\nconst f3 = Filter.or(\n  Filter.where('status').eq('active').build(),\n  Filter.where('status').eq('pending').build()\n);\n\n// NOT negation\nconst f4 = Filter.where('status').eq('inactive').not();\n```\n\n### Filter Operators\n\n| Operator | Example | Meaning |\n|---|---|---|\n| `eq` | `.eq('Alice')` | Equal |\n| `ne` | `.ne('inactive')` | Not equal |\n| `gt` | `.gt(18)` | Greater than |\n| `gte` | `.gte(18)` | Greater than or equal |\n| `lt` | `.lt(100)` | Less than |\n| `lte` | `.lte(100)` | Less than or equal |\n| `contains` | `.contains('admin')` | Array contains element, or string contains substring |\n| `in` | `.in(['a', 'b'])` | Field is one of the values |\n| `nin` | `.nin(['x', 'y'])` | Field is not one of the values |\n| `exists` | `.exists(true)` | Field is present (`true`) or absent (`false`) |\n\n## Writing a Driver\n\nSee the [Driver Guide](https://github.com/alt-javascript/jsnosqlc/blob/main/docs/driver-guide.md) and [`@alt-javascript/jsnosqlc-memory`](https://www.npmjs.com/package/@alt-javascript/jsnosqlc-memory) for a complete minimal example.\n\n## Running Compliance Tests\n\nThe compliance suite is importable for third-party drivers:\n\n```javascript\nimport { runCompliance } from '@alt-javascript/jsnosqlc-core/test/driverCompliance.js';\n\nrunCompliance(async () => {\n  const client = await DriverManager.getClient('jsnosqlc:mydriver:...');\n  return client;\n});\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}