All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.utils.create-split-props.js Maven / Gradle / Ivy

'use client';
const createSplitProps = () => (props, keys) => keys.reduce(
  (previousValue, currentValue) => {
    const [target, source] = previousValue;
    const key = currentValue;
    if (source[key] !== void 0) {
      target[key] = source[key];
    }
    delete source[key];
    return [target, source];
  },
  [{}, { ...props }]
);

export { createSplitProps };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy