{"_id":"bos","_rev":"27-c2cf0f579b0970ac4b9ea3040b6757dd","name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"bos","description":"Big object saver efficiently saves big JavaScript objects to disk. Can be used as an in-memory database.","version":"0.0.0","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"main":"scripts/index.js","devDependencies":{"glob":"^4.0.6","nodeunit":"^0.9.0"},"dependencies":{"fast-json-patch":"^0.4.0"},"scripts":{"test":"node test"},"gitHead":"b1e6c3fbc1a278512513113a68af5d3bf91cb7f7","_id":"bos@0.0.0","_shasum":"5baa112f18b59705ec38ec266cfadd9837ee80d6","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"5baa112f18b59705ec38ec266cfadd9837ee80d6","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.0.tgz","integrity":"sha512-4WIY+xm5F8eS4DPqNCu+2jMwLPn+BCcLahQPPtK1IeQnnWSWJOZhio9zV5URmOEl10hxSUbu2VYCJ2PMxLBNBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAv7YAy16/KM4mndmFpmURhiGyuJyMeQihe8VpSqpFQ/AiBD4tNZ3RI2GgmAIbl8eLxfVg6EzNxMiocHp+xmHATRsg=="}]}},"0.0.1":{"name":"bos","description":"Big object saver efficiently saves big JavaScript objects to disk. Can be used as an in-memory database.","version":"0.0.1","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/index.js","devDependencies":{"glob":"^4.0.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","fast-json-patch":"^0.4.0"},"scripts":{"test":"node test"},"gitHead":"58c5599eb8714d0fe35dec3496a19ae25074803f","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.1","_shasum":"120cc52e1fab8bc6bbc1eb7b551e097af0f030eb","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"120cc52e1fab8bc6bbc1eb7b551e097af0f030eb","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.1.tgz","integrity":"sha512-EYRzfJ/tjSdynZL8t4RtxM50qoxllXdDiZRXPWyvJa1OsgL10ssDqumTd8bOtLFTjOrG9JdtriW488UFDme3bA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVDKP//XusPaiqC2CEaEgRoFkpHAXgeRzjfgJVw2e2HAIgB1YHBLFXqJdTSnMbW5+biiznplbmKJ8mI16ybT8t/uA="}]}},"0.0.2":{"name":"bos","description":"Big Object Saver - loads, watches, and progressively saves changes in a JavaScript object to disk. Can be used as a simple in-memory database.","version":"0.0.2","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/index.js","devDependencies":{"glob":"^4.0.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","fast-json-patch":"^0.4.0"},"scripts":{"test":"node test"},"gitHead":"e1efc140f718cdb5aea0f4bda97cc807f3631dc0","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.2","_shasum":"95c0f4c71bc91201c9c7f96bf35ca043158d1ec5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"95c0f4c71bc91201c9c7f96bf35ca043158d1ec5","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.2.tgz","integrity":"sha512-g1QdGLdP52XLN9pljSf/xQkgEQdt3FwMOHQP3KHNNBpSfBYN2wva5EDA9vdZVg/K/FwB2VHV13s63nnPKkCzzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1sOQmVIJGQ3VnIO8g2hoclOpm7BqFPwPf9wcFRnv8YQIgT1/D1/T2XI/T2C6WXt44/Mz5qHh7WZ3sJUgEpb3DipE="}]}},"0.0.3":{"name":"bos","description":"Big Object Saver - loads, watches, and progressively saves changes in a JavaScript object to disk. Can be used as a simple in-memory database.","version":"0.0.3","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/index.js","devDependencies":{"glob":"^4.0.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","fast-json-patch":"^0.4.0"},"scripts":{"test":"node test"},"gitHead":"3da686e9cf0a0515a3dd40e90bf3846765393445","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.3","_shasum":"7b460016541ad2314120cbbccc06cb8c0b942cda","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"7b460016541ad2314120cbbccc06cb8c0b942cda","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.3.tgz","integrity":"sha512-5yXeeh7KzUTjVRuhJAaReAEuoelIs7gWp/Tm4RGAK9KOY0HbjLyvAsWwcyPr6K5B9XMg6lcMjOpew7QetI8Rjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC3FyJ2rusUIdi1glKAREs8wrvQC+FH775BnqOHfsS4fAiA08BXXVvitYQ7i4W/gFUc0T4TR9bfiPQtRMIoZQAmtCw=="}]}},"0.0.4":{"name":"bos","description":"Big Object Saver - loads, watches, and progressively saves changes in a JavaScript object to disk. Can be used as a simple in-memory database.","version":"0.0.4","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/index.js","devDependencies":{"glob":"^4.0.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","fast-json-patch":"^0.4.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"5214a1a9596c570d843d28236a97d7a8b4cf2e41","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.4","_shasum":"cc8d70c829421e899eb4766e05ac6c099581abee","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"cc8d70c829421e899eb4766e05ac6c099581abee","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.4.tgz","integrity":"sha512-K7QeHFSKJJLuLfWU7Xcl9Bk4Ym0sBi1QqQN2q5hrld8g3JPXnXbauQByk7pG9RSck4yyR9cmLD0zwXJpR9g9Mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdtofMOEWepWX6jcv61MdkarQLEcN9n0z04h4ywFZ9QAiAXCkuTvU5D2wCqwLxhCWOlOgpSWnKWcvh7n+YDCMzfbQ=="}]}},"0.0.5":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"0.0.5","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^4.0.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","async":"^0.9.0","fast-json-patch":"^0.4.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"1ef8769a4fbd10648498bd8d095ce4199b403cbc","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.5","_shasum":"f8d0da771980f2e8e446f11e562f2e89dbdf02a5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"f8d0da771980f2e8e446f11e562f2e89dbdf02a5","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.5.tgz","integrity":"sha512-QAV9FES7srJpiqAj/JkpEmdFvJtom/VtHzhtXrEuagOgbDKJtgL/y70Q5/i8e2xAP3m0a5smVzDg8yzVm4D4Iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfSZ2KBOx/6ffp6Ztn9H1TmM8z7ytXbmzz/MArN38gNwIhAO9owe+aqde2SxvGAuFBrB+5yTj5wwSlvPbIaQikW9pW"}]}},"0.0.6":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"0.0.6","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^4.0.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","async":"^0.9.0","fast-json-patch":"^0.4.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"584a9ca647eedaa538ef256457949f626b4e879d","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.6","_shasum":"a3a77fefe00488c20215a2343042b1ec8513f376","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"a3a77fefe00488c20215a2343042b1ec8513f376","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.6.tgz","integrity":"sha512-ov4RwWy9e33dOyZjQeaT5Ck0BRzwGn4pnjvKsAqFUMcraFtEOlWMcJQRAAB6ToTpW+usFp64PW+RnikN7M9vdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWdeADyuAxVBanIZpJWcVXFDXElU7cmWKAv+MU4ih3uwIhANRedLugEBbZbXOqxmncbD/11KEzitighqn9mUGirxWo"}]}},"0.0.7":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"0.0.7","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^4.1.6","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","async":"^0.9.0","fast-json-patch":"^0.4.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"97014c2740fe3f5db0c5afec981528a223f27cde","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.7","_shasum":"dd4431f241d5b3b057349bf185a7f9adda3e4ea8","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"dd4431f241d5b3b057349bf185a7f9adda3e4ea8","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.7.tgz","integrity":"sha512-38lFRtruw3XZpolq/9WPivi08xfs5qnsmXQubQge9F2h2v+58S4WqmFnnXQ8yC0kkkAA0CqFIqMoetG/tSIr9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+WdH2anI5L1VlkJ2MDbIbQ79wKCIXoND19OFGjjBYsAiAqA9QaOCHRlUk/oyK/E5/m+OJolvwORQ09Q4DQZNpAMw=="}]}},"0.0.8":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"0.0.8","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^4.2.0","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","async":"^0.9.0","fast-json-patch":"^0.4.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"10c8eaf087978ea85d34528fa9880a14b2309cb9","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.8","_shasum":"ae6fd86c05838d6094502aacda8a33e85ec0f583","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"ae6fd86c05838d6094502aacda8a33e85ec0f583","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.8.tgz","integrity":"sha512-MQARYVSHtY2MZT+d0I4QytberNcbDvQBaAVs5XLHD4KorWV1nkPyhbjTW3w09zkaOBgUWwIw8NiU+OiWfkjapw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtsVKJPE/RsU3rBKK8cuniiFwF5SuNn0wf9R/fnxnG7wIhAJdTZMfus+kVMokY6g7NJX0bNs5bN53iAZTqS2hHOusG"}]}},"0.0.9":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"0.0.9","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^4.2.0","lodash":"^2.4.1","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.9.0","async":"^0.9.0","fast-json-patch":"^0.4.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"2d16d209fd2c922c314ae7e4f3d9161a8eefbb00","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@0.0.9","_shasum":"4e19bd3777f03d397bc7ca8caa643a6ea277d394","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"4e19bd3777f03d397bc7ca8caa643a6ea277d394","tarball":"https://registry.npmjs.org/bos/-/bos-0.0.9.tgz","integrity":"sha512-byhtb5gS3cKV9ZgFTuu6Sma28TEexMqmGIDXkpCTffvlfeS9hgkol7nSOF0+GbbAQpW1EwD1xizJIkY8LgJUUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCl7zF3Y47kFa4IJYKSfSdH/c6ZscTed7+Uz/srA1UUHQIgSd/ABQ3Pzb/gcvipa8EhZW0qwPFXC3vGBSB5Ikk9FUo="}]}},"1.0.0":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"1.0.0","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^4.3.5","lodash":"^3.2.0","nodeunit":"^0.9.0"},"dependencies":{"JSONStream":"^0.10.0","async":"^0.9.0","fast-json-patch":"^0.5.0","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"b6c1fda1d707d1f7b10e5bdd1898b95e974ab8df","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@1.0.0","_shasum":"f22dd96198284190e5c9a0e583f6e975983be4d0","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"f22dd96198284190e5c9a0e583f6e975983be4d0","tarball":"https://registry.npmjs.org/bos/-/bos-1.0.0.tgz","integrity":"sha512-khzUDdYJURPWxwmi3w21YyPXSEm+xJT/kjLc8Xjsb/J1YvRfDp6rqsR8sZnDVJloxyWq9mkFdw3Q7y5JYgPfjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1ZwQMfnSa/LFH6V92Ct9pxk7d+GPhIk90mKzmte2pmAIgUOdUqVmIYltLGNaAhavXRQx+jW+O+EOXzUjtfSUSO00="}]}},"1.0.1":{"name":"bos","description":"Big Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.","version":"1.0.1","keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"license":"MIT","author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"main":"scripts/bos.js","bin":{"bos":"scripts/bos-cli.js"},"devDependencies":{"glob":"^5.0.3","nodeunit":"^0.9.1"},"dependencies":{"JSONStream":"^0.10.0","async":"^0.9.0","fast-json-patch":"^0.5.2","lockfile":"^1.0.0"},"scripts":{"test":"node test"},"gitHead":"9b3f17ee6867ff7cc81f43b825a192e025e49be5","bugs":{"url":"https://github.com/rjanicek/bos/issues"},"_id":"bos@1.0.1","_shasum":"970bcdc0ff395f2338e60abf41ccceb6c71f9e44","_from":".","_npmVersion":"2.7.5","_nodeVersion":"1.6.4","_npmUser":{"name":"rjanicek","email":"r@janicek.co"},"maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"dist":{"shasum":"970bcdc0ff395f2338e60abf41ccceb6c71f9e44","tarball":"https://registry.npmjs.org/bos/-/bos-1.0.1.tgz","integrity":"sha512-eU4EvIC24vxC7z+y4k1h+nz3yvZvFd2dry7uJ3VhZk/OfaVF1B1WTL4a4XY2yToaVZMGwKYnm5Y9T7ODiqha5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAPx58CPcrjg9fVUHhx+giflrlCVSkitSBCjRkjhNMxgIgSIMqhnRK923eEEk1us8AUEIrWeHGX4QOS0JFOD29O14="}]}}},"readme":"bos\r\n===\r\nBig Object Store - loads, watches, and progressively saves *changes* in a JavaScript object to disk. Designed for node.js. Can be used as a simple database.\r\n\r\n![bos](./bos-mascot.gif \"bos\")\r\n\r\nadvantages\r\n----------\r\n* Efficient asynchronous writes, only object *changes* are progressively saved to disk. As the list of changes grows, it is periodically merged into the main data file. Merging is done in a seperate process so your application can continue to work un-interrupted.\r\n* Simple api, it's just a JavaScript object. Whatever you do to the object is saved to disk asynchronously and automatically. \r\n* Use your favorite functional libraries to work with the object, Lo-Dash, Underscore.js, Lazy.js.\r\n* The root object can be an object or an array.\r\n\r\nlimits\r\n------\r\n* The object must fit into memory and be JSON.parse-able.\r\n* If you need to store more data than will fit into memory, you should not use bos.\r\n\r\ninstall\r\n-------\r\n```\r\nnpm install --save bos\r\n```\r\n\r\nusage\r\n-----\r\n```JavaScript\r\nvar bos = require('bos');\r\n\r\nbos('data/store', function (error, store) {\r\n    if (error) { throw error; }\r\n\r\n    store.data.cow = 'mooo';                    // this will be saved to disk\r\n    store.data.cows = ['angus', 'ayrshire'];    // this will be saved to disk\r\n    store.data.cows.push('holstein');           // this will be saved to disk\r\n\r\n    store.close();\r\n}).on('error', function (error) {\r\n    console.error(error);\r\n});\r\n\r\n```\r\n\r\napi\r\n---\r\n\r\n#### bos(`dataStorePath`, `[options]`, `[callback(error, store)]`)\r\nOpen or create a data store.\r\n* `dataStorePath` The path and file name without extension where the data store files will be saved. The directory must already exist.\r\n* `options` An optional options object.\r\n    * `defaultObject` The default object used to initialize a new data store. It can be `{}` or `[]` and can contain initial values. The default is `{}`.\r\n    * `autoCompact` A `boolean` that controls whether to automatically compact the data store files. If `true` the data store files will be compacted on start-up and then on hourly interval. Compacting also only occurs if the log file is bigger than the data file. The default is `true`.\r\n* `callback` An optional callback that is called when the data store is ready. It receives a possible error and the data store object.\r\n* returns `store` - The data store object is returned.\r\n\r\n-------------------------------------------------------------------------------\r\n#### store.data \r\n`data` is the object that was created or loaded from disk. It will be observed and changes progressively saved to disk. `data` will be `undefined` until data store is loaded, which is signaled by the `ready` event.\r\n\r\n-------------------------------------------------------------------------------\r\n#### store.compact(`[callback(error)]`)\r\nSpawns a new process that applies patches accumulated in the log file to the data file. The optional callback is called when compacting is done and receives a possible error object.\r\n\r\n-------------------------------------------------------------------------------\r\n#### store.close(`[callback(error)]`)\r\nCompletes pending file writes and cleans up. You should always call this function when done with the data store. The optional callback is called when closing is done and receives a possible error object.\r\n\r\n-------------------------------------------------------------------------------\r\n#### events\r\n\r\nstore.emit('**ready**')  \r\nThe data store is open and ready for business.\r\n\r\nstore.emit('**data**', patches)  \r\nA change in the `store.data` object triggers this event. The event receives an array of `patches` that contain the changes.\r\n\r\nstore.emit('**compacted**')  \r\nThe data store was compacted.\r\n\r\nstore.emit('**error**', error)  \r\nSomething went wrong, ohh noo! The event receives the error.\r\n\r\nstore.emit('**closed**')  \r\nThe data store was closed.\r\n\r\n-------------------------------------------------------------------------------\r\n#### bos.unlock(`dataStorePath`, `callback(error)`)\r\nIf your application exits without calling `store.close()`, bos will try to unlock the data store files but in some cases this may not be possible. Use `bos.unlock()` to manually unlock a data store.\r\n* `dataStorePath` Is the path and file name without extension of the data store files to unlock.\r\n* `callback(error)` Called when unlocking the data store files is done and receives possible error info.\r\n\r\n-------------------------------------------------------------------------------\r\n#### bos.unlockSync(`dataStorePath`)\r\nSynchronous version  of bos.unlock().\r\n* `dataStorePath` Is the path and file name without extension of the data store files to unlock.\r\n\r\n-------------------------------------------------------------------------------\r\n\r\ncli\r\n---\r\n```\r\nusage: bos <command>\r\n\r\n  compact        bos compact <path/store-name>\r\n                 Compacts the store by merging log file into main data file.\r\n                 This command may be used while an instance of bos is using the\r\n                 data store.\r\n\r\n  unlock         bos unlock <path/store-name>\r\n                 Removes all file locks on data store.\r\n```\r\n\r\nfiles\r\n-----\r\n* `store.json` stringified JSON object\r\n* `store.log` RFC 6901 JSON patches, arrays delimited by `\\n`\r\n* `store.lock` signals that files are in use by an instance of bos\r\n* `store.mutex` signals that files are inside a critical section\r\n\r\ntips\r\n----\r\n* Store dates as the number of milliseconds since the Unix epoch (1 January 1970 00:00:00 UTC) `new Date().getTime()` This allows more efficient querying by date / time, no need to parse date strings.\r\n* use objects with keys to efficieltly find data\r\n```JavaScript\r\nvar cows = {\r\n    'angus':  {use: 'beef', origin: 'Scotland'},\r\n    'ayrshire': {use: 'dairy', origin: 'Scotland'},\r\n    'holstein': {use: 'dairy', origin: 'Germany'}\r\n};\r\n\r\nvar findCowFast = cows['holstein'];\r\n```\r\n* use functional libraries like [LoDash](https://lodash.com/docs) to work with objects\r\n```JavaScript\r\nvar _ = require('lodash');\r\n\r\nvar cows = {\r\n    'angus':  {use: 'beef', origin: 'Scotland'},\r\n    'ayrshire': {use: 'dairy', origin: 'Scotland'},\r\n    'holstein': {use: 'dairy', origin: 'Germany'}\r\n};\r\n\r\n_.find(cows, function(cow) {\r\n    return cow.origin === 'Scotland';\r\n});\r\n```\r\n\r\ntasks\r\n-----\r\n* create a test for setting undefined throws error\r\n* account for failed data write during compacting\r\n    * temp patch file would not get deleted, so maybe check it's existence during next compacting and merge it before the active patch file\r\n\r\nissues\r\n------\r\n* Will throw an exception if `undefined` value is set. ie: `store.data.singularity = undefined` see: https://github.com/Starcounter-Jack/JSON-Patch/issues/32\r\n\r\nalgorithm\r\n---------\r\n* save object as JSON to file\r\n* save changes to object as JSON patches to separate log file\r\n* loading object\r\n    * try lock files\r\n    * parse JSON into object\r\n    * apply JSON patches from log file to object\r\n    * unlock files\r\n* updating object\r\n    * observe object for changes\r\n    * write changes as JSON patches to log file\r\n* compacting JSON, periodically merge patches into JSON file\r\n    * can be run while object is in use\r\n    * can be run in separate process from main object\r\n    * process\r\n        * try lock files\r\n        * rename JSON patch log file\r\n            * when object changes next, a new log file will be created\r\n        * merge renamed log file into JSON data file\r\n        * save merged JSON data file\r\n        * if save is successful, delete renamed log file\r\n        * unlock files\r\n* loading and compacting are mutually exclusive processes\r\n    * object can not be loaded while being compacted\r\n    * object can not be compacted while being loaded\r\n* use event emitter api for errors\r\n\r\nideas\r\n-----\r\n* provide configurable callback option for auto-compact triggering\r\n* if JSON.parse & JSON.stringify are inefficient / use lots of memory\r\n    * try use streaming to stringify and parse objects\r\n    * Research using just JSON patches to store all data. Patches can be processed atomically so would be easier on memory. jsonpatch.compare({}, data) will generate an array of patches completely describing the object. Is jsonpatch.compare efficient? Can it stream patches instead of buffering them?\r\n\r\nsimilar\r\n-------\r\n* [LokiJS - javascript embeddable / in-memory database](https://github.com/techfort/LokiJS)\r\n* [lowdb - Flat JSON file database for Node](https://github.com/typicode/lowdb)\r\n* [nedb - Embedded datastore for node.js](https://github.com/louischatriot/nedb)","maintainers":[{"name":"rjanicek","email":"r@janicek.co"}],"time":{"modified":"2022-06-13T04:58:23.862Z","created":"2014-11-09T17:38:38.449Z","0.0.0":"2014-11-09T17:38:38.449Z","0.0.1":"2014-11-10T00:22:44.623Z","0.0.2":"2014-11-10T02:15:00.761Z","0.0.3":"2014-11-10T05:39:01.724Z","0.0.4":"2014-11-11T23:42:01.478Z","0.0.5":"2014-11-14T02:19:28.943Z","0.0.6":"2014-11-16T04:13:57.783Z","0.0.7":"2014-11-20T04:30:50.214Z","0.0.8":"2014-11-20T23:06:33.051Z","0.0.9":"2014-11-21T00:12:53.567Z","1.0.0":"2015-02-14T16:28:26.846Z","1.0.1":"2015-04-08T02:19:17.931Z"},"keywords":["database","db","embed","embeddable","json","jsonpatch","rfc 6901"],"author":{"name":"Richard Janicek","email":"r@janicek.co","url":"http://www.janicek.co"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/rjanicek/bos","repository":{"type":"git","url":"https://github.com/rjanicek/bos"},"bugs":{"url":"https://github.com/rjanicek/bos/issues"},"users":{"nickeltobias":true,"tobiasnickel":true}}