summaryrefslogtreecommitdiff
path: root/runtime/ops/url.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops/url.rs')
-rw-r--r--runtime/ops/url.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/runtime/ops/url.rs b/runtime/ops/url.rs
new file mode 100644
index 000000000..4add9132d
--- /dev/null
+++ b/runtime/ops/url.rs
@@ -0,0 +1,18 @@
+// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+use deno_url::op_url_parse;
+use deno_url::op_url_parse_search_params;
+use deno_url::op_url_stringify_search_params;
+
+pub fn init(rt: &mut deno_core::JsRuntime) {
+ super::reg_json_sync(rt, "op_url_parse", op_url_parse);
+ super::reg_json_sync(
+ rt,
+ "op_url_parse_search_params",
+ op_url_parse_search_params,
+ );
+ super::reg_json_sync(
+ rt,
+ "op_url_stringify_search_params",
+ op_url_stringify_search_params,
+ );
+}