{"_id":"f--l","_rev":"4-e21ba1b6a77d5d4b6f57e198caedcfd5","name":"f--l","description":"*foolishly simple bi-directional wildcards!*","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"f--l","version":"1.0.0","scripts":{"test":"mocha test"},"devDependencies":{"expect.js":"0.3.1","mocha":"^3.4.2"},"dependencies":{"es6-map":"0.1.5","lru-cache":"4.1.1"},"gitHead":"432c237efa9eaf9f1644a16160ac7ed6d03ac50b","description":"*foolishly simple bi-directional wildcards*","_id":"f--l@1.0.0","_shasum":"a0ec0b92b1fec3dc2c6d22db6961762cceff5b99","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"dist":{"shasum":"a0ec0b92b1fec3dc2c6d22db6961762cceff5b99","tarball":"https://registry.npmjs.org/f--l/-/f--l-1.0.0.tgz","integrity":"sha512-5g4QQluu19Y47OaxF/Szly3MONIVefuhcZMpyZvHu7ZWETmQRJcCC1CaUdYcKqSgJfEUYC6AE3I6RdR+R02fhA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBspaUaNksO94GOXAoa/Rl2lm2Yiwgx6E3+a3keOIQkbAiAAgifZXW9wd/5QA2iCo5RTYN4h04SlZlgTe4scKZifxg=="}]},"maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/f--l-1.0.0.tgz_1501167664248_0.7227652505971491"}},"1.0.1":{"name":"f--l","version":"1.0.1","scripts":{"test":"mocha test"},"devDependencies":{"expect.js":"0.3.1","mocha":"^3.4.2"},"dependencies":{"es6-map":"0.1.5","lru-cache":"4.1.1"},"gitHead":"56682ed8c2dd1da7473676cd0e6a37acd86dfca7","description":"*foolishly simple bi-directional wildcards*","_id":"f--l@1.0.1","_shasum":"62f8b0c777c33f5d03e4ccce8fdccba326eff73a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"dist":{"shasum":"62f8b0c777c33f5d03e4ccce8fdccba326eff73a","tarball":"https://registry.npmjs.org/f--l/-/f--l-1.0.1.tgz","integrity":"sha512-b9UjBDYyzTFUzwwldQxsXKMoMgzUN/5dOmCwrQ9V5AoBTLsKRSsijoPbmDBKkxyZte2f9dpoBACDhaK7mhbYoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEOQEeNbQCXkiEe5YQERSOHjtBWwj5bgDBUbF84hE+9wIgSYJxwBCJuXZUT5FkIVpInfqcW3pYEPCuS9MG9l9oR+k="}]},"maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/f--l-1.0.1.tgz_1501238438453_0.49287015618756413"}},"1.0.2":{"name":"f--l","version":"1.0.2","scripts":{"test":"mocha test"},"devDependencies":{"expect.js":"0.3.1","mocha":"^3.4.2"},"dependencies":{"es6-map":"0.1.5","lru-cache":"4.1.1"},"gitHead":"185258f6357bf93f844a7ecdf437e61fe1cb3ca8","description":"*foolishly simple bi-directional wildcards!*","_id":"f--l@1.0.2","_shasum":"6d8b249f9f44a3b418d907819711fe7df4d42623","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"dist":{"shasum":"6d8b249f9f44a3b418d907819711fe7df4d42623","tarball":"https://registry.npmjs.org/f--l/-/f--l-1.0.2.tgz","integrity":"sha512-sQPnamKifegCOnqYNvSXQgtm7iZ/D5HkA5sWNLJrYehzBhlX/ZLBel3J6yrfNmOyOhMpyAYzMagFfBjEXPOukQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGvQ8eS3eWJfnA+tfe73lpSbRK5LmvKIGyOvj2Q0OOblAiEAxW3uioiKI3yWy+DYW5Ibv/ZXiIqp9EFY33UyExkGwVs="}]},"maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/f--l-1.0.2.tgz_1501239021484_0.017678912030532956"}}},"readme":"# F--L\n*foolishly simple bi-directional wildcards!*\n\nFor the single directional wildcard, ie: test t*st, we adapted [matcher](https://github.com/sindresorhus/matcher/blob/master/index.js) to work for node 0.10 up to 8+\n\nIn the quest for the bi-directional wildcard, we have found a solution in converting the 2 search terms to a 2d matrix, which we iterate through to find diagonals, this is an adaption of [Levenshtein's distance algorithm](https://en.wikipedia.org/wiki/Levenshtein_distance) with wildcards\n\n#### quickstart\n\n```bash\n\nnpm i f--l --save\n\n```\n\n```javascript\n\nvar expect = require('expect.js');\nvar Fool = require('f--l');\n\nvar noFoolLikeA = new Fool({cache:1000});//caches replies, default is false\n\nexpect(noFoolLikeA.matches('*te*st/mat', '*t*e*s*t*')).to.be(true);\nexpect(noFoolLikeA.matches('*te*st/mat', '*te*st*')).to.be(true);\nexpect(noFoolLikeA.matches('*e*ma*', '*test/mat')).to.be(true);\nexpect(noFoolLikeA.matches('*i*g1', '*str*ing*')).to.be(true);\nexpect(noFoolLikeA.matches('*ing1', '*ring*')).to.be(true);\nexpect(noFoolLikeA.matches('*ing', 'test/long string*')).to.be(true);\nexpect(noFoolLikeA.matches('test/long string*', '*st*ing')).to.be(true);\nexpect(noFoolLikeA.matches('test/lo*', 'test/long string*')).to.be(true);\nexpect(noFoolLikeA.matches('*/test/match', '*st*')).to.be(true);\nexpect(noFoolLikeA.matches('*/test/match', '*st/blah')).to.be(false);\nexpect(noFoolLikeA.matches('*test/match', '/test/mar*')).to.be(false);\nexpect(noFoolLikeA.matches('/test/mat*', '*test/march')).to.be(false);\nexpect(noFoolLikeA.matches('*/short','/test/complex/and/short')).to.be(true);\nexpect(noFoolLikeA.matches('/test*/short','/test/complex/and/short')).to.be(true);\nexpect(noFoolLikeA.matches('*/short','/test/complex/and/long')).to.be(false);\nexpect(noFoolLikeA.matches('/test*/short','/test/complex/and/short/')).to.be(false);\n\n//for more f***ing around, have a look at the tests\n\n```\n\n#### performance:\n\n\n#### supported node versions:\n\nv0.10 - v8\n\n#### caveats\n\n- double wildcard matches are about 30% slower than single matches\n- synchronous/blocking (this may or may not be a caveat)\n- a wildcard is a placeholder for anything and nothing\n- this is quite experimental - if you want to use this to land aircraft or operate cranes, please test, test, test and get back to me if you find anything that doesnt work","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"time":{"modified":"2022-06-17T23:07:24.909Z","created":"2017-07-27T15:01:05.294Z","1.0.0":"2017-07-27T15:01:05.294Z","1.0.1":"2017-07-28T10:40:38.539Z","1.0.2":"2017-07-28T10:50:21.591Z"},"readmeFilename":"readme.md"}