{"_id":"fd-lock","_rev":"480964","name":"fd-lock","description":"Advisory cross-platform lock on a file using a file descriptor to it.","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2021-08-05T09:36:53.000Z","created":"2019-01-23T13:36:03.048Z","1.2.0":"2021-01-28T14:11:36.713Z","1.1.2":"2021-01-27T20:59:14.619Z","1.1.1":"2020-07-02T10:36:31.330Z","1.1.0":"2020-06-25T11:38:11.054Z","1.0.2":"2019-01-24T09:53:40.948Z","1.0.1":"2019-01-24T09:51:56.558Z","1.0.0":"2019-01-24T09:36:11.716Z","0.0.2":"2019-01-24T09:27:33.600Z","0.0.1":"2019-01-23T21:38:18.323Z","0.0.0":"2019-01-23T13:36:03.048Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"versions":{"1.2.0":{"name":"fd-lock","version":"1.2.0","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^2.0.0","node-gyp-build":"^4.2.2"},"devDependencies":{"prebuildify":"^4.1.2","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gitHead":"b0d53658974f635e8eaa49c244e22cae639302be","_id":"fd-lock@1.2.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"a3d9cf2fdf37fc7dbe51a1f8fe600ba30892b94a","size":360961,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.2.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.2.0_1611843096548_0.31792568932088994"},"_hasShrinkwrap":false,"publish_time":1611843096713,"_cnpm_publish_time":1611843096713},"1.1.2":{"name":"fd-lock","version":"1.1.2","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^2.0.0","node-gyp-build":"^4.2.2"},"devDependencies":{"prebuildify":"^3.0.4","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gitHead":"96aba194f47613a1d8061a2b6315ef3087b90309","_id":"fd-lock@1.1.2","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"8e1eda1949648b9e7f8f35b4e3a20983ae82e528","size":458742,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.1.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.1.2_1611781154355_0.6108137509792311"},"_hasShrinkwrap":false,"publish_time":1611781154619,"_cnpm_publish_time":1611781154619},"1.1.1":{"name":"fd-lock","version":"1.1.1","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^2.0.0","node-gyp-build":"^4.2.2"},"devDependencies":{"prebuildify":"^3.0.4","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gitHead":"37ad405ef490dcebf7cf0d0c938a03fb5fdab205","_id":"fd-lock@1.1.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"shasum":"750f492c6fb73d7e6f1aad0e9f9beede0913eec7","size":455740,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.1.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.1.1_1593686191169_0.23755842729088594"},"_hasShrinkwrap":false,"publish_time":1593686191330,"_cnpm_publish_time":1593686191330},"1.1.0":{"name":"fd-lock","version":"1.1.0","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^2.0.0","node-gyp-build":"^4.2.2"},"devDependencies":{"prebuildify":"^3.0.4","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gitHead":"38b4b2cee00032e56800525c2718ff1adb689951","_id":"fd-lock@1.1.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"shasum":"45ba80a58009f31754b7ce8cb0e9542150406194","size":259743,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.1.0_1593085090940_0.323809109242329"},"_hasShrinkwrap":false,"publish_time":1593085091054,"_cnpm_publish_time":1593085091054},"1.0.2":{"name":"fd-lock","version":"1.0.2","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.8.0"},"devDependencies":{"prebuildify":"^2.11.0","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gitHead":"9821870622bcb139b870caa56a9c07a448706d55","_id":"fd-lock@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"fb68e9f40830f96a098e090b79ab6ee9363ea89d","size":220557,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.0.2.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.0.2_1548323620778_0.7430792325942306"},"_hasShrinkwrap":false,"publish_time":1548323620948,"_cnpm_publish_time":1548323620948},"1.0.1":{"name":"fd-lock","version":"1.0.1","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.8.0"},"devDependencies":{"prebuildify":"^2.11.0","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gypfile":true,"gitHead":"ecc2ae15af8557f3c464df018406a94c0a6a4690","_id":"fd-lock@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"e1d9da2b030e8a3c355c537f67e2ddb7a2d35bb5","size":220552,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.0.1_1548323516402_0.2880847178894581"},"_hasShrinkwrap":false,"publish_time":1548323516558,"_cnpm_publish_time":1548323516558},"1.0.0":{"name":"fd-lock","version":"1.0.0","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.8.0"},"devDependencies":{"prebuildify":"^2.11.0","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gypfile":true,"gitHead":"eb98609e11a989c529224d5edfc6efd5dc719bfe","_id":"fd-lock@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"ff207b31356f86ffce361c5365b5d272d671932b","size":7096,"noattachment":false,"key":"/fd-lock/-/fd-lock-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_1.0.0_1548322571597_0.6311745881801372"},"_hasShrinkwrap":false,"publish_time":1548322571716,"_cnpm_publish_time":1548322571716},"0.0.2":{"name":"fd-lock","version":"0.0.2","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.8.0"},"devDependencies":{"prebuildify":"^2.11.0","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gypfile":true,"gitHead":"4b448956c4a39a4cca84cee5b6ca7d5f01c34aa1","_id":"fd-lock@0.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"bf2c8cdacf5b1084d85ea9708c592bf53b337f8e","size":7094,"noattachment":false,"key":"/fd-lock/-/fd-lock-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-0.0.2.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_0.0.2_1548322053468_0.9237623106592383"},"_hasShrinkwrap":false,"publish_time":1548322053600,"_cnpm_publish_time":1548322053600},"0.0.1":{"name":"fd-lock","version":"0.0.1","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^1.8.2","node-gyp-build":"^3.8.0"},"devDependencies":{"prebuildify":"^2.11.0","tape":"^4.9.2"},"scripts":{"test":"tape test.js","prebuild":"prebuildify --napi","prebuild-ia32":"prebuildify --napi --arch=ia32","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gypfile":true,"gitHead":"0548c3ae082a4062e5c6cdde90f46df33eb2ed3b","_id":"fd-lock@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"10bbc75d6a8dcab923a348c5952c250fa91da0c1","size":6197,"noattachment":false,"key":"/fd-lock/-/fd-lock-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-0.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_0.0.1_1548279498220_0.3217529064237059"},"_hasShrinkwrap":false,"publish_time":1548279498323,"_cnpm_publish_time":1548279498323},"0.0.0":{"name":"fd-lock","version":"0.0.0","description":"Advisory cross-platform lock on a file using a file descriptor to it.","main":"index.js","dependencies":{"napi-macros":"^1.8.2"},"devDependencies":{"tape":"^4.9.2"},"scripts":{"test":"tape test.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fd-lock.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"homepage":"https://github.com/mafintosh/fd-lock","gypfile":true,"gitHead":"073f408070d88cc11aea2aed390c6c16c60a7e5f","_id":"fd-lock@0.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"8771ee7814e3e6dbebddc6ec0b01bd578af43ac8","size":2438,"noattachment":false,"key":"/fd-lock/-/fd-lock-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fd-lock/download/fd-lock-0.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fd-lock_0.0.0_1548250562809_0.4885888310090205"},"_hasShrinkwrap":false,"publish_time":1548250563048,"_cnpm_publish_time":1548250563048}},"readme":"# fd-lock\n\nAdvisory cross-platform lock on a file using a file descriptor to it.\n\n```\nnpm install fd-lock\n```\n\n## Usage\n\n``` js\nconst lock = require('fd-lock')\n\n// Can we lock the file using the fd?\nconsole.log(lock(fd))\n```\n\n## API\n\n#### `bool = lock(fd)`\n\nTry to lock access to a file using a file descriptor.\nReturns true if the file could be locked, false if not.\n\nNote that the lock is only advisory and there is nothing stopping someone from accessing the file by simply ignoring the lock.\n\nWorks across processes as well.\n\n#### `bool = lock.unlock(fd)`\n\nUnlocks a file if you have the lock.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/fd-lock","bugs":{"url":"https://github.com/mafintosh/fd-lock/issues"},"license":"MIT"}