UNPKG

@nex-ui/react

Version:

🎉 A beautiful, modern, and reliable React component library.

19 lines (16 loc) • 422 B
'use strict'; function toSlots(object, ...slotNames) { const result = {}; for(const key in object){ // @ts-ignore result[key] = {}; if (Object.prototype.hasOwnProperty.call(object, key)) { slotNames.forEach((slot)=>{ // @ts-ignore result[key][slot] = object[key]; }); } } return result; } exports.toSlots = toSlots;