{"_id":"robot-directives","_rev":"9-69f3d758e10bf38816ba3b31456992e3","name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","version":"0.1.0","license":"MIT","homepage":"https://github.com/stevenvachon/robot-directives","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"http://www.svachon.com/"},"main":"lib","repository":{"type":"git","url":"git://github.com/stevenvachon/robot-directives.git"},"bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"dependencies":{"isbot":"~0.0.3"},"devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4","object.assign":"^4.0.3"},"engines":{"node":">= 0.10"},"scripts":{"test":"mocha test.js --reporter spec --check-leaks --bail"},"files":["lib","license"],"keywords":["header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo"],"gitHead":"9e3af1bb2942e02e97ed5a365c1906a0c8795715","_id":"robot-directives@0.1.0","_shasum":"feeb1358e90f16066ad0db6e002a1a0c1aef03ab","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"feeb1358e90f16066ad0db6e002a1a0c1aef03ab","tarball":"https://registry.npmjs.org/robot-directives/-/robot-directives-0.1.0.tgz","integrity":"sha512-KwN2JWd6AYSwEaAWNMcT72bNgYf4F6QXUts8PNliZjloftDiDid/A+vJ4kccH0IPWxeD9vhhkjcMXoJ7mDZOFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCthRWkyyqpJTpjkI4ou7BqbL9rFo0tN8K7zfpoiEV81AIhAKiy3fy1PLoCal90c5stvpMQFavEOwnSjIogz8PMOLhx"}]},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}]},"0.2.0":{"name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","version":"0.2.0","license":"MIT","homepage":"https://github.com/stevenvachon/robot-directives","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"http://www.svachon.com/"},"main":"lib","repository":{"type":"git","url":"git://github.com/stevenvachon/robot-directives.git"},"bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"dependencies":{"isbot":"~0.0.3"},"devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4","object.assign":"^4.0.3"},"engines":{"node":">= 0.10"},"scripts":{"test":"mocha test.js --reporter spec --check-leaks --bail"},"files":["lib","license"],"keywords":["crawlers","header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo","spiders"],"gitHead":"b625cc5ae2483e201b3d3349ebf1e4725a4e61a7","_id":"robot-directives@0.2.0","_shasum":"589d93e12d1319eb33a01045b371eacc83da9641","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"589d93e12d1319eb33a01045b371eacc83da9641","tarball":"https://registry.npmjs.org/robot-directives/-/robot-directives-0.2.0.tgz","integrity":"sha512-v6b1EinpLAVLX1wbUYLOEJUhzYIfgcmR/oFWD5QcYLpZ1FN51+4A4bSxAWDQp7eDZLXBckVHjKUEAj0lq2EXmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1xaVhWoXpjomPO3omItwzT60LPjIZT1pAski7yjnXDAIgMqUV4SMqopqUqGdztKrrShBt97CBjFOxYlzIjBpa07c="}]},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}]},"0.2.1":{"name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","version":"0.2.1","license":"MIT","homepage":"https://github.com/stevenvachon/robot-directives","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"http://www.svachon.com/"},"main":"lib","repository":{"type":"git","url":"git://github.com/stevenvachon/robot-directives.git"},"bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"dependencies":{"isbot":"^1.0.1"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","object.assign":"^4.0.3"},"engines":{"node":">= 0.10"},"scripts":{"test":"mocha test.js --reporter spec --check-leaks --bail"},"files":["lib","license"],"keywords":["crawlers","header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo","spiders"],"gitHead":"2f7f2b8a529218d423c4b0255dc9eae82fcc9b1c","_id":"robot-directives@0.2.1","_shasum":"32410e50b0ab7186908bff95c5a373c90cbb22ea","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"32410e50b0ab7186908bff95c5a373c90cbb22ea","tarball":"https://registry.npmjs.org/robot-directives/-/robot-directives-0.2.1.tgz","integrity":"sha512-Bs+qXzvyuKFJ7YGCHsxtKTYaHshao82sdiBA8NAnMb7UHMZrWxUzZLzpCD2sIwm+O4i1kN3q0VQroZ7yzL+Zkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvS0xTJhjkk9e49dqnz723/bCcBDxyABVRJReJ+aQ4lAIhAPcBVJvJE2Dv4UVhqrkgAD/V0r/FtwGzp711NlCrVVnW"}]},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}]},"0.3.0":{"name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","version":"0.3.0","license":"MIT","homepage":"https://github.com/stevenvachon/robot-directives","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"http://www.svachon.com/"},"main":"lib","repository":{"type":"git","url":"git://github.com/stevenvachon/robot-directives.git"},"bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"dependencies":{"isbot":"^2.0.0","useragent":"^2.1.8"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","object.assign":"^4.0.3"},"engines":{"node":">= 0.10"},"scripts":{"test":"mocha test.js --reporter spec --check-leaks --bail"},"files":["lib","license"],"keywords":["crawlers","header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo","spiders"],"gitHead":"8206f3016b6f7a4a41effd5554fde7fd140111b4","_id":"robot-directives@0.3.0","_shasum":"174fb1ffc2a9b97877301e87c89b395f429d1f65","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"174fb1ffc2a9b97877301e87c89b395f429d1f65","tarball":"https://registry.npmjs.org/robot-directives/-/robot-directives-0.3.0.tgz","integrity":"sha512-mROGTXczU5H5jpfwIpy4TUcmoZH033UXvkI2QZfbfH+qugWr7XzmXmMtKcqqrTn1d4wabmwfVG9xaVQQ66ti8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByjDnbri2FOiax3ToIwlnCvblXL2LvZ+9in7kY4sctaAiA3cM/Olw1dRp0SECRgWy1z9KcdlAIxEhM/vzQZI6H2IQ=="}]},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}]},"0.4.0-alpha":{"name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","version":"0.4.0-alpha","license":"MIT","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"https://www.svachon.com/"},"main":"lib","repository":{"type":"git","url":"git+https://github.com/stevenvachon/robot-directives.git"},"dependencies":{"deep-freeze-node":"^1.1.2","isbot":"^2.0.3","useragent":"^2.1.13"},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","mocha":"^3.3.0","nyc":"^10.3.2"},"engines":{"node":">= 6"},"scripts":{"ci":"npm run test && nyc report --reporter=text-lcov | coveralls","posttest":"nyc report --reporter=html","test":"nyc --reporter=text-summary mocha test.js --reporter=spec --check-leaks --bail"},"files":["lib"],"keywords":["crawlers","header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo","spiders"],"gitHead":"08a2d6888b608fafbdfbea6a01151d19a9720aa5","bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"homepage":"https://github.com/stevenvachon/robot-directives#readme","_id":"robot-directives@0.4.0-alpha","_shasum":"fe8bcbbc95e8894a63500cdf9c366cb56dc89000","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"fe8bcbbc95e8894a63500cdf9c366cb56dc89000","tarball":"https://registry.npmjs.org/robot-directives/-/robot-directives-0.4.0-alpha.tgz","integrity":"sha512-v59b1gmXYEjZUpNX23qr3bXF2OBkd+fnY2fLpB+PB3nYanDKMBpKuDWBMOgZNCr4BYdtQMFyg+VYjBoqWJ1WLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiyWkoYoSOyXXXIPRsW1/Wgs0RZmB3orhEoLyYBySrTQIhAJgHZkb+wiK1ZOL61n04yFdGOPAiWJRqQX1gOCT/fbL7"}]},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/robot-directives-0.4.0-alpha.tgz_1494545077631_0.8122251420281827"}},"0.4.0":{"name":"robot-directives","description":"Parse robot directives within HTML meta and/or HTTP headers.","version":"0.4.0","license":"MIT","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"https://www.svachon.com/"},"main":"lib","repository":{"type":"git","url":"git+https://github.com/stevenvachon/robot-directives.git"},"dependencies":{"deep-freeze-node":"^1.1.2","isbot":"^2.0.3","useragent":"^2.1.13"},"devDependencies":{"chai":"^3.5.0","coveralls":"^2.13.1","mocha":"^3.3.0","nyc":"^10.3.2"},"engines":{"node":">= 6"},"scripts":{"ci":"npm run test && nyc report --reporter=text-lcov | coveralls","posttest":"nyc report --reporter=html","test":"nyc --reporter=text-summary mocha test.js --reporter=spec --check-leaks --bail"},"files":["lib"],"keywords":["crawlers","header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo","spiders"],"gitHead":"08a2d6888b608fafbdfbea6a01151d19a9720aa5","bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"homepage":"https://github.com/stevenvachon/robot-directives#readme","_id":"robot-directives@0.4.0","_shasum":"fc6be018aac3f9ec5c9c8620d5e0dcd8cd841229","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"fc6be018aac3f9ec5c9c8620d5e0dcd8cd841229","tarball":"https://registry.npmjs.org/robot-directives/-/robot-directives-0.4.0.tgz","integrity":"sha512-SCIP0xxSCMomFYAFM+O8q4EC+tk5aVx2ZwqE9P04mLsph4CG3tS+6nrj8vjf8hXCEmW85LeY3Dp6Grc0VhqaRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGyzlqrJU1NwkkQTCSSJUno7a7NmK3i4vCL1ntrtgrjgIgfEk9eRzIDk3x3sRJ4PSI9yughJZzL/kmEebvSIVvgl0="}]},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/robot-directives-0.4.0.tgz_1494545091802_0.31193627254106104"}}},"readme":"# robot-directives [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]\n\n> Parse robot directives within HTML meta and/or HTTP headers.\n\n* `<meta name=\"robots\" content=\"noindex,nofollow\">`\n* `X-Robots-Tag: noindex,nofollow`\n* etc\n\nNote: this library is not responsible for parsing any HTML.\n\n\n## Installation\n\n[Node.js](http://nodejs.org/) `>= 6` is required. To install, type this at the command line:\n```shell\nnpm install robot-directives\n```\n\n## Usage\n```js\nconst RobotDirectives = require('robot-directives');\n\nconst robots = new RobotDirectives(options)\n  header('googlebot: noindex')\n  meta('bingbot', 'unavailable_after: 1-Jan-3000 00:00:00 EST')\n  meta('robots', 'noarchive,nocache,nofollow');\n\nrobots.is(RobotDirectives.NOFOLLOW);\n//-> true\n\nrobots.is([ RobotDirectives.NOFOLLOW, RobotDirectives.FOLLOW ]);\n//-> false\n\nrobots.isNot([ RobotDirectives.ARCHIVE, RobotDirectives.FOLLOW ]);\n//-> true\n\nrobots.is(RobotDirectives.NOINDEX, {\n  currentTime: () => new Date('jan 1 3001').getTime(),\n  userAgent: 'Bingbot/2.0'\n});\n//-> true\n\nRobotDirectives.isBot('googlebot');\n//-> true\n```\n\n\n## Constants\nFor use in comparison, the following directives are available as static properties on the constructor:\n* `ALL`\n* `ARCHIVE`\n* `CACHE`\n* `FOLLOW`\n* `IMAGEINDEX`\n* `INDEX`\n* `NOARCHIVE`\n* `NOCACHE`\n* `NOFOLLOW`\n* `NOIMAGEINDEX`\n* `NOINDEX`\n* `NONE`\n* `NOODP`\n* `NOSNIPPET`\n* `NOTRANSLATE`\n* `ODP`\n* `SNIPPET`\n* `TRANSLATE`\n\n\n## Methods\n\n### `header(value)`\nParses, stores and cascades the value of an `X-Robots-Tag` HTTP header.\n\n### `is(directive[, options])`\nValidates a directive or a list of directives against parsed instructions. `directive` can be a `String` or an `Array`. `options`, if defined, will override any such defined in the constructor during instantiation. A value of `true` is returned if all directives are valid.\n\n### `isNot(directive[, options])`\nInversion of `is()`. A value of `true` is returned if all directives are *not* valid.\n\n### `meta(name, content)`\nParses, stores and cascades the data within a `<meta>` HTML element.\n\n### `oneIs(directives[, options])`\nA variation of `.is()`. A value of `true` is returned if at least one directive is valid.\n\n### `oneIsNot(directives[, options])`\nInversion of `oneIs()`. A value of `true` is returned if at least one directive is *not* valid.\n\n\n## Functions\n\n### `isBot(botname)`\nReturns `true` if `botname` is a valid bot/crawler/spider name or user-agent.\n\n\n## Options\n\n### `allIsReadonly`\nType: `Boolean`  \nDefault value: `true`  \nDeclaring the `'all'` directive will not affect other directives when `true`. This is how most search crawlers perform.\n\n### `currentTime`\nType: `Function`  \nDefault value: `function(){ return Date.now() }`  \nThe date to use when checking if `unavailable_after` has expired.\n\n### `restrictive`\nType: `Boolean`  \nDefault value: `true`  \nDirective conflicts will be resolved by selecting the most restrictive value. Example: `'noindex,index'` will resolve to `'noindex'` because it is more restrictive. This is how Googlebot behaves, but others may differ.\n\n### `userAgent`\nType: `String`  \nDefault value: `''`  \nThe HTTP user-agent to use when retrieving instructions via `is()` and `isNot()`.\n\n\n[npm-image]: https://img.shields.io/npm/v/robot-directives.svg\n[npm-url]: https://npmjs.org/package/robot-directives\n[travis-image]: https://img.shields.io/travis/stevenvachon/robot-directives.svg\n[travis-url]: https://travis-ci.org/stevenvachon/robot-directives\n[coveralls-image]: https://img.shields.io/coveralls/stevenvachon/robot-directives.svg\n[coveralls-url]: https://coveralls.io/github/stevenvachon/robot-directives\n[david-image]: https://img.shields.io/david/stevenvachon/robot-directives.svg\n[david-url]: https://david-dm.org/stevenvachon/robot-directives\n","maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}],"time":{"modified":"2022-06-26T13:45:24.083Z","created":"2016-01-01T02:06:39.259Z","0.1.0":"2016-01-01T02:06:39.259Z","0.2.0":"2016-01-23T03:57:49.631Z","0.2.1":"2016-01-30T18:47:25.095Z","0.3.0":"2016-02-01T17:10:15.721Z","0.4.0-alpha":"2017-05-11T23:24:37.874Z","0.4.0":"2017-05-11T23:24:52.047Z"},"homepage":"https://github.com/stevenvachon/robot-directives#readme","keywords":["crawlers","header","html","http","meta","metadata","nofollow","noindex","robots","robots.txt","seo","spiders"],"repository":{"type":"git","url":"git+https://github.com/stevenvachon/robot-directives.git"},"author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"https://www.svachon.com/"},"bugs":{"url":"https://github.com/stevenvachon/robot-directives/issues"},"license":"MIT","readmeFilename":"README.md","users":{"keyn":true}}