tool.js 293 B

12345678910111213
  1. function _typeof(obj) {
  2. return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
  3. }
  4. function isString(o) { //是否字符串
  5. return _typeof(obj) === 'string'
  6. }
  7. function isPlainObject(obj) {
  8. return _typeof(obj) === 'object';
  9. }
  10. module.exports = {
  11. isString,
  12. isPlainObject
  13. }