Comments (3)
Webpack ends up shimming setImmediate
, if that's what you're wondering. I traced the shim though node-libs-browser to the setImmediate
package, if you're interested in the implementation.
The use of setImmediate
was inherited from node-nats
, so I defer to that for explanation. Perhaps a setTimeout(..., 0)
would be better, but I prefer to keep nats.js
as close to the node-nats
implementation as possible and just shim the node APIs.
from websocket-nats.
Thanks for the quick response. I was attempting to make the library work in a Meteor client.
Since Meteor doesn't shim setImmediate nor support the object form of the "browser" property in package.json, I ended up forking the project and patching both issues.
from websocket-nats.
I hadn't considered browser consumption of the library without using webpack, certainly it would be more convenient to not depend on webpack's shims for use cases like yours. It may make sense to merge those patches back here, although my initial impression is that there may be a way to shim without webpack, that way the library can be used in a nodejs environment.
from websocket-nats.
Related Issues (13)
- node-nats has new update for token authn HOT 2
- websocket-nats is not working as expected with webpack version 2 and above
- Using websocket-nats in NodeJS HOT 1
- Does this client support NATS streaming protocol? HOT 2
- Binary data transfert HOT 2
- Then recent nats-server already support websocket
- websocket-nats halt firefox,seems a infinite loop HOT 3
- websocket connect with hostname and pathname HOT 1
- websocket-nats can't publish binary message(Uint8Array) HOT 4
- output a unuglify and not minimize js file for dev HOT 2
- Bad decoding for languages other than English
- TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object. HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocket-nats.