{"action":"opened","issue":{"url":"https://api.github.com/repos/philbooth/check-types.js/issues/32","labels_url":"https://api.github.com/repos/philbooth/check-types.js/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/philbooth/check-types.js/issues/32/comments","events_url":"https://api.github.com/repos/philbooth/check-types.js/issues/32/events","html_url":"https://github.com/philbooth/check-types.js/issues/32","id":54098021,"number":32,"title":"Turn check.assert into a function","user":{"login":"philbooth","id":64367,"avatar_url":"https://avatars.githubusercontent.com/u/64367?v=3","gravatar_id":"","url":"https://api.github.com/users/philbooth","html_url":"https://github.com/philbooth","followers_url":"https://api.github.com/users/philbooth/followers","following_url":"https://api.github.com/users/philbooth/following{/other_user}","gists_url":"https://api.github.com/users/philbooth/gists{/gist_id}","starred_url":"https://api.github.com/users/philbooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbooth/subscriptions","organizations_url":"https://api.github.com/users/philbooth/orgs","repos_url":"https://api.github.com/users/philbooth/repos","events_url":"https://api.github.com/users/philbooth/events{/privacy}","received_events_url":"https://api.github.com/users/philbooth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-12T19:48:28Z","updated_at":"2015-01-12T19:48:28Z","closed_at":null,"body":"In addition to the modified predicates on `check.assert`, `check.assert` itself should be invokable. This would enable easy throwing against predicates that are not implemented inside the library. The implementation would be as simple as:\r\n\r\n```javascript\r\nfunction assert (value, message) {\r\n    if (value === false) {\r\n        throw new Error(message || 'Assertion failed');\r\n    }\r\n}\r\n```\r\n\r\nThe modified predicates would then be added as properties of this function object."}}