mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
Run 'make fmt'
This commit is contained in:
parent
93654831fe
commit
0132a4d11d
4 changed files with 11 additions and 12 deletions
|
@ -25,7 +25,8 @@ function stringify(ctx: ConsoleContext, value: any): string {
|
||||||
case "symbol":
|
case "symbol":
|
||||||
return String(value);
|
return String(value);
|
||||||
case "function":
|
case "function":
|
||||||
if (value.name && value.name !== "anonymous") { // from MDN spec
|
if (value.name && value.name !== "anonymous") {
|
||||||
|
// from MDN spec
|
||||||
return `[Function: ${value.name}]`;
|
return `[Function: ${value.name}]`;
|
||||||
}
|
}
|
||||||
return "[Function]";
|
return "[Function]";
|
||||||
|
|
10
fetch.ts
10
fetch.ts
|
@ -1,11 +1,11 @@
|
||||||
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
|
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
|
||||||
// All rights reserved. MIT License.
|
// All rights reserved. MIT License.
|
||||||
import {
|
import {
|
||||||
assert,
|
assert,
|
||||||
log,
|
log,
|
||||||
createResolvable,
|
createResolvable,
|
||||||
Resolvable,
|
Resolvable,
|
||||||
typedArrayToArrayBuffer
|
typedArrayToArrayBuffer
|
||||||
} from "./util";
|
} from "./util";
|
||||||
import { pubInternal, sub } from "./dispatch";
|
import { pubInternal, sub } from "./dispatch";
|
||||||
import { main as pb } from "./msg.pb";
|
import { main as pb } from "./msg.pb";
|
||||||
|
|
8
tests.ts
8
tests.ts
|
@ -90,7 +90,7 @@ test(function tests_console_stringify_circular() {
|
||||||
arrowFunc: () => {},
|
arrowFunc: () => {},
|
||||||
extendedClass: new Extended(),
|
extendedClass: new Extended(),
|
||||||
nFunc: new Function(),
|
nFunc: new Function(),
|
||||||
extendedCstr: Extended,
|
extendedCstr: Extended
|
||||||
};
|
};
|
||||||
|
|
||||||
const circularObj = {
|
const circularObj = {
|
||||||
|
@ -103,7 +103,7 @@ test(function tests_console_stringify_circular() {
|
||||||
nested: nestedObj,
|
nested: nestedObj,
|
||||||
emptyObj: {},
|
emptyObj: {},
|
||||||
arr: [1, "s", false, null, nestedObj],
|
arr: [1, "s", false, null, nestedObj],
|
||||||
baseClass: new Base(),
|
baseClass: new Base()
|
||||||
};
|
};
|
||||||
|
|
||||||
nestedObj.o = circularObj;
|
nestedObj.o = circularObj;
|
||||||
|
@ -121,8 +121,6 @@ test(function tests_console_stringify_circular() {
|
||||||
console.log(JSON);
|
console.log(JSON);
|
||||||
console.log(console);
|
console.log(console);
|
||||||
} catch {
|
} catch {
|
||||||
throw new Error(
|
throw new Error("Expected no crash on circular object");
|
||||||
"Expected no crash on circular object"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -162,7 +162,7 @@ function CallSiteToString(frame: CallSite): string {
|
||||||
functionName.indexOf("." + methodName) !==
|
functionName.indexOf("." + methodName) !==
|
||||||
functionName.length - methodName.length - 1
|
functionName.length - methodName.length - 1
|
||||||
) {
|
) {
|
||||||
line += ` [as ${ methodName} ]`;
|
line += ` [as ${methodName} ]`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
line += typeName + "." + (methodName || "<anonymous>");
|
line += typeName + "." + (methodName || "<anonymous>");
|
||||||
|
|
Loading…
Reference in a new issue