UNPKG

@huggingface/inference

Version:

Typescript client for the Hugging Face Inference Providers and Inference Endpoints

11 lines (10 loc) 256 B
/** * Return copy of object, only keeping allowlisted properties. */ export function pick(o, props) { return Object.assign({}, ...props.map((prop) => { if (o[prop] !== undefined) { return { [prop]: o[prop] }; } })); }