import { hasOwn } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/object/index.js";
Returns true
if the specified object has the indicated property as its own property.
If the property is inherited, or does not exist, the function returns false
.
Examples
Example 1
Example 1
import { hasOwn } from "@ayonli/jsext/object";
const obj = { foo: "hello" };
console.log(hasOwn(obj, "foo")); // true
console.log(hasOwn(obj, "toString")); // false