source: node_modules/@babel/runtime/helpers/esm/defineProperty.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 344 bytes
RevLine 
[d24f17c]1import toPropertyKey from "./toPropertyKey.js";
2export default function _defineProperty(obj, key, value) {
3 key = toPropertyKey(key);
4 if (key in obj) {
5 Object.defineProperty(obj, key, {
6 value: value,
7 enumerable: true,
8 configurable: true,
9 writable: true
10 });
11 } else {
12 obj[key] = value;
13 }
14 return obj;
15}
Note: See TracBrowser for help on using the repository browser.