mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 10:52:47 +00:00
11 lines
255 B
JavaScript
11 lines
255 B
JavaScript
'use strict';
|
|
|
|
var toString = Object.prototype.toString
|
|
|
|
, id = toString.call('');
|
|
|
|
module.exports = function (x) {
|
|
return (typeof x === 'string') || (x && (typeof x === 'object') &&
|
|
((x instanceof String) || (toString.call(x) === id))) || false;
|
|
};
|