/**
 * Created by heitan 2019/05
 */

module.exports.isDev = function () {
  return process.env.NODE_ENV.includes('development')
}

let __id = 10000
module.exports.generateId = function () {
  return __id++
}

module.exports.isFunction = function (arg) {
  return Object.prototype.toString.call(arg) === '[object Function]'
}

module.exports.isRegExp = function (arg) {
  return Object.prototype.toString.call(arg) === '[object RegExp]'
}
