code: function lock(obj, freeze, options) {
      if (options && options.noLocking) {
          return;
      }
      if (freeze) {
          Object.freeze(obj); // freeze the entire object, permanently;
      } else {
          const desc = {
              writable: false,
              configurable: false,
              enumerable: true
          };
          for (const p in obj) {
              Object.defineProperty(obj, p, desc);
          }
      }
  }
docs: ///////////////////////////////////////////////// Locks all properties in an object to read-only, or freezes the entire object for any changes.