underscore.js

From disqus.com, 1 Year ago, written in JavaScript, viewed 3 times. This paste is a reply to config.js from disqus.com - view diff
URL https://pastebin.freepbx.org/view/e32b5ba0 Embed
Download Paste or View Raw
  1. //     Underscore.js 1.8.3
  2. //     http://underscorejs.org
  3. //     (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  4. //     Underscore may be freely distributed under the MIT license.
  5.  
  6. (function() {
  7.  
  8.   // Baseline setup
  9.   // --------------
  10.  
  11.   // Establish the root object, `window` in the browser, or `exports` on the server.
  12.   var root = this;
  13.  
  14.   // Save the previous value of the `_` variable.
  15.   var previousUnderscore = root._;
  16.  
  17.   // Save bytes in the minified (but not gzipped) version:
  18.   var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
  19.  
  20.   // Create quick reference variables for speed access to core prototypes.
  21.   var
  22.     push             = ArrayProto.push,
  23.     slice            = ArrayProto.slice,
  24.     toString         = ObjProto.toString,
  25.     hasOwnProperty   = ObjProto.hasOwnProperty;
  26.  
  27.   // All **ECMAScript 5** native function implementations that we hope to use
  28.   // are declared here.
  29.   var
  30.     nativeIsArray      = Array.isArray,
  31.     nativeKeys         = Object.keys,
  32.     nativeBind         = FuncProto.bind,
  33.     nativeCreate       = Object.create;
  34.  
  35.   // Naked function reference for surrogate-prototype-swapping.
  36.   var Ctor = function(){};
  37.  
  38.   // Create a safe reference to the Underscore object for use below.
  39.   var _ = function(obj) {
  40.     if (obj instanceof _) return obj;
  41.     if (!(this instanceof _)) return new _(obj);
  42.     this._wrapped = obj;
  43.   };
  44.  
  45.   // Export the Underscore object for **Node.js**, with
  46.   // backwards-compatibility for the old `require()` API. If we're in
  47.   // the browser, add `_` as a global object.
  48.   if (typeof exports !== 'undefined') {
  49.     if (typeof module !== 'undefined' && module.exports) {
  50.       exports = module.exports = _;
  51.     }
  52.     exports._ = _;
  53.   } else {
  54.     root._ = _;
  55.   }
  56.   //https://c.disquscdn.com/next/node_modules/underscore/underscore.js

Reply to "underscore.js"

Here you can reply to the paste above