{"_id":"chai-fuzzy","_rev":"25-86a52f71d2cb50d55bc68e36c4f01ff2","name":"chai-fuzzy","description":"fuzzy matchers for chai","dist-tags":{"latest":"1.6.1"},"versions":{"0.0.1":{"name":"chai-fuzzy","version":"0.0.1","description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":"","license":"MIT","devDependencies":{"chai":"~1.2.0","mocha":"~1.5.0","nodemon":"~0.6.23"},"dependencies":{"underscore":"~1.4.1"},"_id":"chai-fuzzy@0.0.1","dist":{"shasum":"e15e05ebfd4093d4de8997a64357a9fdf987f651","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-0.0.1.tgz","integrity":"sha512-qFFPN4WgYHErbrKQleKrcsFik//tohdO9Zvp2ZcU0Iy+ao6YK9b5ePDM1Ty3DqOuh78rf907ECfZD4l42RmphQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuA69XYLeM2jj/TfsCmuFJRa6E0L7vcEPbF7FJ0wdxFAiAmLjSBOLEyHl/lM9kTzTo6cASwWIvsczQGgQdb0ac72Q=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"elliotf","email":"efoster+opensource@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}],"directories":{}},"1.0.0":{"name":"chai-fuzzy","version":"1.0.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":"","license":"MIT","devDependencies":{"chai":"~1.2.0","mocha":"~1.5.0","nodemon":"~0.6.23"},"dependencies":{"underscore":"~1.4.1"},"_id":"chai-fuzzy@1.0.0","dist":{"shasum":"5f3fb01ece4f72a1365ac3a9e21a89f1c4880483","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.0.0.tgz","integrity":"sha512-Q7E0X+8VAOn7/nShoIlkqR1vLW75qwASW++BkB+A7yvDMWs7bHTjoVfwv7d2RtcL1vlW/SacYmV4z4AFyimHfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCut3sCNWNVo1eIBCEQH8eKoG9/j1Lpdhm3kIr0v/15wIhANx+Enb+pcwlrsG6TcJyl0dTNYhqxx/WZcRXr/QFYnJF"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"elliotf","email":"efoster+opensource@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.1.0":{"name":"chai-fuzzy","version":"1.1.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":"","license":"MIT","devDependencies":{"chai":"~1.2.0","mocha":"~1.6.0","nodemon":"~0.6.23"},"dependencies":{"underscore":"~1.4.1"},"_id":"chai-fuzzy@1.1.0","dist":{"shasum":"d64ca6236b26e72976bc15a5f3f8ed1ad1c7dc1d","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.1.0.tgz","integrity":"sha512-mLLNPW1j/+s8BUL9Gjv+c7sjBX8R5u6GAMASndEkBNpg8D9l5mUMkgckme4Xl1WelgH+I0OwyeS6bRz0vmkbXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnYf5niot69pL8DPmY7MzO+Bh+26MA95Cw4y7GdQq1LwIgJ4CfN7zoWib5Mr3KY+FVVCCWecucZANwyFl+cShqJDc="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"elliotf","email":"efoster+opensource@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.1.1":{"name":"chai-fuzzy","version":"1.1.1","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":"","license":"MIT","devDependencies":{"chai":"~1.2.0","mocha":"~1.6.0","nodemon":"~0.6.23"},"dependencies":{"underscore":"~1.4.1"},"_id":"chai-fuzzy@1.1.1","dist":{"shasum":"bcced7da4918e3319c702112f5be43d0ecaeca39","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.1.1.tgz","integrity":"sha512-GqCW8f/Oy4NCtZkS7xrBvMTphbYdLoR8xP01/IqzUGVfrxuvn7ka/hKeTgDQZ/tsoWVLV2DrwgQ+cPetQLwp0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUktJ6FKY1NVc8rc14V3LScNkvuv65VyDZBFNbSpkZXwIhAPEnffzWuKz1HTsmbZYpyj8wF3Az0sOcMdaUiNBABbNL"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"elliotf","email":"efoster+opensource@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.2.0":{"name":"chai-fuzzy","version":"1.2.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":"","license":"MIT","devDependencies":{"chai":"~1.2.0","mocha":"~1.6.0","nodemon":"~0.6.23"},"dependencies":{"underscore":"~1.4.1"},"_id":"chai-fuzzy@1.2.0","dist":{"shasum":"c5c7d236bb69bd4425c96522fee2fc77b2fe08de","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.2.0.tgz","integrity":"sha512-TJHO9UGNE0L/ifRMXMuUycIgdehKs7/thxoFvxaavk0vF6bY//I1mYU5ksnY07Zs9by99wORUcfPmQbwranVUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBws2jxfa2LSZ55aieAr55IxFewHlSLh8SUVoFp+3wPwAiBVkWuiE2Q30Nsgk7tfeu1xZ2X+AdcT9s+jwYujldKQTA=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"elliotf","email":"efoster@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.3.0":{"name":"chai-fuzzy","version":"1.3.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":"","license":"MIT","devDependencies":{"chai":"~1.2.0","mocha":"~1.6.0","nodemon":"~0.6.23"},"dependencies":{"underscore":"~1.4.1"},"bugs":{"url":"https://github.com/elliotf/chai-fuzzy/issues"},"_id":"chai-fuzzy@1.3.0","dist":{"shasum":"d2010304228cd354e5ece5be714460c74f19ecf8","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.3.0.tgz","integrity":"sha512-rMzjAP3Dkyow0OeMvGLK9gyutGAwSEqTEgg2RM7PxxmwubtP1jVbw1si4ZN76OVW6RbYX9IwjOyaOqQ4VIyHIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKUgIQ0++a01WzmwuR+nOsikSxw9Qrzf93RgweKSx1JQIgK8uh2c1MZA0MyHXej6kWJahXepskWNvo9VM1ejYxTko="}]},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"elliotf","email":"efoster@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.4.0":{"name":"chai-fuzzy","version":"1.4.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":{"name":"Elliot Foster"},"license":"MIT","devDependencies":{"chai":"~1","mocha":"~1","nodemon":"~0","underscore":"~1"},"peerDependencies":{"chai":"~1","underscore":"~1"},"engines":{"npm":">= 1.2"},"bugs":{"url":"https://github.com/elliotf/chai-fuzzy/issues"},"homepage":"https://github.com/elliotf/chai-fuzzy","_id":"chai-fuzzy@1.4.0","dist":{"shasum":"b0eec1b9ec220bab1fbcbcf0a45227c78543f0ea","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.4.0.tgz","integrity":"sha512-s0p94g02GKV0y4TK59UafKT+C8i1IGxlI+VK0Wq6rti437eSCvnvUfgyrM0e41ECsN9bDnLUwgpP8So33/eDjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAW2BmVxR+owFe5hTvwoGuMHfgbE+fp0fnZUWQNjxRXKAiEAjD2GoJlAWUf+FiwAAB2i1NSxzfoYMhYM1KB2LSYIS54="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"elliotf","email":"efoster@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.5.0":{"name":"chai-fuzzy","version":"1.5.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":{"name":"Elliot Foster"},"license":"MIT","devDependencies":{"chai":">=1.0.0","mocha":">=1.0.0","underscore":">= 1.0.0"},"peerDependencies":{"chai":">= 1.0.0"},"engines":{"npm":">= 1.2"},"gitHead":"2d6df13d976ee38eb06612abbce9d68345b4236d","bugs":{"url":"https://github.com/elliotf/chai-fuzzy/issues"},"homepage":"https://github.com/elliotf/chai-fuzzy","_id":"chai-fuzzy@1.5.0","_shasum":"017214ae189eee8fd8c5691b41d66bd46ed0b18b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"elliotf","email":"efoster@firetaco.com"},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}],"dist":{"shasum":"017214ae189eee8fd8c5691b41d66bd46ed0b18b","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.5.0.tgz","integrity":"sha512-gfwhmG0J2hipkpFb8gYD3O1O3gN0Euke/+sQRZX0vwZs8RZCL/aqWTvDhlZvJbvqw39yjQS+1tUaV0myTFbWhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEXmZIs6lmPjM+7agNQlT2MS7AXIMgY+wZ2rL1/aaPJsAiEA1iojLqgz5rRS1Y7DvMAQ56682CitmaSeIKApuusIpDo="}]}},"1.6.0":{"name":"chai-fuzzy","version":"1.6.0","keywords":["chai","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":{"name":"Elliot Foster"},"license":"MIT","dependencies":{"underscore":">= 1.0.0"},"devDependencies":{"chai":">=1.0.0","mocha":">=1.0.0"},"peerDependencies":{"chai":">= 1.0.0"},"engines":{"npm":">= 1.2"},"gitHead":"269c01e9047494dc3f2aaef32dd15b49fb78cc75","bugs":{"url":"https://github.com/elliotf/chai-fuzzy/issues"},"homepage":"https://github.com/elliotf/chai-fuzzy#readme","_id":"chai-fuzzy@1.6.0","_shasum":"e3eeba920ec52d4034d6c07964074c3c3ab07359","_from":".","_npmVersion":"2.13.5","_nodeVersion":"0.10.25","_npmUser":{"name":"elliotf","email":"efoster@firetaco.com"},"dist":{"shasum":"e3eeba920ec52d4034d6c07964074c3c3ab07359","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.6.0.tgz","integrity":"sha512-8YeEjtRiqQFnPNbV7QE8WF6T/PEMBRMXCZXmZ3eHEBPlfu/yNEy0j2V8X9GBhhphTCQeWh56OXgwWIh+QkWWUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDX8FNXLAw4e+ZG2q2EGVddIyzELgHVi1uuaReOt+8awgIgckZKdFAzOQ4461onpilEU2CbZVIs45SoTbKqXcxmdcQ="}]},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}]},"1.6.1":{"name":"chai-fuzzy","version":"1.6.1","keywords":["chai","chai-plugin","browser","array","testing","jasmine"],"description":"fuzzy matchers for chai","main":"index.js","scripts":{"test":"mocha test"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":{"name":"Elliot Foster"},"license":"MIT","dependencies":{"underscore":">= 1.0.0"},"devDependencies":{"chai":">=1.0.0","mocha":">=1.0.0"},"peerDependencies":{"chai":">= 1.0.0"},"engines":{"npm":">= 1.2"},"gitHead":"523955093d5dce8cd1dc228539b0f86220f3bbb6","bugs":{"url":"https://github.com/elliotf/chai-fuzzy/issues"},"homepage":"https://github.com/elliotf/chai-fuzzy#readme","_id":"chai-fuzzy@1.6.1","_shasum":"acd0a27e03e3c251b254a5b308c70ef5fe3421fc","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"elliotf","email":"efoster@firetaco.com"},"dist":{"shasum":"acd0a27e03e3c251b254a5b308c70ef5fe3421fc","tarball":"https://registry.npmjs.org/chai-fuzzy/-/chai-fuzzy-1.6.1.tgz","integrity":"sha512-m8vDyJcuuwL/e605ZxRbjPVPsGYdruIQAfpj/q2q/7ax3eaI96cKsYMf6RwjvAPPlcHDXWTvCnDWjFXniTy5FQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2cPBkEHJ2tojC00i2mjhK36PnBYAohK/ABZzSIxewQAiEAw9uAt4mnrIaFGqes4gAHrojkQlhdn+1o/jqHw9Qb70w="}]},"maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/chai-fuzzy-1.6.1.tgz_1458175281893_0.7577755614183843"}}},"readme":"# chai-fuzzy\n\nFuzzy matchers for chai based on underscore and inspired by jasmine.\n\nMake assertions that values have all the same attributes and values without asserting strict object equality.\n\n[![Build Status](https://travis-ci.org/elliotf/chai-fuzzy.png)](https://travis-ci.org/elliotf/chai-fuzzy)\n\n## Using\n\nAlso see the [tests](https://github.com/elliotf/chai-fuzzy/tree/master/test/) and [examples](https://github.com/elliotf/chai-fuzzy/tree/master/examples/).\n\n### browser-side\n\ninclude chai fuzzy after chai and underscore:\n\n    <script src=\"underscore.js\"></script>\n    <script src=\"chai.js\"></script>\n    <script src=\"chai-fuzzy.js\"></script>\n\n### server-side\n\nhave chai use chai-fuzzy:\n\n    var chai = require('chai');\n    chai.use(require('chai-fuzzy'));\n\n## Assertions\n\n\n### like(value)\n\ncompare object attributes and values rather than checking to see if they're the same reference\n\n    var subject = {a: 'a'};\n    subject.should.be.like({a: 'a'});\n    subject.should.not.be.like({x: 'x'});\n    subject.should.not.be.like({a: 'a', b: 'b'});\n\n    expect(subject).to.be.like({a: 'a'});\n    expect(subject).not.to.be.like({x: 'x'});\n    expect(subject).not.to.be.like({a: 'a', b: 'b'});\n\n    assert.like(subject, {a: 'a'});\n    assert.notLike(subject, {x: 'x'});\n    assert.notLike(subject, {a: 'a', b: 'b'});\n\n    var subject = ['a'];\n    subject.should.be.like(['a']);\n    subject.should.not.be.like(['x']);\n    subject.should.not.be.like(['a', 'b']);\n\n    expect(subject).to.be.like(['a']);\n    expect(subject).not.to.be.like(['x']);\n    expect(subject).not.to.be.like(['a', 'b']);\n\n    assert.like(subject, ['a']);\n    assert.notLike(subject, ['x']);\n    assert.notLike(subject, ['a', 'b']);\n\n## containOneLike(value)\n\ncheck the first level of the container for a value like the one provided\n\n    var subject = {\n      a:   'alphabet'\n      , b: 'butternut'\n      , c: {\n        name:       'chowder'\n        , attributes: [\n          'scales'\n          , 'fins'\n        ]\n      }\n      , x: 'xylophone'\n      , z: 'xylophone'\n    };\n    subject.should.containOneLike({\n      name:         'chowder'\n      , attributes: [\n        'scales', 'fins'\n      ]\n    });\n    subject.should.not.containOneLike({\n      name:         'chowder'\n      , attributes: [\n        'scales', 'fins', 'cream'\n      ]\n    });\n\n    subject.should.containOneLike('xylophone');\n    subject.should.not.containOneLike('cow patties');\n\n    expect(subject).to.containOneLike('xylophone');\n    expect(subject).to.not.containOneLike('cow patties');\n\n    assert.containOneLike(subject, 'xylophone');\n    assert.notContainOneLike(subject, 'cow patties');\n\n    // same for arrays\n\n# jsonOf(value)\n\ncheck that the given javascript object is like the JSON-ified expected value.  Useful for checking stringification and parsing of an object.\n\n    var apple = {\n      skin: 'thin'\n      , colors: ['red', 'green', 'yellow']\n      , isFruit: true\n      , picked: new Date()\n    };\n    var orange = {\n      skin: 'thin'\n      , colors: ['red', 'green', 'yellow']\n      , isFruit: true\n      , picked: new Date()\n    };\n    // here appleJSON would be the json result of some process like a JSON api\n    var appleJSON  = JSON.parse(JSON.stringify(apple));\n\n    appleJSON.should.be.jsonOf(apple);\n    appleJSON.should.not.be.jsonOf(orange);\n\n    expect(appleJSON).to.be.jsonOf(apple);\n    expect(appleJSON).to.not.be.jsonOf(orange);\n\n    assert.jsonOf(appleJSON, apple);\n    assert.notJsonOf(appleJSON, orange);\n\n# Thanks\n\nThanks to [Davis](http://github.com/infews/ \"Davis\") for passing along the idea of using underscore rather than cribbing parts of jasmine.\n\nThanks to [Bart van der Schoor](https://github.com/Bartvds \"Bart van der Schoor\") for adding assert-style compatibility\n\n","maintainers":[{"name":"elliotf","email":"efoster+opensource@firetaco.com"}],"time":{"modified":"2022-06-13T05:50:59.362Z","created":"2012-10-02T19:38:08.918Z","0.0.1":"2012-10-02T19:38:10.533Z","1.0.0":"2012-10-02T20:34:13.931Z","1.1.0":"2012-10-07T19:12:49.860Z","1.1.1":"2012-12-27T20:17:05.341Z","1.2.0":"2013-02-08T18:56:28.059Z","1.3.0":"2013-06-11T18:51:03.001Z","1.4.0":"2013-12-08T21:33:30.328Z","1.5.0":"2015-03-18T06:32:57.277Z","1.6.0":"2015-08-17T14:36:04.021Z","1.6.1":"2016-03-17T00:41:24.092Z"},"repository":{"type":"git","url":"git://github.com/elliotf/chai-fuzzy.git"},"author":{"name":"Elliot Foster"},"homepage":"https://github.com/elliotf/chai-fuzzy#readme","keywords":["chai","chai-plugin","browser","array","testing","jasmine"],"bugs":{"url":"https://github.com/elliotf/chai-fuzzy/issues"},"license":"MIT","readmeFilename":"README.md"}