UNPKG

@wordpress/components

Version:
21 lines (15 loc) 599 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizedSearch = exports.normalizeInput = void 0; var _lodash = require("lodash"); /** * External dependencies */ // @see packages/block-editor/src/components/inserter/search-items.js const normalizeInput = input => (0, _lodash.deburr)(input).replace(/^\//, '').toLowerCase(); exports.normalizeInput = normalizeInput; const normalizedSearch = (title, search) => -1 !== normalizeInput(title).indexOf(normalizeInput(search)); exports.normalizedSearch = normalizedSearch; //# sourceMappingURL=utils.js.map