UNPKG

183 BJavaScriptView Raw
1var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
2
3function isDataUriResource(uri) {
4 return DATA_URI_PATTERN.test(uri);
5}
6
7module.exports = isDataUriResource;