mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
Remove doc strings from cli/js TS files (#4329)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
This commit is contained in:
parent
3ac642c183
commit
e435c2be15
87 changed files with 0 additions and 2025 deletions
|
@ -47,29 +47,6 @@ export function getPrivateValue<
|
|||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether an object has a property with the specified name.
|
||||
* Avoid calling prototype builtin `hasOwnProperty` for two reasons:
|
||||
*
|
||||
* 1. `hasOwnProperty` is defined on the object as something else:
|
||||
*
|
||||
* const options = {
|
||||
* ending: 'utf8',
|
||||
* hasOwnProperty: 'foo'
|
||||
* };
|
||||
* options.hasOwnProperty('ending') // throws a TypeError
|
||||
*
|
||||
* 2. The object doesn't inherit from `Object.prototype`:
|
||||
*
|
||||
* const options = Object.create(null);
|
||||
* options.ending = 'utf8';
|
||||
* options.hasOwnProperty('ending'); // throws a TypeError
|
||||
*
|
||||
* @param obj A Object.
|
||||
* @param v A property name.
|
||||
* @see https://eslint.org/docs/rules/no-prototype-builtins
|
||||
* @internal
|
||||
*/
|
||||
export function hasOwnProperty<T>(obj: T, v: PropertyKey): boolean {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue