UNPKG

react-kiwi-dropdown

Version:

| Name | Type | Description | | --------------------------- | -------------------- | ----------- | | options | array | | selectedOption | string | | onCha

10 lines (8 loc) 398 B
// helper for String#{startsWith, endsWith, includes} var isRegExp = require('../internals/is-regexp'); var requireObjectCoercible = require('../internals/require-object-coercible'); module.exports = function (that, searchString, NAME) { if (isRegExp(searchString)) { throw TypeError('String.prototype.' + NAME + " doesn't accept regex"); } return String(requireObjectCoercible(that)); };