{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/552","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/552/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/552/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/552/events","html_url":"https://github.com/NativeScript/NativeScript/issues/552","id":98911187,"number":552,"title":"Detect NativeScript as the environment","user":{"login":"TobiasHennig","id":3656893,"avatar_url":"https://avatars.githubusercontent.com/u/3656893?v=3","gravatar_id":"","url":"https://api.github.com/users/TobiasHennig","html_url":"https://github.com/TobiasHennig","followers_url":"https://api.github.com/users/TobiasHennig/followers","following_url":"https://api.github.com/users/TobiasHennig/following{/other_user}","gists_url":"https://api.github.com/users/TobiasHennig/gists{/gist_id}","starred_url":"https://api.github.com/users/TobiasHennig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobiasHennig/subscriptions","organizations_url":"https://api.github.com/users/TobiasHennig/orgs","repos_url":"https://api.github.com/users/TobiasHennig/repos","events_url":"https://api.github.com/users/TobiasHennig/events{/privacy}","received_events_url":"https://api.github.com/users/TobiasHennig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-04T08:01:16Z","updated_at":"2015-08-04T10:11:49Z","closed_at":null,"body":"I need to detect NativeScript as the environment to extend a script to use the NativeScript `file-system` module instead of the node `fs` module, but i don't know how to detect it.\r\n\r\nSomething like:\r\n```js\r\nif (typeof window === 'undefined') {\r\n    // It is node\r\n}\r\n\r\nif (typeof global !== 'undefined' && ???) {\r\n    // It is NativeScript\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/127555195","html_url":"https://github.com/NativeScript/NativeScript/issues/552#issuecomment-127555195","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/552","id":127555195,"user":{"login":"TobiasHennig","id":3656893,"avatar_url":"https://avatars.githubusercontent.com/u/3656893?v=3","gravatar_id":"","url":"https://api.github.com/users/TobiasHennig","html_url":"https://github.com/TobiasHennig","followers_url":"https://api.github.com/users/TobiasHennig/followers","following_url":"https://api.github.com/users/TobiasHennig/following{/other_user}","gists_url":"https://api.github.com/users/TobiasHennig/gists{/gist_id}","starred_url":"https://api.github.com/users/TobiasHennig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobiasHennig/subscriptions","organizations_url":"https://api.github.com/users/TobiasHennig/orgs","repos_url":"https://api.github.com/users/TobiasHennig/repos","events_url":"https://api.github.com/users/TobiasHennig/events{/privacy}","received_events_url":"https://api.github.com/users/TobiasHennig/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T10:11:49Z","updated_at":"2015-08-04T10:11:49Z","body":"Should i close this issue know?"}}