-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
4,155 additions
and
959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict'; | ||
|
||
const codes = {}; | ||
|
||
function createErrorType(name) { | ||
function E(message) { | ||
if (!Error.captureStackTrace) | ||
this.stack = (new Error()).stack; | ||
else | ||
Error.captureStackTrace(this, this.constructor); | ||
this.message = message; | ||
} | ||
E.prototype = new Error(); | ||
E.prototype.name = name; | ||
E.prototype.constructor = E; | ||
|
||
codes[name] = E; | ||
} | ||
|
||
createErrorType('ERR_INVALID_OPT_VALUE'); | ||
createErrorType('ERR_INVALID_ARG_TYPE'); | ||
createErrorType('ERR_STREAM_PUSH_AFTER_EOF'); | ||
createErrorType('ERR_METHOD_NOT_IMPLEMENTED'); | ||
createErrorType('ERR_STREAM_PUSH_AFTER_EOF'); | ||
|
||
module.exports.codes = codes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict' | ||
|
||
const experimentalWarnings = new Set(); | ||
|
||
function emitExperimentalWarning(feature) { | ||
if (experimentalWarnings.has(feature)) return; | ||
const msg = `${feature} is an experimental feature. This feature could ` + | ||
'change at any time'; | ||
experimentalWarnings.add(feature); | ||
process.emitWarning(msg, 'ExperimentalWarning'); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
|
||
module.exports.emitExperimentalWarning = emitExperimentalWarning; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
In the browser
process.emitWarning
is undefined (not a function)Needs feature detection.