UNPKG

407 BJavaScriptView Raw
1'use strict';
2var isPrototypeOf = require('../../internals/object-is-prototype-of');
3var method = require('../string/virtual/is-well-formed');
4
5var StringPrototype = String.prototype;
6
7module.exports = function (it) {
8 var own = it.isWellFormed;
9 return typeof it == 'string' || it === StringPrototype
10 || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.isWellFormed) ? method : own;
11};