You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix some broken link anchors for nodejs API and move all to bottom link references
* Some http to https as per OpenUserJS#915
* Some redirects resolved
Copy file name to clipboardExpand all lines: STYLEGUIDE.md
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ Generally, use line comments. Save block comments for formal documentation and f
155
155
**Variable and function names should be clearly descriptive of what they contain, in the context of the application**.
156
156
157
157
Names should be formed from the 26 upper and lower case letters *(A-Z, a-z)*, the 10 digits _(0-9)_, and the underscore *(_)*.
158
-
Avoid use of international characters because they may not read well or be understood everywhere and may cause [BOM][WIKIPEDIABOM]s to appear. Do not use the dollar sign *($)* or backslash *(\)* in names.
158
+
Avoid use of international characters because they may not read well or be understood everywhere and may cause [BOM][wikipediaBOM]s to appear. Do not use the dollar sign *($)* or backslash *(\)* in names.
159
159
160
160
Do not use an underscore *(_)* as the first character of a name. It is sometimes used to indicate privacy, but it does not actually provide privacy.
161
161
If privacy is important, use the forms that provide private members. Avoid conventions that demonstrate a lack of competence.
@@ -389,7 +389,7 @@ The following **may not** be used:
389
389
*`with()`*(it can be highly inconsistent)*
390
390
*`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)*
391
391
392
-
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)*.
392
+
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`][nodejsTimersSetImmediate]*(or [`process.nextTick`][nodejsProcessProcessnextTick] if you really know what you're doing)*.
393
393
394
394
`parseInt()` must be used with a radix parameter, e.g.,
395
395
```javascript
@@ -398,11 +398,13 @@ var i = parseInt(num, 10); // base 10 - decimal system
398
398
399
399
Read more on the [awful parts of JavaScript][awfulparts].
0 commit comments