Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /adjust-sourcemap-loader /lib /process /get-field-as-fn.js
Download frontend/node_modules/adjust-sourcemap-loader/lib/process/get-field-as-fn.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 483 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/adjust-sourcemap-loader/lib/process/get-field-as-fn.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/adjust-sourcemap-loader/lib/process/get-field-as-fn.js
-
curl -L -o get-field-as-fn.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/adjust-sourcemap-loader/lib/process/get-field-as-fn.js
483 Bytes
| ; | |
| /** | |
| * Create a method that will retrieve the given field from an object where that field has a function value | |
| * @param {string} field The field to consider | |
| * @returns {function(object):function} A method that gets functions from the given field | |
| */ | |
| function getFieldAsFn(field) { | |
| return function getFromValue(value) { | |
| return !!value && (typeof value === 'object') && (typeof value[field] === 'function') && value[field]; | |
| }; | |
| } | |
| module.exports = getFieldAsFn; |