{"_id":"nanoresource","_rev":"5-c2ad27561652e8b3b9b93c66140b0231","name":"nanoresource","dist-tags":{"latest":"1.3.0"},"versions":{"0.0.0":{"name":"nanoresource","version":"0.0.0","description":"Small module that helps you maintain state around resources","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","devDependencies":{"standard":"^12.0.1","tape":"^4.9.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/nanoresource.git"},"bugs":{"url":"https://github.com/mafintosh/nanoresource/issues"},"homepage":"https://github.com/mafintosh/nanoresource#readme","gitHead":"f9951e95f485642aa72eddd8189247ee7fdf661b","_id":"nanoresource@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-90kiMbWryJ7JRs2LPdv+Jve7UTtjgIkFPrgRYTsNEbtAu8yJFnIB8gSKmS1sBv/J3mkf8ms/pT6KHUQ/xona6g==","shasum":"3ac8781afc2a2df159c6e1762e079008ed892350","tarball":"https://registry.npmjs.org/nanoresource/-/nanoresource-0.0.0.tgz","fileCount":6,"unpackedSize":11787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7X3jCRA9TVsSAnZWagAAzx4QAJ03I12m7/z4+LeFNZv/\n3izECP39KXUnRsxIx6J4FMZrF5eJKuvoYLr6RS0IUxpf8h1rBjaYGG9al6RC\nuZhmJlLzOZhuMrJP6F6P7Y5CVmUfPpVx1CCxhEqbKbv7hkT0Xf2s0+cwtI/Q\nfdQpKqTPYWPiqVvdy15t/CpxMzaoQAXmFHMEKt5sJX5xkB7IzlYwp80V8OrI\nRLwkZkvedC+QWnMnuG8Bp8IkRLyz9mj++DDWgiiOOMfoFusKmLZgfjByE7n+\nWB4s7PLcyWO/f6v1iJbvHqw/t5XqZ2gB9Q/ylvXd9BcXg1b91tykT+Smh/48\n18NE579iqeBHhpgFth0mRkjUDhjubTU2v0/Otl+5gw+nxhqFFI9ZjxSer6RJ\ndr4UvQ8itj6k+3uBGKv+Q7PGT3nXmSEwwdpc35Nx+BIpmETpDL0+d8ytbDSz\niShWkuG5s+4OJUYjeMmMYAOfbeLKNv4MLYKmwhUXhhxBDnDdzIM+e5UAxUkK\nzJ8zdSTamdYmZqguQMARMJ153MusFL7hyXZDyIUL65MNDPRh3zUxn53aDgep\n7VlaPgG/K9g/T6bIzBPbJTsPbWTWQ0PZbEZJ0z/FPkMe2j2bmNo2R1TGA6U0\nrqR0zNmr0A3u2gGYZZbRBwXIQWK76mm7sir2rfQ3daGPL6isF1cm6CkhLHZ8\nSmcu\r\n=KCVT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFRb+QAGRAwZcv4vDom9ZbPrjKgGC97pWW0gooaIOSkwIgBIbthvszqz+wBBJ0bFAO2o2Zb5uxLw4A5B+8Y7klpZg="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoresource_0.0.0_1542290914589_0.32341637010775726"},"_hasShrinkwrap":false},"1.0.0":{"name":"nanoresource","version":"1.0.0","description":"Small module that helps you maintain state around resources","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","devDependencies":{"standard":"^12.0.1","tape":"^4.9.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/nanoresource.git"},"bugs":{"url":"https://github.com/mafintosh/nanoresource/issues"},"homepage":"https://github.com/mafintosh/nanoresource#readme","gitHead":"697ab99b1de8c8ee37e91cb09519d63697caf66d","_id":"nanoresource@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-v0oiyqaEKJt6vt1t/Do7Jvgv1eOt+47RzUna413HwMvrCiYOSmD2utnFpNNNQNU1MnMJKE3QIaBKXvT983BS2w==","shasum":"246d853dc23d23ef800fb8db55c6eef0462ca0e9","tarball":"https://registry.npmjs.org/nanoresource/-/nanoresource-1.0.0.tgz","fileCount":6,"unpackedSize":11787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7X4mCRA9TVsSAnZWagAAJxoP/1fy++BdrTz1aENALT3D\nlPtMfg5VlJWAhPxvvxfgM4yYtPouzNLJBei8etT8Shkk48+hmAMHkcWGu8eT\nMBn6YZou3tBrEsmenyZF+rXV8Zyt/qIBqCOhyuz4y5FOEf9mt29bEoYZAAtg\n8CsfLtmxtDSm4HZaaeH5whqBIs8FS5/6RDHW74Dwfvh2TBE5cLRWKlq7IO1K\niVBzYRUMaR2vdgwsxylLCDev/czUA/BwBE+a9taZwXMhX/FPlQe2Lcg6BpmE\nXrCPN0qoBgfK7E0ZLQ0S1jO5jAyJoVS5KeBzWp82YnwvfY7Zugo4Np9Ca0/0\nuobNlL8qU7MzXLLAx56S7MA4XACKKdk1oNRSn0jd3NLWkRrdL7TuFnR6lIZp\nwtk+iSil5ymWwWrv4yEzAij+lyGOBKbMJ0CYGijQYyelHv13D8gfgiUBC7sq\nG5HjbyoPpzEnk8s+NUDivVnWXL+S/V7KIu9/GeRJ8vm5hjOmMCzyJFWrSXBb\ndrq7Ik+MEtDsZanah7QeMolMcPnjPa5TiyBYIPqo0Na/o8x9Q1j+Iv5IZcBp\n/DteZUuOmm/Oubv4o4ISublFWagZnHZZusFJAjsgoaJLWSNcpmGS5MfxWsSH\nlJWoRcOsmLyEgMFArQvHDAWBvAb8sYcDTFNxpMGtAEsdwT1ghDrWGR5Oujl5\nDmn6\r\n=TPLk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpTk2BctdKQ9guCOEqby1FetRvByzC77pHDbKzkdgf5gIgUBNJqnoh+M/2mt/M/PULNq0xUQHFMgBxGazfHnjH2no="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoresource_1.0.0_1542290981698_0.15188953485050205"},"_hasShrinkwrap":false},"1.1.0":{"name":"nanoresource","version":"1.1.0","description":"Small module that helps you maintain state around resources","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","devDependencies":{"standard":"^12.0.1","tape":"^4.9.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/nanoresource.git"},"bugs":{"url":"https://github.com/mafintosh/nanoresource/issues"},"homepage":"https://github.com/mafintosh/nanoresource#readme","gitHead":"14a1cbadf4184086d0a231dde452966dd08b9e32","_id":"nanoresource@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-55gAC2aD0wv8OGm1PstNT+ngLea+UAXD8Nnup8YNm7HyDJGr5yqY4yIV6GMNs+PKtdU5S6Ei5RgiQPQPVzVfpg==","shasum":"2fe110d3aedf608cfdfc866c113ea021968a948a","tarball":"https://registry.npmjs.org/nanoresource/-/nanoresource-1.1.0.tgz","fileCount":6,"unpackedSize":12083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA5T8CRA9TVsSAnZWagAAarcP/jmUKce8+uQT6NxRg2Na\nc3KQaRnR6syHLdtIJdB74Dt0UXv6i43w4rJHP3Q+HkpOQG591+y53yKvtvb4\n698HqEis4tFYJsx/L7q4fB3PITAemlj8kxyqjSRPWI4ztStWjBfpr0GqfL5U\n4oIEEF7VdbpQMKhMFAhdGsL4B8ZkbviYa93Y9caUzeqBAsBb8b7ilEXCU4rZ\nDOEnMUN84d2vh4UgHcByYb1CRCT+mqG3Wow2ylqVME6GeIjvyuWu+1ILsLmB\nHB1DroftdbmCVXBda9KTLQXbXe8IwUnZSnLgNsHkoyY3RYXrv8LBIHs+/e0j\ngz7JyTqxEUHGuWp7YIB1ATd+6ChIzS1WCpjHUnYuv1FvyinXgwHpWyzXlM8K\nAm8FpUhtqFgSELU2lVtzRri5rit7kMY3yi81tPNpFTtHMT43SwD0PXJ5Jh27\np7qTMfR65rKwkYTCaim5k/cKAY3IatZzUKFE0RepMB6zfe6/w8Cr3pDLMLjH\nk1SHE+baaz+r353zA2F1fGrKlaVdQCeWuSg9mLlRfrvmGjKn9sGw6aqrQUiO\npl4Af59ncTOoQCybAcrLR1bevX6R5X/ySEVLwXr32VdMvhqydEgGoOnGfHje\n1NAyxxgzs4Nw5FAvUGKIxAROV4FE2U2VqN8MmVI/eGmVvQnCbwMaSJemWCgV\ng3+e\r\n=tiSb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyLIFTytr3wYh/g1FR5HONIaHiGSAAk/FcOH4QnrF3FgIgDPVQai6z6nWpl9OoMpjjNm+gcQwVB2J2ncf9nbQYJn8="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoresource_1.1.0_1560515835713_0.651516559285281"},"_hasShrinkwrap":false},"1.2.0":{"name":"nanoresource","version":"1.2.0","description":"Small module that helps you maintain state around resources","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","devDependencies":{"standard":"^12.0.1","tape":"^4.9.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/nanoresource.git"},"bugs":{"url":"https://github.com/mafintosh/nanoresource/issues"},"homepage":"https://github.com/mafintosh/nanoresource#readme","gitHead":"4cc9c1f6332e745b7fc07d8e8481ec2c47ee157d","_id":"nanoresource@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-6DJTce5okL9IQlVcswSsrLP4lQER52GkRMHAnkmHQNX1AqpT6VOE8y0MBartHJW3SV0ppC0wy0u4eAK3JARfpA==","shasum":"59a8bac28a1302179cdce49d95fd3393aa74f5bd","tarball":"https://registry.npmjs.org/nanoresource/-/nanoresource-1.2.0.tgz","fileCount":6,"unpackedSize":12304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA54CCRA9TVsSAnZWagAAUN4P/2xGCTk0Qtz128fFiVoy\nT4NIIJ9V6ATQGJNCRaavE1tAhN/X3iSR4Ge8l3+amMdxTviNC+Dpr1cnvMiy\nC80fbUqvzx0CtOXuVud9n83aJdug55QNZhJIvDglhpqZB8cbBrCHf14YFDv9\nNXRRFIEyuZ60TmNCQU+WXqACnfTrJFh144JMkegOyGZRpe5jJ17s4uZXzVsj\ntd5Vh7+Lzv1I3IRsD6HEPgMzcBYn8CKvd+d5POdED2sXtNRqBjIcCDn/QTbP\nUmYXngpsD2rWmKOGN8BLwxIC1+ssD0GuA3tyRi/YBggdKg8bic2qHlWnuGm0\nbqOwZkzJRndsbYMStez6CUcJk0ZiAck8uOEqknEbTcMOtrAqnwe4TiqL1hgT\nxn1XqYQbLkEtgr84K009owc/91DK/TlY1y/npTK+YNbvday4rE0Wo90qcTbw\nW2EXfe+sb8emfITwcIz4jfonHTObsxQn04ncPYLiemz+qITJk1wxINAGPQAV\nHf5VTjZksfh0eM42PHilar1mRXLl/sWIutTyCCT8HyB0BC0yp3HBQXD6SNML\nfiF/tlwSlItNarECjp5WcJ3bDrA6fLvJaFQITg1nD+9L187D7mqe6rNwZRwj\nI9mOMSmn/bl5NqBNluvCG4cRVzo8sod1V+wY67STxJpk+bXpndXwiVST07Rn\nxnfd\r\n=VOLV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkO7o49MTC7siHSjQ1/Zdshwu38x0Sim0hLbaJYnbgXAiAMcELQVNXTZSkZwl/FpM99uCqVT6jVjX1yxrOLV2cqTg=="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoresource_1.2.0_1560518145905_0.9619393725926315"},"_hasShrinkwrap":false},"1.3.0":{"name":"nanoresource","version":"1.3.0","description":"Small module that helps you maintain state around resources","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","devDependencies":{"standard":"^14.3.1","tape":"^4.11.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/nanoresource.git"},"bugs":{"url":"https://github.com/mafintosh/nanoresource/issues"},"homepage":"https://github.com/mafintosh/nanoresource#readme","dependencies":{"inherits":"^2.0.4"},"gitHead":"83148acb18353e079d2222f489d8b10d151472f1","_id":"nanoresource@1.3.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-OI5dswqipmlYfyL3k/YMm7mbERlh4Bd1KuKdMHpeoVD1iVxqxaTMKleB4qaA2mbQZ6/zMNSxCXv9M9P/YbqTuQ==","shasum":"823945d9667ab3e81a8b2591ab8d734552878cd0","tarball":"https://registry.npmjs.org/nanoresource/-/nanoresource-1.3.0.tgz","fileCount":7,"unpackedSize":15761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwCW/CRA9TVsSAnZWagAAH+IQAJy3LZ9jam3xa2BR3bPm\nAp0hl/nPOJ07ZnQTK5IV2CAz1NjB6/iG7bi1sNYzZFhFFu0hvNHl9t9WUznC\nG4N/UJ1/dhpaqnRR2845atOnrIo7anCsV3g+dFgeQnNDvxQZxMQDcQpYp+XB\n8hDoz0OQHcB/uLQ+KctCOTDNLWUQYnFPqrprRIh4ahlwR6b2SmXXZ4qvL5G3\nifqjJVG64/aU2LICcc4lK+2zqVxTBaMBJTltbLzPr0sLnMDIaa196AarM28t\nbthylfM9bKQHT6S0IKBWLUbHH/4kMsEDuvIu+F0c+TpU5noc4YYRwU+McK58\npFWUbFEzwbutPPMD+ryyGIxQwoxVghDuY0mKFn4RPAOhJpOHo9m1Ke5afXvK\ntSLSyAQU9yr68GeoeCShg2oehkW44/B1/36JDtqcYCUKsjJtJfcNanJ8Bxbg\nbfWzLtPikDVYiJwianr8MR1oJ7efw7RZbixz0/WFRc2mCiViMyimtfZrtK70\n4CO1C+DYAbJ0/A9/UbIigbfJUq24GAUDlTf6nh/faA4rQ2G7J5SvZiobp/hg\nqzjGyaOO12YDzWkuN2DfY7Zf5wpxyZxD5hHjtut1+MFbe4H4+JFRBLYdHR9Z\n3iojA6b/D8khnE/B2YxrvlU1Dbtr7294/uFPqazt5XbR+lybkhK7cc+y/YC5\nZbOd\r\n=XD35\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx/BcNcErOX5lH99EZNiUaxYMmKwoiV4j9FvdlRiOHzgIgD0RzCo+OaeWVYvyqFoWYemYKaZPXvSSyzLd9VhoTwOY="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoresource_1.3.0_1572873662474_0.4424740030776544"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-15T14:08:34.589Z","0.0.0":"2018-11-15T14:08:34.742Z","modified":"2022-05-10T09:06:08.018Z","1.0.0":"2018-11-15T14:09:41.803Z","1.1.0":"2019-06-14T12:37:15.874Z","1.2.0":"2019-06-14T13:15:46.034Z","1.3.0":"2019-11-04T13:21:02.576Z"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"description":"Small module that helps you maintain state around resources","homepage":"https://github.com/mafintosh/nanoresource#readme","repository":{"type":"git","url":"git+https://github.com/mafintosh/nanoresource.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/nanoresource/issues"},"license":"MIT","readme":"# nanoresource\n\nSmall module that helps you maintain state around resources\n\n```sh\nnpm install nanoresource\n```\n\nAllows you to easily implement open/close functionality for a resource\nand having a way to mark the resource as active/inactive to avoid it being closed\nwhile it is in middle of something.\n\n## Usage\n\nWe can use this module to implement a simple resource that keep a file descriptor\naround behind the scene to keep stating the same file.\n\n```js\nconst nanoresource = require('nanoresource')\nconst fs = require('fs')\n\nclass FileSize extends nanoresource {\n  constructor (name) {\n    super()\n    this.filename = name\n    this.fd = 0\n  }\n\n  _open (cb) {\n    console.log('Now opening file ...')\n    fs.open(this.filename, 'r', (err, fd) => {\n      if (err) return cb(err)\n      this.fd = fd\n      cb(null)\n    })\n  }\n\n  _close (cb) {\n    console.log('Now closing file ...')\n    fs.close(this.fd, cb)\n  }\n\n  size (cb) {\n    this.open((err) => {\n      if (err) return cb(err)\n      if (!this.active(cb)) return\n      fs.fstat(this.fd, (err, st) => {\n        if (err) return this.inactive(cb, err)\n        this.inactive(cb, null, st.size)\n      })\n    })\n  }\n}\n\nconst f = new FileSize('index.js')\n\nf.size((err, size) => {\n  if (err) throw err\n  console.log('size is:', size)\n})\n\n// size a couple of times\nf.size((err, size) => {\n  if (err) throw err\n  console.log('size is:', size)\n})\n\n\n// after a bit when we are done with the resource we close it ...\nsetTimeout(() => f.close(), 1000)\n```\n\nWhen running it you should see that the file is only being opened and closed\nonce.\n\n## API\n\n#### `const r = nanoresource(options)`\n\nCreate a new nanoresource. You can also extend from this prototype if you prefer.\n\nOptions include:\n\n```js\n{\n  open: function (cb) { ... },\n  close: function (cb) { ... }\n}\n```\n\nIf you specify open or close they are used to populate `r._open` and `r._close` for you.\n\nThe open should open the resource and the close one should close it.\n\nThe close method is guaranteed to run *after* open. If no open has been called and close is called the close method is *not* called.\n\n#### `r.open(cb)`\n\nOpen the resource. Will call `r._open` behind the scenes once. If multiple calls to `r.open(cb)` the callbacks will be pushed to an internal queue and executed after the one call to `_open` has completed. If the resource was opened in the past the callback will be called on the next tick.\n\n* Check `r.opened` to see if the resource is fully opened.\n* Check `r.opening` to see if the resource is in the process of being opened.\n\nIf the `_open` method fails and calls it callback with an error this error is forwarded to the pending callbacks and if `r.open` is called again `_open` will be re-run.\n\n#### `r.close(cb)`\n\nSame semantics as `r.open`, except it only runs `_close` if the resource has been opened. If the resouce is in the middle of opening, `r.close` will wait for the open to finish and then try to close it.\n\nIf the resource is active (see the `r.active()` docs) then close will wait for the the resource to become inactive before closing it. However is a call `r.active()` happens after `r.close()` has been called it will fail immediately.\n\n* Check `r.closed` to see if the resource is fully closed.\n* Check `r.closing` to see if the resource is in the process of being closed.\n\nOnce a resource has been closed it can not be re-opened.\n\n#### `const valid = r.active()`\n\nMark the resource as active. By marking a resource as active you have to call `r.inactive()` once at a later stage to indicate that it is no longer active from your point of view.\n\nIf the resource is not in a valid active state (for example if it is being closed), the `r.active` method will return falls and you should return an error to the caller.\n\nAs a conveinience you can pass in a callback to `r.active(callback)` and the active method will call that callback immediately with an error if it's not in a valid active state in addition to returning false.\n\nIt is same to have multiple methods call this method in parallel.\n\n#### `r.inactive()`\n\nThe counter-part to `r.active()`. You must call this if you called `r.active` previously. It is a good idea to call this as the last thing you do in your \"action\" method of your resource.\n\nAs a conveinience you can pass in a callback, error, and value to `r.inactive(callback, error, value)` to call a callback after marking your view of the resource as inactive.\n\nIt is same to have multiple methods call this method in parallel.\n\n## EventEmitter\n\nIf you need a nanoresource that is also an EventEmitter do `const Nanoresource = require('./emitter')` which returns an implementation that inherits from Node.js's EventEmitter prototype.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}