max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
668 stars 114 forks source link

how to use in nativescript? #99

Open willin opened 8 years ago

willin commented 8 years ago
var ws = null

if (typeof WebSocket !== 'undefined') {
  ws = WebSocket
} else if (typeof MozWebSocket !== 'undefined') {
  ws = MozWebSocket
} else {
  ws = window.WebSocket || window.MozWebSocket
}

module.exports = ws

nativescript is some way like react native

and there is no window in it.

mcollina commented 8 years ago

We are happy to accept a pull request that enable support for nativescript.