{"name":"fairmont-multimethods","version":"1.0.0-beta-19","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","gitHead":"f6486012c2044a7334649cb914cc06c9cfca3a69","bugs":{"url":"https://github.com/dyoder/fairmont/issues"},"homepage":"https://github.com/dyoder/fairmont#readme","_id":"fairmont-multimethods@1.0.0-beta-19","_shasum":"d6d47c287ca401da5cdf398fabbc01dc795dadf4","_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":"d6d47c287ca401da5cdf398fabbc01dc795dadf4","tarball":"http://registry-npm.ywwl.com/fairmont-multimethods/download/fairmont-multimethods-1.0.0-beta-19.tgz","integrity":"sha512-znkqsWcdrHylgigzcMbxWbVgdwFzkqb4SsfByxftBjWR7ocWye2hi1utgEYvzCjDqWQXgxuZdr4mWcvRXpRcJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEoimfT4ST+TJ2mov7iR07yNq7FJlLNpxW73LGiOT7CQIhAJ886JSJE6vzrbyreD346qXQgEAJHLJ/2T0Zl/KVaQK1"}],"size":2773,"noattachment":false,"key":"/fairmont-multimethods/-/fairmont-multimethods-1.0.0-beta-19.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":1439245365249,"_cnpm_publish_time":1439245365249,"dist-tags":{"latest":"2.0.2"}}