UNPKG

js-partial-is-string

Version:

A partial to check whether an object is a string.

2 lines 574 B
/*! js-partial-is-string v0.0.3 | MIT License | (c) Richard King - richrdkng@gmail.com */ !function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.js_partial_isString=e()}(this,function(){"use strict";return function(t,e,o){if(o&&"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&"[object String]"===Object.prototype.toString.call(t))try{return String.prototype.valueOf.call(t),!0}catch(t){return!1}return"string"==typeof t||e===!0&&"[object String]"===Object.prototype.toString.call(t)}});