diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-06-07 10:25:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-07 11:25:10 +0200 |
commit | 9385a913125df07f5216322e0b18aec1c6883957 (patch) | |
tree | 88705e174bf9ba5626a3c9a80911a56e77294682 /core/ops_builtin.rs | |
parent | cfb6067f9bc0900a7d7fc6c75f19930542ed679c (diff) |
refactor(core): Move Deno.core bindings to ops (#14793)
Diffstat (limited to 'core/ops_builtin.rs')
-rw-r--r-- | core/ops_builtin.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/ops_builtin.rs b/core/ops_builtin.rs index 234c0b104..a42c0bae8 100644 --- a/core/ops_builtin.rs +++ b/core/ops_builtin.rs @@ -1,3 +1,4 @@ +// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. use crate::error::format_file_name; use crate::error::type_error; use crate::include_js_files; @@ -36,7 +37,9 @@ pub(crate) fn init_builtins() -> Extension { op_shutdown::decl(), op_metrics::decl(), op_format_file_name::decl(), + op_is_proxy::decl(), ]) + .ops(crate::ops_builtin_v8::init_builtins_v8()) .build() } @@ -181,3 +184,8 @@ async fn op_shutdown( fn op_format_file_name(file_name: String) -> String { format_file_name(&file_name) } + +#[op] +fn op_is_proxy(value: serde_v8::Value) -> bool { + value.v8_value.is_proxy() +} |