{"action":"opened","issue":{"url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/45","labels_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/45/comments","events_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/45/events","html_url":"https://github.com/stampit-org/stamp-specification/issues/45","id":109671606,"number":45,"title":"Initialiser instance replacement conditions","user":{"login":"koresar","id":1622575,"avatar_url":"https://avatars.githubusercontent.com/u/1622575?v=3","gravatar_id":"","url":"https://api.github.com/users/koresar","html_url":"https://github.com/koresar","followers_url":"https://api.github.com/users/koresar/followers","following_url":"https://api.github.com/users/koresar/following{/other_user}","gists_url":"https://api.github.com/users/koresar/gists{/gist_id}","starred_url":"https://api.github.com/users/koresar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koresar/subscriptions","organizations_url":"https://api.github.com/users/koresar/orgs","repos_url":"https://api.github.com/users/koresar/repos","events_url":"https://api.github.com/users/koresar/events{/privacy}","received_events_url":"https://api.github.com/users/koresar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-04T09:41:23Z","updated_at":"2015-10-04T09:41:23Z","closed_at":null,"body":"I want my stamp to return `null` in some cases:\r\n```js\r\nconst stamp = compose({ initializers: [({ condition }) => {\r\n  if (!condition) {\r\n    return 0;\r\n  }\r\n}]});\r\n\r\nlet myObject = stamp({ condition: false }) || otherLogicGoesHere();\r\n```\r\n\r\nCurrent specs say: \r\n> If the initializer returns a different object, it replaces the instance.\r\n\r\nAnd I think this is correct. I consider `NaN`, `0`, `''` and `null` objects. We should be more clear on that:\r\n> If the initializer **does not** return `undefined`, it replaces the instance.\r\n\r\nAgree?"}}