Skip to content

Commit 326e0d3

Browse files
committed
chore: deno fmt
1 parent 3070983 commit 326e0d3

File tree

6 files changed

+32
-33
lines changed

6 files changed

+32
-33
lines changed

examples/atob.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ const validBase64 = "YQ==";
22
console.log("validBase64: ", atob(validBase64)); // "a"
33

44
const validBase64Multiple = "SGVsbG8sIEFuZHJvbWVkYSE=";
5-
console.log("validBase64Multiple: ", atob(validBase64Multiple)); // "Hello, Andromeda!"
5+
console.log("validBase64Multiple: ", atob(validBase64Multiple)); // "Hello, Andromeda!"

examples/url.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
const baseUrl = "https://developer.mozilla.org";
44

55
const A = new URL("/", baseUrl); // 'https://developer.mozilla.org/'
6-
console.log(A)
6+
console.log(A);
77

88
const B = new URL(baseUrl); // 'https://developer.mozilla.org/'
9-
console.log(B)
9+
console.log(B);
1010

1111
console.log(new URL("en-US/docs", B)); // 'https://developer.mozilla.org/en-US/docs'
1212

1313
const D = new URL("/en-US/docs", B); // 'https://developer.mozilla.org/en-US/docs'
14-
console.log(D)
14+
console.log(D);
1515

1616
console.log(new URL("/en-US/docs", D)); // 'https://developer.mozilla.org/en-US/docs'
1717

@@ -50,4 +50,4 @@ if ("parse" in URL) {
5050
// console.log(`[5]: ${result}`);
5151
} else {
5252
console.log("URL.parse() not supported");
53-
}
53+
}

namespace/mod.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,20 +298,20 @@ function alert(message: string) {
298298
}
299299

300300
/**
301-
* Takes the input data, in the form of a Unicode string containing only characters in the range U+0000 to U+00FF,
302-
* each representing a binary byte with values 0x00 to 0xFF respectively, and converts it to its base64 representation,
301+
* Takes the input data, in the form of a Unicode string containing only characters in the range U+0000 to U+00FF,
302+
* each representing a binary byte with values 0x00 to 0xFF respectively, and converts it to its base64 representation,
303303
* which it returns.
304304
*/
305305
function btoa(input: string): string {
306306
return internal_btoa(input);
307307
}
308308

309309
/**
310-
* Takes the input data, in the form of a Unicode string containing base64-encoded binary data,
311-
* decodes it, and returns a string consisting of characters in the range U+0000 to U+00FF,
312-
* each representing a binary byte with values 0x00 to 0xFF respectively,
310+
* Takes the input data, in the form of a Unicode string containing base64-encoded binary data,
311+
* decodes it, and returns a string consisting of characters in the range U+0000 to U+00FF,
312+
* each representing a binary byte with values 0x00 to 0xFF respectively,
313313
* corresponding to that binary data.
314314
*/
315315
function atob(input: string): string {
316316
return internal_atob(input);
317-
}
317+
}

runtime/src/ext/url/mod.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
// deno-lint-ignore-file no-unused-vars
22
class URL {
3-
// TODO: Need to return a URL object.
4-
constructor(url: string, base?: string) {
5-
// @ts-ignore - this is a hack to make the URL object work
6-
this.url = url;
7-
// @ts-ignore - this is a hack to make the Base URL object work
8-
this.base = base;
9-
// @ts-ignore - this is a hack to make the URL object work
10-
this.serialized = base
11-
? internal_url_parse(url, base)
12-
: internal_url_parse_no_base(url);
13-
}
3+
// TODO: Need to return a URL object.
4+
constructor(url: string, base?: string) {
5+
// @ts-ignore - this is a hack to make the URL object work
6+
this.url = url;
7+
// @ts-ignore - this is a hack to make the Base URL object work
8+
this.base = base;
9+
// @ts-ignore - this is a hack to make the URL object work
10+
this.serialized = base
11+
? internal_url_parse(url, base)
12+
: internal_url_parse_no_base(url);
13+
}
1414

15-
toString() {
16-
// @ts-ignore - this is a hack to make the URL object work
17-
return this.serialized;
18-
}
15+
toString() {
16+
// @ts-ignore - this is a hack to make the URL object work
17+
return this.serialized;
18+
}
1919

20-
static parse(url: string, base?: string) {
21-
return new this(url, base)
22-
}
23-
}
20+
static parse(url: string, base?: string) {
21+
return new this(url, base);
22+
}
23+
}

runtime/src/ext/web/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl WebExt {
2020
ExtensionOp::new("internal_atob", Self::internal_atob, 1),
2121
],
2222
storage: None,
23-
files: vec![],
23+
files: vec![include_str!("./event.ts")],
2424
}
2525
}
2626

types/internals.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ declare function internal_url_parse_no_base(url: string): string;
9898
*/
9999
declare function internal_btoa(input: string): string;
100100
/**
101-
*
102101
* The `internal_atob` function decodes a string in base64.
103102
*/
104-
declare function internal_atob(input: string): string;
103+
declare function internal_atob(input: string): string;

0 commit comments

Comments
 (0)