Skip to content

Commit 71dd517

Browse files
committed
chore: deno fmt
1 parent 4906c30 commit 71dd517

File tree

6 files changed

+27
-29
lines changed

6 files changed

+27
-29
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
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

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

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

1918
console.log(new URL("/en-US/docs", A)); // 'https://developer.mozilla.org/en-US/docs'
2019

21-
new URL("/en-US/docs", "https://developer.mozilla.org/fr-FR/toto"); // 'https://developer.mozilla.org/en-US/docs'
20+
new URL("/en-US/docs", "https://developer.mozilla.org/fr-FR/toto"); // 'https://developer.mozilla.org/en-US/docs'

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: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
// deno-lint-ignore-file no-unused-vars
22
class URL {
3-
constructor(url: string, base?: string) {
4-
// @ts-ignore - this is a hack to make the URL object work
5-
this.url = url;
6-
// @ts-ignore - this is a hack to make the Base URL object work
7-
this.base = base;
8-
// @ts-ignore - this is a hack to make the URL object work
9-
this.serialized = base
10-
? internal_url_parse(url, base)
11-
: internal_url_parse_no_base(url);
12-
}
3+
constructor(url: string, base?: string) {
4+
// @ts-ignore - this is a hack to make the URL object work
5+
this.url = url;
6+
// @ts-ignore - this is a hack to make the Base URL object work
7+
this.base = base;
8+
// @ts-ignore - this is a hack to make the URL object work
9+
this.serialized = base
10+
? internal_url_parse(url, base)
11+
: internal_url_parse_no_base(url);
12+
}
1313

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

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)