ekalinin / robots.js

Parser for robots.txt for node.js
MIT License
66 stars 21 forks source link

Add getDisallowedPaths method #26

Closed skysteve closed 7 years ago

skysteve commented 7 years ago

Add a getDisallowedPaths method to return an array of all the paths explicitly blocked for the specified user agent AND the * "UA".

Note: I couldn't work out how the tests executed so I wrote a quick test runner

const tests = require('./tests/parser.test');

Object.keys(tests).forEach((testName) => {
  console.log(testName);
  tests[testName]();
});

but that flagged up that that the assert.eql method doesn't exist in node 8, so I had to change the tests that relied on it to strictEqual or deepEqual.

Any issues please let me know 🙂

ekalinin commented 7 years ago

There're no issues (at first glance ;))! Great patch! Thank you very much!

skysteve commented 7 years ago

no worries, if you could give me a shout when you've done the release that would be much appreciated 🙂

ekalinin commented 7 years ago

Done: