Download utils.js from Jessedbrown/HubSpot-Meeting: direct link, hf CLI and curl.
- Browser
- Download file 819 Bytes
-
https://huggingface.co/Jessedbrown/HubSpot-Meeting/resolve/main/utils.js
- Command line
-
hf download hf://Jessedbrown/HubSpot-Meeting/utils.js
-
curl -L -o utils.js https://huggingface.co/Jessedbrown/HubSpot-Meeting/resolve/main/utils.js
819 Bytes
| const disallowedValues = [ | |
| '[not provided]', | |
| 'placeholder', | |
| '[[unknown]]', | |
| 'not set', | |
| 'not provided', | |
| 'unknown', | |
| 'undefined', | |
| 'n/a' | |
| ]; | |
| const filterNullValuesFromObject = object => | |
| Object | |
| .fromEntries( | |
| Object | |
| .entries(object) | |
| .filter(([_, v]) => | |
| v !== null && | |
| v !== '' && | |
| typeof v !== 'undefined' && | |
| (typeof v !== 'string' || !disallowedValues.includes(v.toLowerCase()) || !v.toLowerCase().includes('!$record')))); | |
| const normalizePropertyName = key => key.toLowerCase().replace(/__c$/, '').replace(/^_+|_+$/g, '').replace(/_+/g, '_'); | |
| const goal = actions => { | |
| // this is where the data will be written to the database | |
| console.log(actions); | |
| }; | |
| module.exports = { | |
| filterNullValuesFromObject, | |
| normalizePropertyName, | |
| goal | |
| }; | |