source: frontend/node_modules/underscore/amd/underscore.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 841 bytes
Line 
1define(['./_setup'], function (_setup) {
2
3 // If Underscore is called as a function, it returns a wrapped object that can
4 // be used OO-style. This wrapper holds altered versions of all functions added
5 // through `_.mixin`. Wrapped objects may be chained.
6 function _(obj) {
7 if (obj instanceof _) return obj;
8 if (!(this instanceof _)) return new _(obj);
9 this._wrapped = obj;
10 }
11
12 _.VERSION = _setup.VERSION;
13
14 // Extracts the result from a wrapped and chained object.
15 _.prototype.value = function() {
16 return this._wrapped;
17 };
18
19 // Provide unwrapping proxies for some methods used in engine operations
20 // such as arithmetic and JSON stringification.
21 _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
22
23 _.prototype.toString = function() {
24 return String(this._wrapped);
25 };
26
27 return _;
28
29});
Note: See TracBrowser for help on using the repository browser.