blob: d9542d87aa3d44207a67685d8234adceb2c1ed26 [file] [log] [blame]
// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
'use strict';
const prefixes = require('../reference/prefixes.cjs');
const HAS_PREFIX_REGEX = new RegExp(`(?:${[...prefixes.prefixes].join('|')})`, 'i');
/**
* Check if a string contains any prefix
*
* @param {string} string
* @returns {boolean}
*/
function hasPrefix(string) {
return HAS_PREFIX_REGEX.test(string);
}
module.exports = hasPrefix;