1

If you open the developer tools in the AngularJS website, some functions stay with the source code hidden. Is there a way to do it?

Example: angular-site

The function toString is returning a classic "native code" of javascript native/pre-compiled functions instead returning the real source code.

  • possible duplicate of [How do I hide javascript code in a webpage?](http://stackoverflow.com/questions/6869312/how-do-i-hide-javascript-code-in-a-webpage) – Greg Burghardt Sep 18 '15 at 16:31

2 Answers2

2

You can't* do this. isArray is part of the JavaScript specification and hence implemented by the environment in which you're running, and so is native code. Any JavaScript you yourself serve up can be inspected on the client.


*You could write your own user agent / JavaScript engine...

James Thorpe
  • 31,411
  • 5
  • 72
  • 93
0

This function is a reference of Array.isArray;

/**
 * @name angular.isArray
 * @module ng
 *
 * @description
 * Determines if a reference is an `Array`.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is an `Array`.
 */
var isArray = Array.isArray;