{"action":"created","issue":{"url":"https://api.github.com/repos/paldepind/flyd/issues/27","labels_url":"https://api.github.com/repos/paldepind/flyd/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/paldepind/flyd/issues/27/comments","events_url":"https://api.github.com/repos/paldepind/flyd/issues/27/events","html_url":"https://github.com/paldepind/flyd/issues/27","id":85619510,"number":27,"title":"curryN code duplication","user":{"login":"queckezz","id":2580598,"avatar_url":"https://avatars.githubusercontent.com/u/2580598?v=3","gravatar_id":"","url":"https://api.github.com/users/queckezz","html_url":"https://github.com/queckezz","followers_url":"https://api.github.com/users/queckezz/followers","following_url":"https://api.github.com/users/queckezz/following{/other_user}","gists_url":"https://api.github.com/users/queckezz/gists{/gist_id}","starred_url":"https://api.github.com/users/queckezz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/queckezz/subscriptions","organizations_url":"https://api.github.com/users/queckezz/orgs","repos_url":"https://api.github.com/users/queckezz/repos","events_url":"https://api.github.com/users/queckezz/events{/privacy}","received_events_url":"https://api.github.com/users/queckezz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-05T19:53:19Z","updated_at":"2015-06-05T20:43:05Z","closed_at":null,"body":"I peaked into the source of flyd today. One thing I noticed that there is a curryN [implementation](https://github.com/paldepind/flyd/blob/master/flyd.js#L279-L385) which seems to be exactly the same as the one from ramda. If one uses ramda already, there is quite some code duplication.\r\n\r\nWhy did you choose to copy it into source instead of requiring the function? If it's an altered version maybe there's potential to merge it back into ramda?\r\n```js\r\nvar curryN = require('ramda/src/curryN')\r\n```\r\n\r\nAlso I think the boilerplate in the source belongs to a build step:\r\n```js\r\n\r\n(function (root, factory) {\r\n  if (typeof define === 'function' && define.amd) {\r\n    define([], factory); // AMD. Register as an anonymous module.\r\n  } else if (typeof exports === 'object') {\r\n    module.exports = factory(); // NodeJS\r\n  } else { // Browser globals (root is window)\r\n    root.flyd = factory();\r\n  }\r\n}(this, function () {\r\n```\r\nWe could use something like browserify to make a final bundle for those who aren't using `require()` on the client and distribute that:\r\n```bash\r\nbrowserify lib/index.js --standalone > flyd.js\r\n```\r\n\r\nJust my 2¢! All in all a seriously awesome library :) I'm also looking forward to play around with `snappdom` ;)\r\n"},"comment":{"url":"https://api.github.com/repos/paldepind/flyd/issues/comments/109433735","html_url":"https://github.com/paldepind/flyd/issues/27#issuecomment-109433735","issue_url":"https://api.github.com/repos/paldepind/flyd/issues/27","id":109433735,"user":{"login":"StreetStrider","id":2124761,"avatar_url":"https://avatars.githubusercontent.com/u/2124761?v=3","gravatar_id":"","url":"https://api.github.com/users/StreetStrider","html_url":"https://github.com/StreetStrider","followers_url":"https://api.github.com/users/StreetStrider/followers","following_url":"https://api.github.com/users/StreetStrider/following{/other_user}","gists_url":"https://api.github.com/users/StreetStrider/gists{/gist_id}","starred_url":"https://api.github.com/users/StreetStrider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StreetStrider/subscriptions","organizations_url":"https://api.github.com/users/StreetStrider/orgs","repos_url":"https://api.github.com/users/StreetStrider/repos","events_url":"https://api.github.com/users/StreetStrider/events{/privacy}","received_events_url":"https://api.github.com/users/StreetStrider/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T20:43:05Z","updated_at":"2015-06-05T20:43:05Z","body":"@queckezz, for such kind of situations the main reason is trying to keep this state of `package.json`:\r\n```js\r\n  \"dependencies\": {\r\n  },\r\n```\r\n:)"}}