Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/i18n / dist / cjs / node_modules / lodash / _baseIsNative.js
Size: Mime:
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var isObject = require('./isObject.js');
var isFunction = require('./isFunction.js');
var _isMasked = require('./_isMasked.js');
var _toSource = require('./_toSource.js');

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used for built-in method references. */
var funcProto = Function.prototype,
    objectProto = Object.prototype;

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject.default(value) || _isMasked.default(value)) {
    return false;
  }
  var pattern = isFunction.default(value) ? reIsNative : reIsHostCtor;
  return pattern.test(_toSource.default(value));
}

var _baseIsNative = baseIsNative;

exports.__moduleExports = _baseIsNative;
exports.default = _baseIsNative;
//# sourceMappingURL=_baseIsNative.js.map