{"action":"created","issue":{"url":"https://api.github.com/repos/explorigin/es6-hx/issues/1","labels_url":"https://api.github.com/repos/explorigin/es6-hx/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/explorigin/es6-hx/issues/1/comments","events_url":"https://api.github.com/repos/explorigin/es6-hx/issues/1/events","html_url":"https://github.com/explorigin/es6-hx/issues/1","id":91426380,"number":1,"title":"Difference in specification between Haxe and ES6 String trimming","user":{"login":"back2dos","id":509501,"avatar_url":"https://avatars.githubusercontent.com/u/509501?v=3","gravatar_id":"","url":"https://api.github.com/users/back2dos","html_url":"https://github.com/back2dos","followers_url":"https://api.github.com/users/back2dos/followers","following_url":"https://api.github.com/users/back2dos/following{/other_user}","gists_url":"https://api.github.com/users/back2dos/gists{/gist_id}","starred_url":"https://api.github.com/users/back2dos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/back2dos/subscriptions","organizations_url":"https://api.github.com/users/back2dos/orgs","repos_url":"https://api.github.com/users/back2dos/repos","events_url":"https://api.github.com/users/back2dos/events{/privacy}","received_events_url":"https://api.github.com/users/back2dos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-27T07:05:35Z","updated_at":"2015-06-28T12:47:01Z","closed_at":null,"body":"The ES6 spec demands non-breaking spaces to be trimmed, while Haxe does not. Consider this assertion:\r\n\r\n```\r\nassertEquals(1, String.fromCharCode(0xA0).trim().length);\r\n```\r\n\r\nWith es6-hx it no longer holds. Given the semantics of non-breaking spaces, I would actually argue that  the Haxe behavior makes more sense.\r\n\r\nWhat really matters though, is that it should be consistent between all platforms."},"comment":{"url":"https://api.github.com/repos/explorigin/es6-hx/issues/comments/116273918","html_url":"https://github.com/explorigin/es6-hx/issues/1#issuecomment-116273918","issue_url":"https://api.github.com/repos/explorigin/es6-hx/issues/1","id":116273918,"user":{"login":"back2dos","id":509501,"avatar_url":"https://avatars.githubusercontent.com/u/509501?v=3","gravatar_id":"","url":"https://api.github.com/users/back2dos","html_url":"https://github.com/back2dos","followers_url":"https://api.github.com/users/back2dos/followers","following_url":"https://api.github.com/users/back2dos/following{/other_user}","gists_url":"https://api.github.com/users/back2dos/gists{/gist_id}","starred_url":"https://api.github.com/users/back2dos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/back2dos/subscriptions","organizations_url":"https://api.github.com/users/back2dos/orgs","repos_url":"https://api.github.com/users/back2dos/repos","events_url":"https://api.github.com/users/back2dos/events{/privacy}","received_events_url":"https://api.github.com/users/back2dos/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T12:47:01Z","updated_at":"2015-06-28T12:47:01Z","body":"I would suggest putting it in `js.Lib.trim` with a `@:require(es6)` or something.\r\n\r\nWhich just made me thing that It might make sense to introduce a `-D es=<version>` (or whatever the name) flag, so that one can do `@:require(es >= 6)` and `#if es >= 6`."}}