Skip to content

Commit

Permalink
Merge pull request #60 from KrisSiegel/5.0.1
Browse files Browse the repository at this point in the history
5.0.1 - tweaked documentation and added sponsor
  • Loading branch information
KrisSiegel authored Aug 28, 2016
2 parents dc51e22 + 34a93fd commit 9d2e634
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![msngr.js](https://github.com/KrisSiegel/msngr.js/raw/master/resources/logo.png "msngr.js logo")
<img src="https://github.com/KrisSiegel/msngr.js/raw/master/resources/logo.png" alt="msngr.js logo" title="msngr.js logo" style="float: right" />

Messaging is a powerful development pattern that makes decoupling components and providing internal APIs incredibly easy. The primary goal of msngr is to provide a high quality, asynchronous method of consuming and emitting messages that work in both node and the web browser.

Expand Down Expand Up @@ -140,7 +140,7 @@ var mache = msngr.mache({
```

### msngr.immediate()
So if you want to create an asynchronous process many developers turn to ```setTimeout(fn, 0);``` but that's actually rather slow to execute in web browsers (typically values less than 10 or so are ignored). Using ```setImmediate(fn)``` is a far better choice but it's mostly in node and IE. This is where ```msngr.immediate(fn)``` comes in. There is a way to simulate ```setImmediate(fn)``` when it doesn't exist in a web browser so ```msngr.immediate(fn)``` will use whatever the fastest solution that exists on the platform it is running on to execute something asynchronously.
So if you want to create an asynchronous process many developers turn to ```setTimeout(fn, 0);``` but that's actually rather slow to execute in web browsers (typically values less than 10 or so are ignored and even 0 isn't guaranteed to execute immediately). Using ```setImmediate(fn)``` is a far better choice but it's almost exclusively available in node and IE. This is where ```msngr.immediate(fn)``` comes in. There is a way to simulate ```setImmediate(fn)``` when it doesn't exist in a web browser so ```msngr.immediate(fn)``` will use whatever the fastest solution that exists on the platform it is running on to execute something asynchronously.

```javascript
msngr.immediate(function () {
Expand All @@ -149,7 +149,13 @@ msngr.immediate(function () {

```

#### Getting in contact
### Sponsor
<p>
<img src="https://github.com/KrisSiegel/msngr.js/raw/master/resources/simex-logo.png" alt="msngr.js logo" title="msngr.js logo" style="float: right; height: 60px;" />

msngr.js development is sponsored by [Simex](https://www.simex.io/), an aspiring start-up looking to make a dent in artificial intelligence and data aggregation. Follow [@HeySimex](https://twitter.com/heysimex) on Twitter!</p>

#### Contact
For questions, news, and whatever else that doesn't fit in GitHub issues you can follow me [@KrisSiegel](https://twitter.com/KrisSiegel)

Copyright © 2014-2016 Kris Siegel
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "msngr.js",
"main": "msngr.min.js",
"description": "msngr.js is an asynchronous messaging library, written in JavaScript, for node and browser use",
"version": "5.0.0",
"version": "5.0.1",
"homepage": "https://github.com/KrisSiegel/msngr.js",
"authors": [
"Kris Siegel"
Expand Down
2 changes: 1 addition & 1 deletion msngr.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var msngr = msngr || (function () {
};

// Built version of msngr.js for programatic access; this is auto generated
external.version = "5.0.0";
external.version = "5.0.1";

// Takes a function, executes it passing in the external and internal interfaces
external.extend = function (fn) {
Expand Down
2 changes: 1 addition & 1 deletion msngr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "msngr",
"main": "msngr.js",
"description": "An asynchronous messaging library, written in JavaScript, for node and browser use",
"version": "5.0.0",
"version": "5.0.1",
"keywords": [
"message",
"messaging",
Expand Down
Binary file added resources/simex-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var msngr = msngr || (function () {
};

// Built version of msngr.js for programatic access; this is auto generated
external.version = "5.0.0";
external.version = "5.0.1";

// Takes a function, executes it passing in the external and internal interfaces
external.extend = function (fn) {
Expand Down

0 comments on commit 9d2e634

Please sign in to comment.