Skip to content

Commit

Permalink
Update STYLEGUIDE.md
Browse files Browse the repository at this point in the history
As per [sizzles comment](#262 (comment)) as being unfavorable add in `Promise`s from a previous issue into [Restrictions section](https://github.com/OpenUserJs/OpenUserJS.org/blob/master/STYLEGUIDE.md#restrictions)
  • Loading branch information
Martii committed Feb 28, 2016
1 parent e226101 commit a6e8f3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ The following **may not** be used:
* `eval()`
* `Function` constructor (it uses `eval()`)
* `with()` *(it can be highly inconsistent)*
* `Promise` *(unpredictable and considered unstable in some browser implementations at this time. Utilize callback structure with some standards of receiving `function optionalName(aArg1, aArg2, ..., aCallback)` and sending `function optionalName(aCallback, aArg1, aArg2, ...)` signatures for use with internal Code styling and async package including possible `aErr` argument parameter)*

Do not pass strings to `setTimeout` or `setInterval`. They use `eval()`. If you're trying to force a server side function to run asynchronously use [`setImmediate`](http://nodejs.org/api/timers.html#timers_setimmediate_callback_arg) *(or [`process.nextTick`](http://nodejs.org/api/process.html#process_process_nexttick_callback) if you really know what you're doing)*.

Expand Down

0 comments on commit a6e8f3f

Please sign in to comment.