UNPKG

chowa

Version:

UI component library based on React

31 lines (30 loc) 889 B
/** * @license chowa v1.1.3 * * Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn). * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function otherProps(propTypes, props) { const childProps = {}; for (const property in props) { if (!(property in propTypes) && property !== 'children') { childProps[property] = props[property]; } } return childProps; } exports.otherProps = otherProps; function omitProps(props, omits) { const retProps = {}; for (const property in props) { if (!omits.includes(property) && property !== 'children') { retProps[property] = props[property]; } } return retProps; } exports.omitProps = omitProps;