UNPKG

react-hotkeys

Version:

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

11 lines (8 loc) 222 B
import isString from './isString'; function stripSuperfluousWhitespace(target) { if (isString(target)) { return target.trim().replace(/\s+/g, ' '); } return target; } export default stripSuperfluousWhitespace;