Newer
Older
2022-autumn-study / node_modules / es5-ext / reg-exp / is-reg-exp.js
@ItoRino ItoRino on 4 Oct 2022 217 bytes first commit
"use strict";

var objToString = Object.prototype.toString, id = objToString.call(/a/);

module.exports = function (value) {
	return (value && (value instanceof RegExp || objToString.call(value) === id)) || false;
};