mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 06:31:15 +00:00
feat: add performance user timing APIs (#6421)
This commit is contained in:
parent
d01eb6d9c5
commit
40d081d3d9
17 changed files with 536 additions and 26 deletions
|
@ -208,3 +208,11 @@ export function getHeaderValueParams(value: string): Map<string, string> {
|
|||
export function hasHeaderValueOf(s: string, value: string): boolean {
|
||||
return new RegExp(`^${value}[\t\s]*;?`).test(s);
|
||||
}
|
||||
|
||||
/** An internal function which provides a function name for some generated
|
||||
* functions, so stack traces are a bit more readable.
|
||||
*
|
||||
* @internal */
|
||||
export function setFunctionName(fn: Function, value: string): void {
|
||||
Object.defineProperty(fn, "name", { value, configurable: true });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue