swc/packages/swc-helpers/esm/_super_prop_base.js
magic-akari a13a78e3fe
feat(es/helpers): Use named export and unify import path (#7182)
**BREAKING CHANGE:**

Breaking changes for `@swc/helpers`. A new major version `0.5.0` is required.


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/7157
2023-04-04 03:05:47 +00:00

12 lines
326 B
JavaScript

import { _get_prototype_of } from "./_get_prototype_of.js";
export function _super_prop_base(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _get_prototype_of(object);
if (object === null) break;
}
return object;
}
export { _super_prop_base as _ };