Spaces:
Sleeping
Sleeping
Download extensions/puterfs/lib/objectfn.js from AZILS/puter-deploy: direct link, hf CLI and curl.
- Browser
- Download file 585 Bytes
-
https://huggingface.co/spaces/AZILS/puter-deploy/resolve/main/extensions/puterfs/lib/objectfn.js
- Command line
-
hf download hf://spaces/AZILS/puter-deploy/extensions/puterfs/lib/objectfn.js
-
curl -L -o objectfn.js https://huggingface.co/spaces/AZILS/puter-deploy/resolve/main/extensions/puterfs/lib/objectfn.js
585 Bytes
| /** | |
| * Instead of `myObject.hasOwnProperty(k)`, always write: | |
| * `safeHasOwnProperty(myObject, k)`. | |
| * | |
| * This is a less verbose way to call `Object.prototype.hasOwnProperty.call`. | |
| * This prevents unexpected behavior when `hasOwnProperty` is overridden, | |
| * which is especially possible for objects parsed from user-sent JSON. | |
| * | |
| * explanation: https://eslint.org/docs/latest/rules/no-prototype-builtins | |
| * @param {*} o | |
| * @param {...any} a | |
| * @returns | |
| */ | |
| export const safeHasOwnProperty = (o, ...a) => { | |
| return Object.prototype.hasOwnProperty.call(o, ...a); | |
| }; | |