{"name":"fairmont-multimethods","version":"1.0.0-beta-18","description":"Functional reactive programming in JavaScript","files":["src/","lib/","README.md"],"main":"lib/index.js","scripts":{"prepublish":"coffee --nodejs --harmony -o lib/ -c src/*.*coffee","test":"coffee --nodejs --harmony test/index.coffee","watch":"coffee --nodejs --harmony -o lib/ -cw src/*.*coffee","version":"(node_modules/.bin/json -f package.json version > VERSION)","tag":"(cat VERSION | xargs -I version git tag -am version version) && git push --tags"},"repository":{"type":"git","url":"git://github.com/dyoder/fairmont.git"},"keywords":[],"authors":["Dan Yoder"],"license":"ISC","devDependencies":{"amen":"^1.0.0-alpha-03","json":"^9.0.3"},"dependencies":{},"engine":"node >= 0.12.x","bugs":{"url":"https://github.com/dyoder/fairmont/issues"},"homepage":"https://github.com/dyoder/fairmont#readme","_id":"fairmont-multimethods@1.0.0-beta-18","_shasum":"0a64e7fce3eb33515d9c5979242df83066c20cd8","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.6","_npmUser":{"name":"dyoder","email":"danielyoder@gmail.com"},"maintainers":[{"name":"dyoder","email":"danielyoder@gmail.com"}],"dist":{"shasum":"0a64e7fce3eb33515d9c5979242df83066c20cd8","tarball":"http://registry-npm.ywwl.com/fairmont-multimethods/download/fairmont-multimethods-1.0.0-beta-18.tgz","integrity":"sha512-0OPO8j8Gqeub5I/ELfpQj1zTuMgEzIdlv+1YOCdO6MVRoTh8aX3eFl5Gonyq81nyIpE69owP/sNXtzWL0EoxaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX/kRfknLuiNz+TeJM00VoEdbu8SuZZhDNE88R9MBTZAIhANTnvF32GMhnXyK7J0iF4A9JMTcSGAUuJp9IJnpgwgGd"}],"size":3840,"noattachment":false,"key":"/fairmont-multimethods/-/fairmont-multimethods-1.0.0-beta-18.tgz"},"directories":{},"readme":"# Fairmont-Multimethods\n\nFairmont-Multimethods is a JavaScript library providing support for multimethods in JavaScript.\n\n## Installation\n\n`npm i -S fairmont-multimethods`\n\n## Usage\n\n```coffee\n\nequal = Method.create\n  description: \"'Deep' equality operator\"\n  default: (a, b) -> a == b # fallback to shallow equality\n\n# when comparing objects, recursively check the values\n# corresponding to the union of their properties—\n# return false on the first inequality\nMethod.define equal, isObject, isObject, (a, b) ->\n  (a == b) || do ->\n    keys = new Set (Object.keys a)..., (Object.keys b)...\n    for key from keys\n      if ! equal a[key], b[key]\n        return false\n    true\n\n# when comparing arrays, recursively check values\n# after making sure they're the same length\n# return false on the first inequality\nMethod.define equal, isArray, isArray, (ax, bx) ->\n  (ax == bx) || do ->\n    return false if ax.length != bx.length\n    for i in [0..ax.length]\n      if !equal ax[i], bx[i]\n        return false\n    true\n\nequal \"this\", \"this\"  # => true, shallow equality works here\nequal { x: 1, y: 2 }, { x: 1, y: 2 } # => true, deep equality\nequal [1..5], [1..5] # true, deep equality\nequal { x: 1, y: 2}, [1..5] # false\n```\n\n[API documentation](https://github.com/pandastrike/fairmont/wiki/API-Reference#method).\n","publish_time":1437363679463,"_cnpm_publish_time":1437363679463,"dist-tags":{"latest":"2.0.2"}}