{"_id":"is-options","_rev":"1645538","name":"is-options","description":"Easily check if input is an options map","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2021-11-22T11:26:08.000Z","created":"2018-03-17T20:05:38.774Z","1.0.2":"2021-11-22T11:13:18.772Z","1.0.1":"2018-03-17T20:10:10.814Z","1.0.0":"2018-03-17T20:05:38.774Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/is-options.git"},"versions":{"1.0.2":{"name":"is-options","version":"1.0.2","description":"Easily check if input is an options map","main":"index.js","dependencies":{"b4a":"^1.1.1"},"devDependencies":{"standard":"^11.0.1","tape":"^4.9.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/is-options.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/is-options/issues"},"homepage":"https://github.com/mafintosh/is-options","gitHead":"beefd931e69cb899f9a0281d493ed11af4ccc401","_id":"is-options@1.0.2","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"shasum":"61dcfc1e8786c028a3adf919fa3b3cdb9fc30f81","size":1673,"noattachment":false,"key":"/is-options/-/is-options-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-options/download/is-options-1.0.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-options_1.0.2_1637579598611_0.40528852202689714"},"_hasShrinkwrap":false,"publish_time":1637579598772,"_cnpm_publish_time":1637579598772},"1.0.1":{"name":"is-options","version":"1.0.1","description":"Easily check if input is an options map","main":"index.js","dependencies":{},"devDependencies":{"standard":"^11.0.1","tape":"^4.9.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/is-options.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/is-options/issues"},"homepage":"https://github.com/mafintosh/is-options","gitHead":"37a25dd8cff4b342f5cc0922b58374a4019f6a1e","_id":"is-options@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"25b13036030fafca858918124c24048f788be04f","size":1693,"noattachment":false,"key":"/is-options/-/is-options-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-options/download/is-options-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-options_1.0.1_1521317410762_0.008471231018426728"},"_hasShrinkwrap":false,"publish_time":1521317410814,"_cnpm_publish_time":1521317410814},"1.0.0":{"name":"is-options","version":"1.0.0","description":"WIP - nothing to see here","main":"index.js","dependencies":{},"devDependencies":{"standard":"^11.0.1","tape":"^4.9.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/is-options.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/is-options/issues"},"homepage":"https://github.com/mafintosh/is-options","gitHead":"ce0f870a959ddb0659c724782de291604e519b86","_id":"is-options@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"a476c25de3077988789dd176cd5b1a83ecc9ad2a","size":1705,"noattachment":false,"key":"/is-options/-/is-options-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-options/download/is-options-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-options_1.0.0_1521317138697_0.5340298864706536"},"_hasShrinkwrap":false,"publish_time":1521317138774,"_cnpm_publish_time":1521317138774}},"readme":"# is-options\n\nEasily check if input is an options map\n\n```\nnpm install is-options\n```\n\n[![Build Status](https://travis-ci.org/mafintosh/is-options.svg?branch=master)](https://travis-ci.org/mafintosh/is-options)\n\n## Usage\n\n``` js\nvar isOptions = require('is-options')\n\nthing('', {foo: true}) // key='', opts={foo: true}\nthing({foo: true}) // key=undefined, opts={foo: true}\nthing(Buffer.from('buf'), {foo: true}) // key=Buffer('buf'), opts={foo: true}\n\nfunction thing (optionalKey, opts) {\n  if (isOptions(optionalKey)) {\n    opts = optionalKey\n    optionalKey = undefined\n  }\n\n  console.log('key', optionalKey)\n  console.log('options', opts)\n}\n```\n\n## API\n\n#### `bool = isOptions(obj)`\n\nReturns true is `obj` is an object and not a buffer\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/is-options","bugs":{"url":"https://github.com/mafintosh/is-options/issues"},"license":"MIT"}