Sha256: aa142c3fcb0dab692297bf7acb158e174c0667984561a02beec890f6c3c7cc2b

Contents?: true

Size: 556 Bytes

Versions: 273

Compression:

Stored size: 556 Bytes

Contents

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

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

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to convert.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return (func + '');
    } catch (e) {}
  }
  return '';
}

module.exports = toSource;

Version data entries

273 entries across 271 versions & 29 rubygems

Version Path
sumomo-0.7.3 data/sumomo/api_modules/node_modules/lodash/_toSource.js
sumomo-0.7.2 data/sumomo/api_modules/node_modules/lodash/_toSource.js
sumomo-0.7.1 data/sumomo/api_modules/node_modules/lodash/_toSource.js
sumomo-0.6.4 data/sumomo/api_modules/node_modules/lodash/_toSource.js
sumomo-0.6.3 data/sumomo/api_modules/node_modules/lodash/_toSource.js
sumomo-0.6.2 data/sumomo/api_modules/node_modules/lodash/_toSource.js
sumomo-0.6.1 data/sumomo/api_modules/node_modules/lodash/_toSource.js
affiliator-0.2.1 node_modules/lodash/_toSource.js
sumomo-0.6.0 data/sumomo/api_modules/node_modules/lodash/_toSource.js
guard-sass-lint-0.1.2 node_modules/lodash/_toSource.js
guard-sass-lint-0.1.1 node_modules/lodash/_toSource.js
lanes-0.8.0 node_modules/globule/node_modules/lodash/_toSource.js
lanes-0.8.0 node_modules/lodash/_toSource.js