UNPKG

react-hotkeys

Version:

A declarative library for handling hotkeys and focus within a React application

17 lines (12 loc) 453 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _isObject = _interopRequireDefault(require("../object/isObject")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function size(collection) { return (0, _isObject.default)(collection) ? Object.keys(collection).length : collection.length; } var _default = size; exports.default = _default;