├── .gitattributes ├── CHANGELOG ├── .gitignore ├── lib ├── fp │ ├── template │ │ ├── modules │ │ │ ├── alias.jst │ │ │ ├── category.jst │ │ │ ├── fp.jst │ │ │ ├── _falseOptions.jst │ │ │ ├── module.jst │ │ │ ├── thru.jst │ │ │ ├── _util.jst │ │ │ └── convert.jst │ │ └── doc │ │ │ └── wiki.jst │ ├── build-dist.js │ ├── build-doc.js │ └── build-modules.js ├── common │ ├── mapping.js │ ├── uglify.options.js │ ├── util.js │ ├── minify.js │ └── file.js └── main │ ├── build-dist.js │ ├── build-modules.js │ ├── build-doc.js │ └── build-site.js ├── vendor ├── firebug-lite │ ├── skin │ │ └── xp │ │ │ ├── up.png │ │ │ ├── down.png │ │ │ ├── min.png │ │ │ ├── off.png │ │ │ ├── blank.gif │ │ │ ├── detach.png │ │ │ ├── disable.gif │ │ │ ├── disable.png │ │ │ ├── firebug.png │ │ │ ├── group.gif │ │ │ ├── search.gif │ │ │ ├── search.png │ │ │ ├── shadow.gif │ │ │ ├── shadow2.gif │ │ │ ├── sprite.png │ │ │ ├── tabLeft.png │ │ │ ├── tabMid.png │ │ │ ├── upHover.png │ │ │ ├── buttonBg.png │ │ │ ├── downHover.png │ │ │ ├── errorIcon.gif │ │ │ ├── errorIcon.png │ │ │ ├── infoIcon.gif │ │ │ ├── infoIcon.png │ │ │ ├── minHover.png │ │ │ ├── offHover.png │ │ │ ├── tabRight.png │ │ │ ├── tree_open.gif │ │ │ ├── upActive.png │ │ │ ├── detachHover.png │ │ │ ├── disableHover.gif │ │ │ ├── disableHover.png │ │ │ ├── downActive.png │ │ │ ├── errorIcon-sm.png │ │ │ ├── loading_16.gif │ │ │ ├── shadowAlpha.png │ │ │ ├── tabHoverLeft.png │ │ │ ├── tabHoverMid.png │ │ │ ├── tabMenuPin.png │ │ │ ├── tabMenuRadio.png │ │ │ ├── titlebarMid.png │ │ │ ├── toolbarMid.png │ │ │ ├── tree_close.gif │ │ │ ├── twistyClosed.png │ │ │ ├── twistyOpen.png │ │ │ ├── warningIcon.gif │ │ │ ├── warningIcon.png │ │ │ ├── buttonBgHover.png │ │ │ ├── tabHoverRight.png │ │ │ ├── tabMenuTarget.png │ │ │ ├── pixel_transparent.gif │ │ │ ├── tabMenuCheckbox.png │ │ │ ├── textEditorBorders.gif │ │ │ ├── textEditorBorders.png │ │ │ ├── textEditorCorners.gif │ │ │ ├── textEditorCorners.png │ │ │ ├── tabMenuTargetHover.png │ │ │ ├── roundCorner.svg │ │ │ ├── firebug.IE6.css │ │ │ ├── firebug.html │ │ │ ├── html.css │ │ │ └── debugger.css │ └── license.txt ├── backbone │ ├── test │ │ ├── setup │ │ │ ├── dom-setup.js │ │ │ └── environment.js │ │ ├── noconflict.js │ │ └── sync.js │ └── LICENSE └── underscore │ ├── LICENSE │ ├── test │ ├── chaining.js │ └── cross-document.js │ └── underscore-min.js ├── fp ├── placeholder.js ├── _convertBrowser.js └── _mapping.js ├── .markdown-doctest-setup.js ├── .editorconfig ├── test ├── asset │ ├── worker.js │ └── test-ui.js ├── remove.js ├── fp.html ├── backbone.html └── index.html ├── LICENSE ├── package.json ├── perf ├── index.html └── asset │ └── perf-ui.js ├── .jscsrc ├── README.md ├── .github └── CONTRIBUTING.md ├── .travis.yml └── dist ├── lodash.fp.min.js ├── lodash.core.min.js └── mapping.fp.js /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | https://github.com/lodash/lodash/wiki/Changelog 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.log 3 | doc/*.html 4 | node_modules 5 | -------------------------------------------------------------------------------- /lib/fp/template/modules/alias.jst: -------------------------------------------------------------------------------- 1 | module.exports = require('./<%= name %>'); 2 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/up.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/down.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/min.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/off.png -------------------------------------------------------------------------------- /lib/fp/template/modules/category.jst: -------------------------------------------------------------------------------- 1 | var convert = require('./convert'); 2 | module.exports = convert(require('../<%= name %>')); 3 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/blank.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/detach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/detach.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/disable.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/disable.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/disable.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/firebug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/firebug.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/group.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/group.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/search.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/search.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/shadow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/shadow.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/shadow2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/shadow2.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/sprite.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabLeft.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabMid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabMid.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/upHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/upHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/buttonBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/buttonBg.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/downHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/downHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/errorIcon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/errorIcon.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/errorIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/errorIcon.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/infoIcon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/infoIcon.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/infoIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/infoIcon.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/minHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/minHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/offHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/offHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabRight.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tree_open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tree_open.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/upActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/upActive.png -------------------------------------------------------------------------------- /lib/fp/template/modules/fp.jst: -------------------------------------------------------------------------------- 1 | var _ = require('./lodash.min').runInContext(); 2 | module.exports = require('./fp/_baseConvert')(_, _); 3 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/detachHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/detachHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/disableHover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/disableHover.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/disableHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/disableHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/downActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/downActive.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/errorIcon-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/errorIcon-sm.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/loading_16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/loading_16.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/shadowAlpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/shadowAlpha.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabHoverLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabHoverLeft.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabHoverMid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabHoverMid.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabMenuPin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabMenuPin.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabMenuRadio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabMenuRadio.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/titlebarMid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/titlebarMid.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/toolbarMid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/toolbarMid.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tree_close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tree_close.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/twistyClosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/twistyClosed.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/twistyOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/twistyOpen.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/warningIcon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/warningIcon.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/warningIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/warningIcon.png -------------------------------------------------------------------------------- /fp/placeholder.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The default argument placeholder value for methods. 3 | * 4 | * @type {Object} 5 | */ 6 | module.exports = {}; 7 | -------------------------------------------------------------------------------- /vendor/backbone/test/setup/dom-setup.js: -------------------------------------------------------------------------------- 1 | $('body').append( 2 | '
' + 3 | '
' 4 | ); 5 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/buttonBgHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/buttonBgHover.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabHoverRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabHoverRight.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabMenuTarget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabMenuTarget.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/pixel_transparent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/pixel_transparent.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabMenuCheckbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabMenuCheckbox.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/textEditorBorders.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/textEditorBorders.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/textEditorBorders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/textEditorBorders.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/textEditorCorners.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/textEditorCorners.gif -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/textEditorCorners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/textEditorCorners.png -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/tabMenuTargetHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/lodash3/HEAD/vendor/firebug-lite/skin/xp/tabMenuTargetHover.png -------------------------------------------------------------------------------- /lib/fp/template/modules/_falseOptions.jst: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'cap': false, 3 | 'curry': false, 4 | 'fixed': false, 5 | 'immutable': false, 6 | 'rearg': false 7 | }; 8 | -------------------------------------------------------------------------------- /lib/fp/template/modules/module.jst: -------------------------------------------------------------------------------- 1 | var convert = require('./convert'), 2 | func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>')); 3 | 4 | func.placeholder = require('./placeholder'); 5 | module.exports = func; 6 | -------------------------------------------------------------------------------- /lib/fp/template/modules/thru.jst: -------------------------------------------------------------------------------- 1 | var convert = require('./convert'), 2 | func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>'), require('./_falseOptions')); 3 | 4 | func.placeholder = require('./placeholder'); 5 | module.exports = func; 6 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/roundCorner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.markdown-doctest-setup.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | delete global['__core-js_shared__']; 4 | 5 | const _ = require('./lodash.js'); 6 | const globals = require('lodash-doc-globals'); 7 | 8 | module.exports = { 9 | 'babel': false, 10 | 'globals': _.assign({ '_': _ }, globals) 11 | }; 12 | -------------------------------------------------------------------------------- /lib/common/mapping.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _mapping = require('../../fp/_mapping'); 4 | const util = require('./util'); 5 | const Hash = util.Hash; 6 | 7 | /*----------------------------------------------------------------------------*/ 8 | 9 | module.exports = new Hash(_mapping); 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | indent_size = 2 10 | indent_style = space 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | -------------------------------------------------------------------------------- /test/asset/worker.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | self.console || (self.console = { 'log': function() {} }); 4 | 5 | addEventListener('message', function(e) { 6 | if (e.data) { 7 | try { 8 | importScripts('../' + e.data); 9 | } catch (e) { 10 | var lineNumber = e.lineNumber, 11 | message = (lineNumber == null ? '' : (lineNumber + ': ')) + e.message; 12 | 13 | self._ = { 'VERSION': message }; 14 | } 15 | postMessage(_.VERSION); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /vendor/backbone/test/noconflict.js: -------------------------------------------------------------------------------- 1 | (function(QUnit) { 2 | 3 | QUnit.module('Backbone.noConflict'); 4 | 5 | QUnit.test('noConflict', function(assert) { 6 | assert.expect(2); 7 | var noconflictBackbone = Backbone.noConflict(); 8 | assert.equal(window.Backbone, undefined, 'Returned window.Backbone'); 9 | window.Backbone = noconflictBackbone; 10 | assert.equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone'); 11 | }); 12 | 13 | })(QUnit); 14 | -------------------------------------------------------------------------------- /lib/fp/template/modules/_util.jst: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'ary': require('../ary'), 3 | 'assign': require('../_baseAssign'), 4 | 'clone': require('../clone'), 5 | 'curry': require('../curry'), 6 | 'forEach': require('../_arrayEach'), 7 | 'isArray': require('../isArray'), 8 | 'isFunction': require('../isFunction'), 9 | 'iteratee': require('../iteratee'), 10 | 'keys': require('../_baseKeys'), 11 | 'rearg': require('../rearg'), 12 | 'spread': require('../spread'), 13 | 'toInteger': require('../toInteger'), 14 | 'toPath': require('../toPath') 15 | }; 16 | -------------------------------------------------------------------------------- /lib/common/uglify.options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * The UglifyJS options object for 5 | * [compress](https://github.com/mishoo/UglifyJS2#compressor-options), 6 | * [mangle](https://github.com/mishoo/UglifyJS2#mangler-options), and 7 | * [output](https://github.com/mishoo/UglifyJS2#beautifier-options) options. 8 | */ 9 | module.exports = { 10 | 'compress': { 11 | 'collapse_vars': true, 12 | 'negate_iife': false, 13 | 'pure_getters': true, 14 | 'unsafe': true, 15 | 'warnings': false 16 | }, 17 | 'output': { 18 | 'ascii_only': true, 19 | 'comments': /@license/, 20 | 'max_line_len': 500 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /fp/_convertBrowser.js: -------------------------------------------------------------------------------- 1 | var baseConvert = require('./_baseConvert'); 2 | 3 | /** 4 | * Converts `lodash` to an immutable auto-curried iteratee-first data-last 5 | * version with conversion `options` applied. 6 | * 7 | * @param {Function} lodash The lodash function to convert. 8 | * @param {Object} [options] The options object. See `baseConvert` for more details. 9 | * @returns {Function} Returns the converted `lodash`. 10 | */ 11 | function browserConvert(lodash, options) { 12 | return baseConvert(lodash, lodash, options); 13 | } 14 | 15 | if (typeof _ == 'function' && typeof _.runInContext == 'function') { 16 | _ = browserConvert(_.runInContext()); 17 | } 18 | module.exports = browserConvert; 19 | -------------------------------------------------------------------------------- /lib/fp/template/modules/convert.jst: -------------------------------------------------------------------------------- 1 | var baseConvert = require('./_baseConvert'), 2 | util = require('./_util'); 3 | 4 | /** 5 | * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last 6 | * version with conversion `options` applied. If `name` is an object its methods 7 | * will be converted. 8 | * 9 | * @param {string} name The name of the function to wrap. 10 | * @param {Function} [func] The function to wrap. 11 | * @param {Object} [options] The options object. See `baseConvert` for more details. 12 | * @returns {Function|Object} Returns the converted function or object. 13 | */ 14 | function convert(name, func, options) { 15 | return baseConvert(util, name, func, options); 16 | } 17 | 18 | module.exports = convert; 19 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/firebug.IE6.css: -------------------------------------------------------------------------------- 1 | /************************************************************************************************/ 2 | #fbToolbarSearch { 3 | background-image: url(search.gif) !important; 4 | } 5 | /************************************************************************************************/ 6 | .fbErrors { 7 | background-image: url(errorIcon.gif) !important; 8 | } 9 | /************************************************************************************************/ 10 | .logRow-info { 11 | background-image: url(infoIcon.gif) !important; 12 | } 13 | 14 | .logRow-warning { 15 | background-image: url(warningIcon.gif) !important; 16 | } 17 | 18 | .logRow-error { 19 | background-image: url(errorIcon.gif) !important; 20 | } 21 | -------------------------------------------------------------------------------- /lib/main/build-dist.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const async = require('async'); 4 | const path = require('path'); 5 | 6 | const file = require('../common/file'); 7 | const util = require('../common/util'); 8 | 9 | const basePath = path.join(__dirname, '..', '..'); 10 | const distPath = path.join(basePath, 'dist'); 11 | const filename = 'lodash.js'; 12 | 13 | const baseLodash = path.join(basePath, filename); 14 | const distLodash = path.join(distPath, filename); 15 | 16 | /*----------------------------------------------------------------------------*/ 17 | 18 | /** 19 | * Creates browser builds of Lodash at the `target` path. 20 | * 21 | * @private 22 | * @param {string} target The output directory path. 23 | */ 24 | function build() { 25 | async.series([ 26 | file.copy(baseLodash, distLodash), 27 | file.min(distLodash) 28 | ], util.pitch); 29 | } 30 | 31 | build(); 32 | -------------------------------------------------------------------------------- /test/remove.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | var _ = require('../lodash'), 5 | fs = require('fs'), 6 | path = require('path'); 7 | 8 | var args = (args = process.argv) 9 | .slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0); 10 | 11 | var filePath = path.resolve(args[1]), 12 | reLine = /.*/gm; 13 | 14 | var pattern = (function() { 15 | var result = args[0], 16 | delimiter = result.charAt(0), 17 | lastIndex = result.lastIndexOf(delimiter); 18 | 19 | return RegExp(result.slice(1, lastIndex), result.slice(lastIndex + 1)); 20 | }()); 21 | 22 | /*----------------------------------------------------------------------------*/ 23 | 24 | fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) { 25 | var snippet = _.slice(arguments, -3, -2)[0]; 26 | return match.replace(snippet, snippet.replace(reLine, '')); 27 | })); 28 | -------------------------------------------------------------------------------- /lib/main/build-modules.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const async = require('async'); 5 | const path = require('path'); 6 | 7 | const file = require('../common/file'); 8 | const util = require('../common/util'); 9 | 10 | const basePath = path.join(__dirname, '..', '..'); 11 | const distPath = path.join(basePath, 'dist'); 12 | 13 | const filePairs = [ 14 | [path.join(distPath, 'lodash.core.js'), 'core.js'], 15 | [path.join(distPath, 'lodash.core.min.js'), 'core.min.js'], 16 | [path.join(distPath, 'lodash.min.js'), 'lodash.min.js'] 17 | ]; 18 | 19 | /*----------------------------------------------------------------------------*/ 20 | 21 | /** 22 | * Creates supplementary Lodash modules at the `target` path. 23 | * 24 | * @private 25 | * @param {string} target The output directory path. 26 | */ 27 | function build(target) { 28 | const actions = _.map(filePairs, pair => 29 | file.copy(pair[0], path.join(target, pair[1]))); 30 | 31 | async.series(actions, util.pitch); 32 | } 33 | 34 | build(_.last(process.argv)); 35 | -------------------------------------------------------------------------------- /lib/common/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | 5 | /*----------------------------------------------------------------------------*/ 6 | 7 | /** 8 | * Creates a hash object. If a `properties` object is provided, its own 9 | * enumerable properties are assigned to the created hash. 10 | * 11 | * @memberOf util 12 | * @param {Object} [properties] The properties to assign to the hash. 13 | * @returns {Object} Returns the new hash object. 14 | */ 15 | function Hash(properties) { 16 | return _.transform(properties, (result, value, key) => { 17 | result[key] = (_.isPlainObject(value) && !(value instanceof Hash)) 18 | ? new Hash(value) 19 | : value; 20 | }, this); 21 | } 22 | 23 | Hash.prototype = Object.create(null); 24 | 25 | /** 26 | * This method throws any error it receives. 27 | * 28 | * @memberOf util 29 | * @param {Object} [error] The error object. 30 | */ 31 | function pitch(error) { 32 | if (error != null) { 33 | throw error; 34 | } 35 | } 36 | 37 | module.exports = { 38 | Hash, 39 | pitch 40 | }; 41 | -------------------------------------------------------------------------------- /vendor/backbone/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2016 Jeremy Ashkenas, DocumentCloud 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendor/underscore/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative 2 | Reporters & Editors 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /vendor/backbone/test/setup/environment.js: -------------------------------------------------------------------------------- 1 | (function(QUnit) { 2 | 3 | var sync = Backbone.sync; 4 | var ajax = Backbone.ajax; 5 | var emulateHTTP = Backbone.emulateHTTP; 6 | var emulateJSON = Backbone.emulateJSON; 7 | var history = window.history; 8 | var pushState = history.pushState; 9 | var replaceState = history.replaceState; 10 | 11 | QUnit.config.noglobals = true; 12 | 13 | QUnit.testStart(function() { 14 | var env = QUnit.config.current.testEnvironment; 15 | 16 | // We never want to actually call these during tests. 17 | history.pushState = history.replaceState = function() {}; 18 | 19 | // Capture ajax settings for comparison. 20 | Backbone.ajax = function(settings) { 21 | env.ajaxSettings = settings; 22 | }; 23 | 24 | // Capture the arguments to Backbone.sync for comparison. 25 | Backbone.sync = function(method, model, options) { 26 | env.syncArgs = { 27 | method: method, 28 | model: model, 29 | options: options 30 | }; 31 | sync.apply(this, arguments); 32 | }; 33 | 34 | }); 35 | 36 | QUnit.testDone(function() { 37 | Backbone.sync = sync; 38 | Backbone.ajax = ajax; 39 | Backbone.emulateHTTP = emulateHTTP; 40 | Backbone.emulateJSON = emulateJSON; 41 | history.pushState = pushState; 42 | history.replaceState = replaceState; 43 | }); 44 | 45 | })(QUnit); 46 | -------------------------------------------------------------------------------- /lib/common/minify.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const fs = require('fs-extra'); 5 | const uglify = require('uglify-js'); 6 | 7 | const uglifyOptions = require('./uglify.options'); 8 | 9 | /*----------------------------------------------------------------------------*/ 10 | 11 | /** 12 | * Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and 13 | * invokes `callback` upon completion. The callback is invoked with one argument: 14 | * (error). 15 | * 16 | * If unspecified, `destPath` is `srcPath` with an extension of `.min.js`. 17 | * (e.g. the `destPath` of `path/to/foo.js` would be `path/to/foo.min.js`) 18 | * 19 | * @param {string} srcPath The path of the file to minify. 20 | * @param {string} [destPath] The path to write the file to. 21 | * @param {Function} callback The function invoked upon completion. 22 | * @param {Object} [option] The UglifyJS options object. 23 | */ 24 | function minify(srcPath, destPath, callback, options) { 25 | if (_.isFunction(destPath)) { 26 | if (_.isObject(callback)) { 27 | options = callback; 28 | } 29 | callback = destPath; 30 | destPath = undefined; 31 | } 32 | if (!destPath) { 33 | destPath = srcPath.replace(/(?=\.js$)/, '.min'); 34 | } 35 | const output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions)); 36 | fs.writeFile(destPath, output.code, 'utf-8', callback); 37 | } 38 | 39 | module.exports = minify; 40 | -------------------------------------------------------------------------------- /test/fp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | lodash-fp Test Suite 6 | 7 | 8 | 9 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/fp/build-dist.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const async = require('async'); 5 | const path = require('path'); 6 | const webpack = require('webpack'); 7 | 8 | const file = require('../common/file'); 9 | const util = require('../common/util'); 10 | 11 | const basePath = path.join(__dirname, '..', '..'); 12 | const distPath = path.join(basePath, 'dist'); 13 | const fpPath = path.join(basePath, 'fp'); 14 | const filename = 'lodash.fp.js'; 15 | 16 | const fpConfig = { 17 | 'entry': path.join(fpPath, '_convertBrowser.js'), 18 | 'output': { 19 | 'path': distPath, 20 | 'filename': filename, 21 | 'library': 'fp', 22 | 'libraryTarget': 'umd' 23 | }, 24 | 'plugins': [ 25 | new webpack.optimize.OccurenceOrderPlugin, 26 | new webpack.optimize.DedupePlugin 27 | ] 28 | }; 29 | 30 | const mappingConfig = { 31 | 'entry': path.join(fpPath, '_mapping.js'), 32 | 'output': { 33 | 'path': distPath, 34 | 'filename': 'mapping.fp.js', 35 | 'library': 'mapping', 36 | 'libraryTarget': 'umd' 37 | } 38 | }; 39 | 40 | /*----------------------------------------------------------------------------*/ 41 | 42 | /** 43 | * Creates browser builds of the FP converter and mappings at the `target` path. 44 | * 45 | * @private 46 | * @param {string} target The output directory path. 47 | */ 48 | function build() { 49 | async.series([ 50 | _.partial(webpack, mappingConfig), 51 | _.partial(webpack, fpConfig), 52 | file.min(path.join(distPath, filename)) 53 | ], util.pitch); 54 | } 55 | 56 | build(); 57 | -------------------------------------------------------------------------------- /vendor/firebug-lite/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2007, Parakey Inc. 4 | All rights reserved. 5 | 6 | Redistribution and use of this software in source and binary forms, with or without modification, 7 | are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above 10 | copyright notice, this list of conditions and the 11 | following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above 14 | copyright notice, this list of conditions and the 15 | following disclaimer in the documentation and/or other 16 | materials provided with the distribution. 17 | 18 | * Neither the name of Parakey Inc. nor the names of its 19 | contributors may be used to endorse or promote products 20 | derived from this software without specific prior 21 | written permission of Parakey Inc. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 24 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 25 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 29 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors 2 | 3 | Based on Underscore.js, copyright Jeremy Ashkenas, 4 | DocumentCloud and Investigative Reporters & Editors 5 | 6 | This software consists of voluntary contributions made by many 7 | individuals. For exact contribution history, see the revision history 8 | available at https://github.com/lodash/lodash 9 | 10 | The following license applies to all parts of this software except as 11 | documented below: 12 | 13 | ==== 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining 16 | a copy of this software and associated documentation files (the 17 | "Software"), to deal in the Software without restriction, including 18 | without limitation the rights to use, copy, modify, merge, publish, 19 | distribute, sublicense, and/or sell copies of the Software, and to 20 | permit persons to whom the Software is furnished to do so, subject to 21 | the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be 24 | included in all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | 34 | ==== 35 | 36 | Copyright and related rights for sample code are waived via CC0. Sample 37 | code is defined as all source code displayed within the prose of the 38 | documentation. 39 | 40 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 41 | 42 | ==== 43 | 44 | Files located in the node_modules and vendor directories are externally 45 | maintained libraries used by this software which have their own 46 | licenses; we recommend you read them, as their terms may differ from the 47 | terms above. 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodash", 3 | "version": "4.17.0", 4 | "license": "MIT", 5 | "private": true, 6 | "main": "lodash.js", 7 | "engines": { "node": ">=4.0.0" }, 8 | "scripts": { 9 | "build": "npm run build:main && npm run build:fp", 10 | "build:fp": "node lib/fp/build-dist.js", 11 | "build:fp-modules": "node lib/fp/build-modules.js", 12 | "build:main": "node lib/main/build-dist.js", 13 | "build:main-modules": "node lib/main/build-modules.js", 14 | "doc": "node lib/main/build-doc github && npm run test:doc", 15 | "doc:fp": "node lib/fp/build-doc", 16 | "doc:site": "node lib/main/build-doc site", 17 | "doc:sitehtml": "optional-dev-dependency marky-markdown@^8.1.0 && npm run doc:site && node lib/main/build-site", 18 | "pretest": "npm run build", 19 | "style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test", 20 | "style:fp": "jscs fp/*.js lib/**/*.js", 21 | "style:main": "jscs lodash.js", 22 | "style:perf": "jscs perf/*.js perf/**/*.js", 23 | "style:test": "jscs test/*.js test/**/*.js", 24 | "test": "npm run test:main && npm run test:fp", 25 | "test:doc": "markdown-doctest doc/*.md", 26 | "test:fp": "node test/test-fp", 27 | "test:main": "node test/test", 28 | "validate": "npm run style && npm run test" 29 | }, 30 | "devDependencies": { 31 | "async": "^2.1.2", 32 | "benchmark": "^2.1.2", 33 | "chalk": "^1.1.3", 34 | "codecov.io": "~0.1.6", 35 | "coveralls": "^2.11.14", 36 | "curl-amd": "~0.8.12", 37 | "docdown": "~0.7.1", 38 | "dojo": "^1.11.2", 39 | "ecstatic": "^2.1.0", 40 | "fs-extra": "~1.0.0", 41 | "glob": "^7.1.1", 42 | "istanbul": "0.4.5", 43 | "jquery": "^3.1.1", 44 | "jscs": "^3.0.7", 45 | "lodash": "4.16.6", 46 | "lodash-doc-globals": "^0.1.1", 47 | "markdown-doctest": "^0.9.0", 48 | "optional-dev-dependency": "^1.4.0", 49 | "platform": "^1.3.2", 50 | "qunit-extras": "^3.0.0", 51 | "qunitjs": "^2.0.1", 52 | "request": "^2.78.0", 53 | "requirejs": "^2.3.2", 54 | "sauce-tunnel": "^2.5.0", 55 | "uglify-js": "2.7.4", 56 | "webpack": "^1.13.3" 57 | }, 58 | "greenkeeper": { 59 | "ignore": [ 60 | "lodash" 61 | ] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/fp/build-doc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const fs = require('fs-extra'); 5 | const path = require('path'); 6 | 7 | const file = require('../common/file'); 8 | const mapping = require('../common/mapping'); 9 | const util = require('../common/util'); 10 | 11 | const templatePath = path.join(__dirname, 'template/doc'); 12 | const template = file.globTemplate(path.join(templatePath, '*.jst')); 13 | 14 | const argNames = ['a', 'b', 'c', 'd']; 15 | 16 | const templateData = { 17 | mapping, 18 | toArgOrder, 19 | toFuncList 20 | }; 21 | 22 | /** 23 | * Converts arranged argument `indexes` into a named argument string 24 | * representation of their order. 25 | * 26 | * @private 27 | * @param {number[]} indexes The arranged argument indexes. 28 | * @returns {string} Returns the named argument string. 29 | */ 30 | function toArgOrder(indexes) { 31 | const reordered = []; 32 | _.each(indexes, (newIndex, index) => { 33 | reordered[newIndex] = argNames[index]; 34 | }); 35 | return '`(' + reordered.join(', ') + ')`'; 36 | } 37 | 38 | /** 39 | * Converts `funcNames` into a chunked list string representation. 40 | * 41 | * @private 42 | * @param {string[]} funcNames The function names. 43 | * @returns {string} Returns the function list string. 44 | */ 45 | function toFuncList(funcNames) { 46 | let chunks = _.chunk(funcNames.slice().sort(), 5); 47 | let lastChunk = _.last(chunks); 48 | const lastName = lastChunk ? lastChunk.pop() : undefined; 49 | 50 | chunks = _.reject(chunks, _.isEmpty); 51 | lastChunk = _.last(chunks); 52 | 53 | let result = '`' + _.map(chunks, chunk => chunk.join('`, `') + '`').join(',\n`'); 54 | if (lastName == null) { 55 | return result; 56 | } 57 | if (_.size(chunks) > 1 || _.size(lastChunk) > 1) { 58 | result += ','; 59 | } 60 | result += ' &'; 61 | result += _.size(lastChunk) < 5 ? ' ' : '\n'; 62 | return result + '`' + lastName + '`'; 63 | } 64 | 65 | /*----------------------------------------------------------------------------*/ 66 | 67 | /** 68 | * Creates the FP-Guide wiki at the `target` path. 69 | * 70 | * @private 71 | * @param {string} target The output file path. 72 | */ 73 | function build(target) { 74 | target = path.resolve(target); 75 | fs.writeFile(target, template.wiki(templateData), util.pitch); 76 | } 77 | 78 | build(_.last(process.argv)); 79 | -------------------------------------------------------------------------------- /lib/common/file.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const fs = require('fs-extra'); 5 | const glob = require('glob'); 6 | const path = require('path'); 7 | 8 | const minify = require('../common/minify.js'); 9 | 10 | /*----------------------------------------------------------------------------*/ 11 | 12 | /** 13 | * Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy) 14 | * function with `srcPath` and `destPath` partially applied. 15 | * 16 | * @memberOf file 17 | * @param {string} srcPath The path of the file to copy. 18 | * @param {string} destPath The path to copy the file to. 19 | * @returns {Function} Returns the partially applied function. 20 | */ 21 | function copy(srcPath, destPath) { 22 | return _.partial(fs.copy, srcPath, destPath); 23 | } 24 | 25 | /** 26 | * Creates an object of base name and compiled template pairs that match `pattern`. 27 | * 28 | * @memberOf file 29 | * @param {string} pattern The glob pattern to be match. 30 | * @returns {Object} Returns the object of compiled templates. 31 | */ 32 | function globTemplate(pattern) { 33 | return _.transform(glob.sync(pattern), (result, filePath) => { 34 | const key = path.basename(filePath, path.extname(filePath)); 35 | result[key] = _.template(fs.readFileSync(filePath, 'utf8')); 36 | }, {}); 37 | } 38 | 39 | /** 40 | * Creates a `minify` function with `srcPath` and `destPath` partially applied. 41 | * 42 | * @memberOf file 43 | * @param {string} srcPath The path of the file to minify. 44 | * @param {string} destPath The path to write the file to. 45 | * @returns {Function} Returns the partially applied function. 46 | */ 47 | function min(srcPath, destPath) { 48 | return _.partial(minify, srcPath, destPath); 49 | } 50 | 51 | /** 52 | * Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) 53 | * function with `filePath` and `data` partially applied. 54 | * 55 | * @memberOf file 56 | * @param {string} destPath The path to write the file to. 57 | * @param {string} data The data to write to the file. 58 | * @returns {Function} Returns the partially applied function. 59 | */ 60 | function write(destPath, data) { 61 | return _.partial(fs.writeFile, destPath, data); 62 | } 63 | 64 | /*----------------------------------------------------------------------------*/ 65 | 66 | module.exports = { 67 | copy, 68 | globTemplate, 69 | min, 70 | write 71 | }; 72 | -------------------------------------------------------------------------------- /lib/main/build-doc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const docdown = require('docdown'); 5 | const fs = require('fs-extra'); 6 | const path = require('path'); 7 | 8 | const util = require('../common/util'); 9 | 10 | const basePath = path.join(__dirname, '..', '..'); 11 | const docPath = path.join(basePath, 'doc'); 12 | const readmePath = path.join(docPath, 'README.md'); 13 | 14 | const pkg = require('../../package.json'); 15 | const version = pkg.version; 16 | 17 | const config = { 18 | 'base': { 19 | 'path': path.join(basePath, 'lodash.js'), 20 | 'title': `lodash v${ version }`, 21 | 'toc': 'categories', 22 | 'url': `https://github.com/lodash/lodash/blob/${ version }/lodash.js` 23 | }, 24 | 'github': { 25 | 'style': 'github', 26 | 'sublinks': [npmLink('Ⓝ', 'See the npm package')] 27 | }, 28 | 'site': { 29 | 'entryLink': '', 30 | 'sourceLink': '[source](${sourceHref})', 31 | 'tocHref': '', 32 | 'tocLink': '', 33 | 'sublinks': [npmLink('npm package')] 34 | } 35 | }; 36 | 37 | /** 38 | * Composes a npm link from `text` and optional `title`. 39 | * 40 | * @private 41 | * @param {string} text The link text. 42 | * @param {string} [title] The link title. 43 | * @returns {string} Returns the composed npm link. 44 | */ 45 | function npmLink(text, title) { 46 | return ( 47 | '<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' + 48 | 'print(' + 49 | '"[' + text + '](https://www.npmjs.com/package/lodash." + name.toLowerCase() + ' + 50 | '"' + (title == null ? '' : ' \\"' + title + '\\"') + ')"' + 51 | ');' + 52 | '} %>' 53 | ); 54 | } 55 | 56 | /** 57 | * Post-process `markdown` to make adjustments. 58 | * 59 | * @private 60 | * @param {string} markdown The markdown to process. 61 | * @returns {string} Returns the processed markdown. 62 | */ 63 | function postprocess(markdown) { 64 | // Wrap symbol property identifiers in brackets. 65 | return markdown.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]'); 66 | } 67 | 68 | /*----------------------------------------------------------------------------*/ 69 | 70 | /** 71 | * Creates the documentation markdown formatted for 'github' or 'site'. 72 | * 73 | * @private 74 | * @param {string} type The format type. 75 | */ 76 | function build(type) { 77 | const options = _.defaults({}, config.base, config[type]); 78 | const markdown = docdown(options); 79 | 80 | fs.writeFile(readmePath, postprocess(markdown), util.pitch); 81 | } 82 | 83 | build(_.last(process.argv)); 84 | -------------------------------------------------------------------------------- /perf/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | lodash Performance Suite 6 | 35 | 36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 52 | 53 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "maxErrors": "2000", 3 | "maximumLineLength": { 4 | "value": 180, 5 | "allExcept": ["comments", "functionSignature", "regex"] 6 | }, 7 | "requireCurlyBraces": [ 8 | "if", 9 | "else", 10 | "for", 11 | "while", 12 | "do", 13 | "try", 14 | "catch" 15 | ], 16 | "requireOperatorBeforeLineBreak": [ 17 | "=", 18 | "+", 19 | "-", 20 | "/", 21 | "*", 22 | "==", 23 | "===", 24 | "!=", 25 | "!==", 26 | ">", 27 | ">=", 28 | "<", 29 | "<=" 30 | ], 31 | "requireSpaceAfterKeywords": [ 32 | "if", 33 | "else", 34 | "for", 35 | "while", 36 | "do", 37 | "switch", 38 | "return", 39 | "try", 40 | "catch" 41 | ], 42 | "requireSpaceBeforeBinaryOperators": [ 43 | "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", 44 | "&=", "|=", "^=", 45 | 46 | "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", 47 | "|", "^", "&&", "||", "===", "==", ">=", 48 | "<=", "<", ">", "!=", "!==" 49 | ], 50 | "requireSpacesInFunctionExpression": { 51 | "beforeOpeningCurlyBrace": true 52 | }, 53 | "requireCamelCaseOrUpperCaseIdentifiers": true, 54 | "requireDotNotation": { "allExcept": ["keywords"] }, 55 | "requireEarlyReturn": true, 56 | "requireLineFeedAtFileEnd": true, 57 | "requireSemicolons": true, 58 | "requireSpaceAfterBinaryOperators": true, 59 | "requireSpacesInConditionalExpression": true, 60 | "requireSpaceBeforeObjectValues": true, 61 | "requireSpaceBeforeBlockStatements": true, 62 | "requireSpacesInForStatement": true, 63 | 64 | "validateIndentation": 2, 65 | "validateParameterSeparator": ", ", 66 | "validateQuoteMarks": { "mark": "'", "escape": true }, 67 | 68 | "disallowSpacesInAnonymousFunctionExpression": { 69 | "beforeOpeningRoundBrace": true 70 | }, 71 | "disallowSpacesInFunctionDeclaration": { 72 | "beforeOpeningRoundBrace": true 73 | }, 74 | "disallowSpacesInFunctionExpression": { 75 | "beforeOpeningRoundBrace": true 76 | }, 77 | "disallowKeywords": ["with"], 78 | "disallowMixedSpacesAndTabs": true, 79 | "disallowMultipleLineBreaks": true, 80 | "disallowNewlineBeforeBlockStatements": true, 81 | "disallowSpaceAfterObjectKeys": true, 82 | "disallowSpaceAfterPrefixUnaryOperators": true, 83 | "disallowSpacesInCallExpression": true, 84 | "disallowSpacesInsideArrayBrackets": true, 85 | "disallowSpacesInsideParentheses": true, 86 | "disallowTrailingWhitespace": true, 87 | "disallowUnusedVariables": true, 88 | 89 | "jsDoc": { 90 | "checkRedundantAccess": true, 91 | "checkTypes": true, 92 | "requireNewlineAfterDescription": true, 93 | "requireParamDescription": true, 94 | "requireParamTypes": true, 95 | "requireReturnTypes": true 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lodash v4.16.6 2 | 3 | [Site](https://lodash.com/) | 4 | [Docs](https://lodash.com/docs) | 5 | [FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) | 6 | [Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) | 7 | [Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") | 8 | [Code of Conduct](https://js.foundation/conduct/) | 9 | [Twitter](https://twitter.com/bestiejs) | 10 | [Chat](https://gitter.im/lodash/lodash) 11 | 12 | The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. 13 | 14 | Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): 15 | ```shell 16 | $ npm run build 17 | $ lodash -o ./dist/lodash.js 18 | $ lodash core -o ./dist/lodash.core.js 19 | ``` 20 | 21 | ## Download 22 | 23 | * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.16.6/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.16.6/dist/lodash.core.min.js)) 24 | * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.16.6/dist/lodash.js) ([~23 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.16.6/dist/lodash.min.js)) 25 | * [CDN copies](https://www.jsdelivr.com/projects/lodash) 26 | 27 | Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.16.6/LICENSE) & supports [modern environments](#support).
28 | Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. 29 | 30 | ## Installation 31 | 32 | In a browser: 33 | ```html 34 | 35 | ``` 36 | 37 | Using npm: 38 | ```shell 39 | $ npm i -g npm 40 | $ npm i --save lodash 41 | ``` 42 | 43 | In Node.js: 44 | ```js 45 | // Load the full build. 46 | var _ = require('lodash'); 47 | // Load the core build. 48 | var _ = require('lodash/core'); 49 | // Load the FP build for immutable auto-curried iteratee-first data-last methods. 50 | var fp = require('lodash/fp'); 51 | 52 | // Load method categories. 53 | var array = require('lodash/array'); 54 | var object = require('lodash/fp/object'); 55 | 56 | // Cherry-pick methods for smaller browserify/rollup/webpack bundles. 57 | var at = require('lodash/at'); 58 | var curryN = require('lodash/fp/curryN'); 59 | ``` 60 | 61 | **Note:**
62 | Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. 63 | 64 | ## Why Lodash? 65 | 66 | Lodash makes JavaScript easier by taking the hassle out of working with arrays,
67 | numbers, objects, strings, etc. Lodash’s modular methods are great for: 68 | 69 | * Iterating arrays, objects, & strings 70 | * Manipulating & testing values 71 | * Creating composite functions 72 | 73 | ## Module Formats 74 | 75 | Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & module formats. 76 | 77 | * [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized) 78 | * [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin) 79 | * [lodash/fp](https://github.com/lodash/lodash/tree/npm/fp) 80 | * [lodash-amd](https://www.npmjs.com/package/lodash-amd) 81 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Lodash 2 | 3 | Contributions are always welcome. Before contributing please read the 4 | [code of conduct](https://js.foundation/conduct/) & 5 | [search the issue tracker](https://github.com/lodash/lodash/issues); your issue 6 | may have already been discussed or fixed in `master`. To contribute, 7 | [fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes, 8 | & [send a pull request](https://help.github.com/articles/using-pull-requests/). 9 | 10 | ## Feature Requests 11 | 12 | Feature requests should be submitted in the 13 | [issue tracker](https://github.com/lodash/lodash/issues), with a description of 14 | the expected behavior & use case, where they’ll remain closed until sufficient interest, 15 | [e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/), 16 | has been [shown by the community](https://github.com/lodash/lodash/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc). 17 | Before submitting a request, please search for similar ones in the 18 | [closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement). 19 | 20 | ## Pull Requests 21 | 22 | For additions or bug fixes you should only need to modify `lodash.js`. Include 23 | updated unit tests in the `test` directory as part of your pull request. Don’t 24 | worry about regenerating the `dist/` or `doc/` files. 25 | 26 | Before running the unit tests you’ll need to install, `npm i`, 27 | [development dependencies](https://docs.npmjs.com/files/package.json#devdependencies). 28 | Run unit tests from the command-line via `npm test`, or open `test/index.html` & 29 | `test/fp.html` in a web browser. The [Backbone](http://backbonejs.org/) & 30 | [Underscore](http://underscorejs.org/) test suites are included as well. 31 | 32 | ## Contributor License Agreement 33 | 34 | Lodash is a member of the [JS Foundation](https://js.foundation/). 35 | As such, we request that all contributors sign the JS Foundation 36 | [contributor license agreement (CLA)](https://js.foundation/CLA/). 37 | 38 | For more information about CLAs, please check out Alex Russell’s excellent post, 39 | [“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/). 40 | 41 | ## Coding Guidelines 42 | 43 | In addition to the following guidelines, please follow the conventions already 44 | established in the code. 45 | 46 | - **Spacing**:
47 | Use two spaces for indentation. No tabs. 48 | 49 | - **Naming**:
50 | Keep variable & method names concise & descriptive.
51 | Variable names `index`, `array`, & `iteratee` are preferable to 52 | `i`, `arr`, & `fn`. 53 | 54 | - **Quotes**:
55 | Single-quoted strings are preferred to double-quoted strings; however, 56 | please use a double-quoted string if the value contains a single-quote 57 | character to avoid unnecessary escaping. 58 | 59 | - **Comments**:
60 | Please use single-line comments to annotate significant additions, & 61 | [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for 62 | functions. 63 | 64 | Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs): 65 | ```bash 66 | $ npm run style 67 | ``` 68 | 69 | ## Tips 70 | 71 | You can opt-in to a pre-push git hook by adding an `.opt-in` file to the root of 72 | the project containing: 73 | ```txt 74 | pre-push 75 | ``` 76 | 77 | With that, when you `git push`, the pre-push git hook will trigger and execute 78 | `npm run validate`. 79 | -------------------------------------------------------------------------------- /vendor/underscore/test/chaining.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var _ = typeof require == 'function' ? require('..') : window._; 3 | 4 | QUnit.module('Chaining'); 5 | 6 | QUnit.test('map/flatten/reduce', function(assert) { 7 | var lyrics = [ 8 | 'I\'m a lumberjack and I\'m okay', 9 | 'I sleep all night and I work all day', 10 | 'He\'s a lumberjack and he\'s okay', 11 | 'He sleeps all night and he works all day' 12 | ]; 13 | var counts = _(lyrics).chain() 14 | .map(function(line) { return line.split(''); }) 15 | .flatten() 16 | .reduce(function(hash, l) { 17 | hash[l] = hash[l] || 0; 18 | hash[l]++; 19 | return hash; 20 | }, {}) 21 | .value(); 22 | assert.equal(counts.a, 16, 'counted all the letters in the song'); 23 | assert.equal(counts.e, 10, 'counted all the letters in the song'); 24 | }); 25 | 26 | QUnit.test('select/reject/sortBy', function(assert) { 27 | var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; 28 | numbers = _(numbers).chain().select(function(n) { 29 | return n % 2 === 0; 30 | }).reject(function(n) { 31 | return n % 4 === 0; 32 | }).sortBy(function(n) { 33 | return -n; 34 | }).value(); 35 | assert.deepEqual(numbers, [10, 6, 2], 'filtered and reversed the numbers'); 36 | }); 37 | 38 | QUnit.test('select/reject/sortBy in functional style', function(assert) { 39 | var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; 40 | numbers = _.chain(numbers).select(function(n) { 41 | return n % 2 === 0; 42 | }).reject(function(n) { 43 | return n % 4 === 0; 44 | }).sortBy(function(n) { 45 | return -n; 46 | }).value(); 47 | assert.deepEqual(numbers, [10, 6, 2], 'filtered and reversed the numbers'); 48 | }); 49 | 50 | QUnit.test('reverse/concat/unshift/pop/map', function(assert) { 51 | var numbers = [1, 2, 3, 4, 5]; 52 | numbers = _(numbers).chain() 53 | .reverse() 54 | .concat([5, 5, 5]) 55 | .unshift(17) 56 | .pop() 57 | .map(function(n){ return n * 2; }) 58 | .value(); 59 | assert.deepEqual(numbers, [34, 10, 8, 6, 4, 2, 10, 10], 'can chain together array functions.'); 60 | }); 61 | 62 | QUnit.test('splice', function(assert) { 63 | var instance = _([1, 2, 3, 4, 5]).chain(); 64 | assert.deepEqual(instance.splice(1, 3).value(), [1, 5]); 65 | assert.deepEqual(instance.splice(1, 0).value(), [1, 5]); 66 | assert.deepEqual(instance.splice(1, 1).value(), [1]); 67 | assert.deepEqual(instance.splice(0, 1).value(), [], '#397 Can create empty array'); 68 | }); 69 | 70 | QUnit.test('shift', function(assert) { 71 | var instance = _([1, 2, 3]).chain(); 72 | assert.deepEqual(instance.shift().value(), [2, 3]); 73 | assert.deepEqual(instance.shift().value(), [3]); 74 | assert.deepEqual(instance.shift().value(), [], '#397 Can create empty array'); 75 | }); 76 | 77 | QUnit.test('pop', function(assert) { 78 | var instance = _([1, 2, 3]).chain(); 79 | assert.deepEqual(instance.pop().value(), [1, 2]); 80 | assert.deepEqual(instance.pop().value(), [1]); 81 | assert.deepEqual(instance.pop().value(), [], '#397 Can create empty array'); 82 | }); 83 | 84 | QUnit.test('chaining works in small stages', function(assert) { 85 | var o = _([1, 2, 3, 4]).chain(); 86 | assert.deepEqual(o.filter(function(i) { return i < 3; }).value(), [1, 2]); 87 | assert.deepEqual(o.filter(function(i) { return i > 2; }).value(), [3, 4]); 88 | }); 89 | 90 | QUnit.test('#1562: Engine proxies for chained functions', function(assert) { 91 | var wrapped = _(512); 92 | assert.strictEqual(wrapped.toJSON(), 512); 93 | assert.strictEqual(wrapped.valueOf(), 512); 94 | assert.strictEqual(+wrapped, 512); 95 | assert.strictEqual(wrapped.toString(), '512'); 96 | assert.strictEqual('' + wrapped, '512'); 97 | }); 98 | 99 | }()); 100 | -------------------------------------------------------------------------------- /perf/asset/perf-ui.js: -------------------------------------------------------------------------------- 1 | ;(function(window) { 2 | 'use strict'; 3 | 4 | /** The base path of the lodash builds. */ 5 | var basePath = '../'; 6 | 7 | /** The lodash build to load. */ 8 | var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]); 9 | 10 | /** The other library to load. */ 11 | var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]); 12 | 13 | /** The `ui` object. */ 14 | var ui = {}; 15 | 16 | /*--------------------------------------------------------------------------*/ 17 | 18 | // Initialize controls. 19 | addEventListener('load', function() { 20 | function eventHandler(event) { 21 | var buildIndex = buildList.selectedIndex, 22 | otherIndex = otherList.selectedIndex, 23 | search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, ''); 24 | 25 | if (event.stopPropagation) { 26 | event.stopPropagation(); 27 | } else { 28 | event.cancelBubble = true; 29 | } 30 | location.href = 31 | location.href.split('?')[0] + '?' + 32 | (search ? search + '&' : '') + 33 | 'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' + 34 | 'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value); 35 | } 36 | 37 | var span1 = document.createElement('span'); 38 | span1.style.cssText = 'float:right'; 39 | span1.innerHTML = 40 | '' + 41 | ''; 44 | 45 | var span2 = document.createElement('span'); 46 | span2.style.cssText = 'float:right'; 47 | span2.innerHTML = 48 | '' + 49 | ''; 54 | 55 | var buildList = span1.lastChild, 56 | otherList = span2.lastChild, 57 | toolbar = document.getElementById('perf-toolbar'); 58 | 59 | toolbar.appendChild(span2); 60 | toolbar.appendChild(span1); 61 | 62 | buildList.selectedIndex = (function() { 63 | switch (build) { 64 | case 'lodash': 65 | case null: return 0; 66 | } 67 | return -1; 68 | }()); 69 | 70 | otherList.selectedIndex = (function() { 71 | switch (other) { 72 | case 'underscore-dev': return 0; 73 | case 'lodash': return 2; 74 | case 'underscore': 75 | case null: return 1; 76 | } 77 | return -1; 78 | }()); 79 | 80 | buildList.addEventListener('change', eventHandler); 81 | otherList.addEventListener('change', eventHandler); 82 | }); 83 | 84 | // The lodash build file path. 85 | ui.buildPath = (function() { 86 | var result; 87 | switch (build) { 88 | case null: build = 'lodash'; 89 | case 'lodash': result = 'dist/lodash.min.js'; break; 90 | default: return build; 91 | } 92 | return basePath + result; 93 | }()); 94 | 95 | // The other library file path. 96 | ui.otherPath = (function() { 97 | var result; 98 | switch (other) { 99 | case 'lodash': result = 'dist/lodash.min.js'; break; 100 | case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break; 101 | case null: other = 'underscore'; 102 | case 'underscore': result = 'vendor/underscore/underscore-min.js'; break; 103 | default: return other; 104 | } 105 | return basePath + result; 106 | }()); 107 | 108 | ui.urlParams = { 'build': build, 'other': other }; 109 | 110 | window.ui = ui; 111 | 112 | }(this)); 113 | -------------------------------------------------------------------------------- /lib/fp/build-modules.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const async = require('async'); 5 | const glob = require('glob'); 6 | const path = require('path'); 7 | 8 | const file = require('../common/file'); 9 | const mapping = require('../common/mapping'); 10 | const util = require('../common/util'); 11 | 12 | const templatePath = path.join(__dirname, 'template/modules'); 13 | const template = file.globTemplate(path.join(templatePath, '*.jst')); 14 | 15 | const aryMethods = _.union( 16 | mapping.aryMethod[1], 17 | mapping.aryMethod[2], 18 | mapping.aryMethod[3], 19 | mapping.aryMethod[4] 20 | ); 21 | 22 | const categories = [ 23 | 'array', 24 | 'collection', 25 | 'date', 26 | 'function', 27 | 'lang', 28 | 'math', 29 | 'number', 30 | 'object', 31 | 'seq', 32 | 'string', 33 | 'util' 34 | ]; 35 | 36 | const ignored = [ 37 | '_*.js', 38 | 'core.js', 39 | 'core.min.js', 40 | 'fp.js', 41 | 'index.js', 42 | 'lodash.js', 43 | 'lodash.min.js' 44 | ]; 45 | 46 | /** 47 | * Checks if `name` is a method alias. 48 | * 49 | * @private 50 | * @param {string} name The name to check. 51 | * @returns {boolean} Returns `true` if `name` is a method alias, else `false`. 52 | */ 53 | function isAlias(name) { 54 | return _.has(mapping.aliasToReal, name); 55 | } 56 | 57 | /** 58 | * Checks if `name` is a category name. 59 | * 60 | * @private 61 | * @param {string} name The name to check. 62 | * @returns {boolean} Returns `true` if `name` is a category name, else `false`. 63 | */ 64 | function isCategory(name) { 65 | return _.includes(categories, name); 66 | } 67 | 68 | /** 69 | * Checks if `name` belongs to a method that's passed thru and not wrapped. 70 | * 71 | * @private 72 | * @param {string} name The name to check. 73 | * @returns {boolean} Returns `true` if `name` is of a pass thru method, 74 | * else `false`. 75 | */ 76 | function isThru(name) { 77 | return !_.includes(aryMethods, name); 78 | } 79 | 80 | /** 81 | * Gets metadata for `func`. 82 | * 83 | * @private 84 | * @param {Function} func The function to query. 85 | * @returns {*} Returns the metadata for `func`. 86 | */ 87 | function getTemplate(moduleName) { 88 | const data = { 89 | 'name': _.get(mapping.aliasToReal, moduleName, moduleName), 90 | 'mapping': mapping 91 | }; 92 | 93 | if (isAlias(moduleName)) { 94 | return template.alias(data); 95 | } 96 | if (isCategory(moduleName)) { 97 | return template.category(data); 98 | } 99 | if (isThru(moduleName)) { 100 | return template.thru(data); 101 | } 102 | return template.module(data); 103 | } 104 | 105 | /*----------------------------------------------------------------------------*/ 106 | 107 | /** 108 | * Creates FP modules at the `target` path. 109 | * 110 | * @private 111 | * @param {string} target The output directory path. 112 | */ 113 | function build(target) { 114 | target = path.resolve(target); 115 | 116 | const fpPath = path.join(target, 'fp'); 117 | 118 | // Glob existing lodash module paths. 119 | const modulePaths = glob.sync(path.join(target, '*.js'), { 120 | 'nodir': true, 121 | 'ignore': ignored.map(filename => { 122 | return path.join(target, filename); 123 | }) 124 | }); 125 | 126 | // Add FP alias and remapped module paths. 127 | _.each([mapping.aliasToReal, mapping.remap], data => { 128 | _.forOwn(data, (realName, alias) => { 129 | const modulePath = path.join(target, alias + '.js'); 130 | if (!_.includes(modulePaths, modulePath)) { 131 | modulePaths.push(modulePath); 132 | } 133 | }); 134 | }); 135 | 136 | const actions = modulePaths.map(modulePath => { 137 | const moduleName = path.basename(modulePath, '.js'); 138 | return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName)); 139 | }); 140 | 141 | actions.unshift(file.copy(path.join(__dirname, '../../fp'), fpPath)); 142 | actions.push(file.write(path.join(fpPath, '_falseOptions.js'), template._falseOptions())); 143 | actions.push(file.write(path.join(fpPath, '_util.js'), template._util())); 144 | actions.push(file.write(path.join(target, 'fp.js'), template.fp())); 145 | actions.push(file.write(path.join(fpPath, 'convert.js'), template.convert())); 146 | 147 | async.series(actions, util.pitch); 148 | } 149 | 150 | build(_.last(process.argv)); 151 | -------------------------------------------------------------------------------- /vendor/underscore/test/cross-document.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | if (typeof document == 'undefined') return; 3 | 4 | var _ = typeof require == 'function' ? require('..') : window._; 5 | 6 | QUnit.module('Cross Document'); 7 | /* global iObject, iElement, iArguments, iFunction, iArray, iError, iString, iNumber, iBoolean, iDate, iRegExp, iNaN, iNull, iUndefined, ActiveXObject */ 8 | 9 | // Setup remote variables for iFrame tests. 10 | var iframe = document.createElement('iframe'); 11 | iframe.frameBorder = iframe.height = iframe.width = 0; 12 | document.body.appendChild(iframe); 13 | var iDoc = (iDoc = iframe.contentDocument || iframe.contentWindow).document || iDoc; 14 | iDoc.write( 15 | [ 16 | '' 32 | ].join('\n') 33 | ); 34 | iDoc.close(); 35 | 36 | QUnit.test('isEqual', function(assert) { 37 | 38 | assert.notOk(_.isEqual(iNumber, 101)); 39 | assert.ok(_.isEqual(iNumber, 100)); 40 | 41 | // Objects from another frame. 42 | assert.ok(_.isEqual({}, iObject), 'Objects with equivalent members created in different documents are equal'); 43 | 44 | // Array from another frame. 45 | assert.ok(_.isEqual([1, 2, 3], iArray), 'Arrays with equivalent elements created in different documents are equal'); 46 | }); 47 | 48 | QUnit.test('isEmpty', function(assert) { 49 | assert.notOk(_([iNumber]).isEmpty(), '[1] is not empty'); 50 | assert.notOk(_.isEmpty(iArray), '[] is empty'); 51 | assert.ok(_.isEmpty(iObject), '{} is empty'); 52 | }); 53 | 54 | QUnit.test('isElement', function(assert) { 55 | assert.notOk(_.isElement('div'), 'strings are not dom elements'); 56 | assert.ok(_.isElement(document.body), 'the body tag is a DOM element'); 57 | assert.ok(_.isElement(iElement), 'even from another frame'); 58 | }); 59 | 60 | QUnit.test('isArguments', function(assert) { 61 | assert.ok(_.isArguments(iArguments), 'even from another frame'); 62 | }); 63 | 64 | QUnit.test('isObject', function(assert) { 65 | assert.ok(_.isObject(iElement), 'even from another frame'); 66 | assert.ok(_.isObject(iFunction), 'even from another frame'); 67 | }); 68 | 69 | QUnit.test('isArray', function(assert) { 70 | assert.ok(_.isArray(iArray), 'even from another frame'); 71 | }); 72 | 73 | QUnit.test('isString', function(assert) { 74 | assert.ok(_.isString(iString), 'even from another frame'); 75 | }); 76 | 77 | QUnit.test('isNumber', function(assert) { 78 | assert.ok(_.isNumber(iNumber), 'even from another frame'); 79 | }); 80 | 81 | QUnit.test('isBoolean', function(assert) { 82 | assert.ok(_.isBoolean(iBoolean), 'even from another frame'); 83 | }); 84 | 85 | QUnit.test('isFunction', function(assert) { 86 | assert.ok(_.isFunction(iFunction), 'even from another frame'); 87 | }); 88 | 89 | QUnit.test('isDate', function(assert) { 90 | assert.ok(_.isDate(iDate), 'even from another frame'); 91 | }); 92 | 93 | QUnit.test('isRegExp', function(assert) { 94 | assert.ok(_.isRegExp(iRegExp), 'even from another frame'); 95 | }); 96 | 97 | QUnit.test('isNaN', function(assert) { 98 | assert.ok(_.isNaN(iNaN), 'even from another frame'); 99 | }); 100 | 101 | QUnit.test('isNull', function(assert) { 102 | assert.ok(_.isNull(iNull), 'even from another frame'); 103 | }); 104 | 105 | QUnit.test('isUndefined', function(assert) { 106 | assert.ok(_.isUndefined(iUndefined), 'even from another frame'); 107 | }); 108 | 109 | QUnit.test('isError', function(assert) { 110 | assert.ok(_.isError(iError), 'even from another frame'); 111 | }); 112 | 113 | if (typeof ActiveXObject != 'undefined') { 114 | QUnit.test('IE host objects', function(assert) { 115 | var xml = new ActiveXObject('Msxml2.DOMDocument.3.0'); 116 | assert.notOk(_.isNumber(xml)); 117 | assert.notOk(_.isBoolean(xml)); 118 | assert.notOk(_.isNaN(xml)); 119 | assert.notOk(_.isFunction(xml)); 120 | assert.notOk(_.isNull(xml)); 121 | assert.notOk(_.isUndefined(xml)); 122 | }); 123 | 124 | QUnit.test('#1621 IE 11 compat mode DOM elements are not functions', function(assert) { 125 | var fn = function() {}; 126 | var xml = new ActiveXObject('Msxml2.DOMDocument.3.0'); 127 | var div = document.createElement('div'); 128 | 129 | // JIT the function 130 | var count = 200; 131 | while (count--) { 132 | _.isFunction(fn); 133 | } 134 | 135 | assert.equal(_.isFunction(xml), false); 136 | assert.equal(_.isFunction(div), false); 137 | assert.equal(_.isFunction(fn), true); 138 | }); 139 | } 140 | 141 | }()); 142 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: 4 | - 7 5 | 6 | addons: 7 | jwt: 8 | secure: OYhRpW+8A0Iik+9GmHwa45ZwXeBXw/6zh6I+1w2H9g/LqPRp+Nhq3f4FSpvrrfno8lO8W4h+7s6+JOzF8C8NxNda5UUygKjF9pUphgiQdqls3YZMJlC9zXVl7gQXAHi3nG1s8vWSpwpzYD9fqczE1FX9n0+R63qX3eB6C/LbPeI= 9 | 10 | cache: 11 | directories: 12 | - ~/.npm 13 | - ~/.yarn-cache 14 | - travis_phantomjs 15 | 16 | env: 17 | global: 18 | - BIN=node ISTANBUL=false OPTION="" 19 | - SAUCE_LABS=false SAUCE_USERNAME=lodash 20 | 21 | matrix: 22 | - 23 | - BIN=phantomjs 24 | - ISTANBUL=true 25 | - SAUCE_LABS=true 26 | 27 | matrix: 28 | include: 29 | - node_js: 6 30 | env: 31 | 32 | git: 33 | depth: 10 34 | 35 | branches: 36 | only: 37 | - master 38 | 39 | notifications: 40 | webhooks: 41 | urls: 42 | - https://webhooks.gitter.im/e/4aab6358b0e9aed0b628 43 | on_success: change 44 | on_failure: always 45 | 46 | before_install: 47 | # Upgrade PhantomJS. 48 | - | 49 | export PHANTOMJS_VERSION=2.1.1 50 | export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH 51 | if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then 52 | rm -rf $PWD/travis_phantomjs 53 | mkdir -p $PWD/travis_phantomjs 54 | wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 55 | tar -xvf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs 56 | fi 57 | phantomjs -v 58 | 59 | # Use exact Node version. 60 | - nvm use $TRAVIS_NODE_VERSION 61 | 62 | # Setup package managers. 63 | - npm set loglevel error 64 | - npm set progress false 65 | - npm i -g yarn 66 | - yarn -V 67 | 68 | # Remove code skipped on the coverage run. 69 | - | 70 | PATTERN[0]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|" 71 | PATTERN[1]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|" 72 | PATTERN[2]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|" 73 | PATTERN[3]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g" 74 | PATTERN[4]="|\s*if\s*\(cache\.size\b[\s\S]+?\}|" 75 | PATTERN[5]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|" 76 | PATTERN[6]="|\s*define\([\s\S]+?\);|" 77 | PATTERN[7]="|\s*root\._\s*=\s*_;|" 78 | 79 | if [ $ISTANBUL = true ]; then 80 | set -e 81 | for PTRN in ${PATTERN[@]}; do 82 | node ./test/remove.js $PTRN ./lodash.js 83 | done 84 | fi 85 | 86 | install: 87 | # Install packages. 88 | - yarn 89 | 90 | # Use lodash-cli from GitHub. 91 | - git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli 92 | - mkdir -p ./node_modules/lodash-cli/node_modules/lodash; cd $_; cp ../../../../lodash.js ./lodash.js; cp ../../../../package.json ./package.json 93 | - cd ../../; npm i --production; cd ../../ 94 | 95 | script: 96 | # Detect code coverage. 97 | - | 98 | if [ $ISTANBUL = true ]; then 99 | istanbul cover -x "**/vendor/**" --report lcovonly ./test/test.js -- ./lodash.js 100 | if [ $TRAVIS_SECURE_ENV_VARS = true ]; then 101 | cat ./coverage/lcov.info | coveralls 102 | cat ./coverage/coverage.json | codecov 103 | fi 104 | fi 105 | 106 | # Test in Node.js and PhantomJS. 107 | - | 108 | if [ $ISTANBUL = false ]; then 109 | node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js 110 | node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./ 111 | node ./node_modules/lodash-cli/bin/lodash -d -o ./lodash.js 112 | if [ $SAUCE_LABS = false ]; then 113 | cd ./test 114 | $BIN $OPTION ./test.js ../lodash.js 115 | if [ $TRAVIS_SECURE_ENV_VARS = true ]; then 116 | $BIN $OPTION ./test.js ../dist/lodash.min.js 117 | fi 118 | fi 119 | fi 120 | 121 | # Test in Sauce Labs. 122 | - | 123 | if [ $SAUCE_LABS = true ]; then 124 | node ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js 125 | npm run build 126 | $BIN ./test/saucelabs.js name="lodash tests" runner="test/index.html?build=../dist/lodash.js&noglobals=true" tags=development 127 | $BIN ./test/saucelabs.js name="lodash tests" runner="test/index.html?build=../dist/lodash.min.js&noglobals=true" tags=production 128 | $BIN ./test/saucelabs.js name="lodash-fp tests" runner="test/fp.html?noglobals=true" tags=development 129 | $BIN ./test/saucelabs.js name="underscore tests" runner="test/underscore.html?build=../dist/lodash.js" tags=development,underscore 130 | $BIN ./test/saucelabs.js name="underscore tests" runner="test/underscore.html?build=../dist/lodash.min.js" tags=production,underscore 131 | $BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.js" tags=development,backbone 132 | $BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.min.js" tags=production,backbone 133 | $BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.core.js" tags=development,backbone 134 | $BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.core.min.js" tags=production,backbone 135 | fi 136 | -------------------------------------------------------------------------------- /test/asset/test-ui.js: -------------------------------------------------------------------------------- 1 | ;(function(window) { 2 | 'use strict'; 3 | 4 | /** The base path of the lodash builds. */ 5 | var basePath = '../'; 6 | 7 | /** The lodash build to load. */ 8 | var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]); 9 | 10 | /** The module loader to use. */ 11 | var loader = (loader = /loader=([^&]+)/.exec(location.search)) && decodeURIComponent(loader[1]); 12 | 13 | /** The `ui` object. */ 14 | var ui = {}; 15 | 16 | /*--------------------------------------------------------------------------*/ 17 | 18 | // Initialize controls. 19 | addEventListener('load', function() { 20 | function eventHandler(event) { 21 | var buildIndex = buildList.selectedIndex, 22 | loaderIndex = loaderList.selectedIndex, 23 | search = location.search.replace(/^\?|&?(?:build|loader)=[^&]*&?/g, ''); 24 | 25 | if (event.stopPropagation) { 26 | event.stopPropagation(); 27 | } else { 28 | event.cancelBubble = true; 29 | } 30 | location.href = 31 | location.href.split('?')[0] + '?' + 32 | (search ? search + '&' : '') + 33 | 'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' + 34 | 'loader=' + (loaderIndex < 0 ? loader : loaderList[loaderIndex].value); 35 | } 36 | 37 | function init() { 38 | var toolbar = document.getElementById('qunit-testrunner-toolbar'); 39 | if (!toolbar) { 40 | setTimeout(init, 15); 41 | return; 42 | } 43 | toolbar.insertBefore(span2, toolbar.lastChild); 44 | toolbar.insertBefore(span1, span2); 45 | 46 | buildList.selectedIndex = (function() { 47 | switch (build) { 48 | case 'lodash': return 1; 49 | case 'lodash-core-dev': return 2; 50 | case 'lodash-core': return 3; 51 | case 'lodash-dev': 52 | case null: return 0; 53 | } 54 | return -1; 55 | }()); 56 | 57 | loaderList.selectedIndex = (function() { 58 | switch (loader) { 59 | case 'curl': return 1; 60 | case 'dojo': return 2; 61 | case 'requirejs': return 3; 62 | case 'none': 63 | case null: return 0; 64 | } 65 | return -1; 66 | }()); 67 | 68 | buildList.addEventListener('change', eventHandler); 69 | loaderList.addEventListener('change', eventHandler); 70 | } 71 | 72 | var span1 = document.createElement('span'); 73 | span1.innerHTML = 74 | '' + 75 | ''; 81 | 82 | var span2 = document.createElement('span'); 83 | span2.innerHTML = 84 | '' + 85 | ''; 91 | 92 | span1.style.cssText = 93 | span2.style.cssText = 'display:inline-block;float:right;line-height:2.1em;margin-left:1em;margin-top:0;'; 94 | 95 | span1.firstChild.style.cssText = 96 | span2.firstChild.style.cssText = 'display:inline-block;margin-right:.5em;'; 97 | 98 | var buildList = span1.lastChild, 99 | loaderList = span2.lastChild; 100 | 101 | setTimeout(function() { 102 | ui.timing.loadEventEnd = +new Date; 103 | }, 1); 104 | 105 | init(); 106 | }); 107 | 108 | // The lodash build file path. 109 | ui.buildPath = (function() { 110 | var result; 111 | switch (build) { 112 | case 'lodash': result = 'dist/lodash.min.js'; break; 113 | case 'lodash-core-dev': result = 'dist/lodash.core.js'; break; 114 | case 'lodash-core': result = 'dist/lodash.core.min.js'; break; 115 | case null: build = 'lodash-dev'; 116 | case 'lodash-dev': result = 'lodash.js'; break; 117 | default: return build; 118 | } 119 | return basePath + result; 120 | }()); 121 | 122 | // The module loader file path. 123 | ui.loaderPath = (function() { 124 | var result; 125 | switch (loader) { 126 | case 'curl': result = 'node_modules/curl-amd/dist/curl-kitchen-sink/curl.js'; break; 127 | case 'dojo': result = 'node_modules/dojo/dojo.js'; break; 128 | case 'requirejs': result = 'node_modules/requirejs/require.js'; break; 129 | case null: loader = 'none'; return ''; 130 | default: return loader; 131 | } 132 | return basePath + result; 133 | }()); 134 | 135 | // Used to indicate testing a core build. 136 | ui.isCore = /\bcore(\.min)?\.js\b/.test(ui.buildPath); 137 | 138 | // Used to indicate testing a foreign file. 139 | ui.isForeign = RegExp('^(\\w+:)?//').test(build); 140 | 141 | // Used to indicate testing a modularized build. 142 | ui.isModularize = /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]); 143 | 144 | // Used to indicate testing in Sauce Labs' automated test cloud. 145 | ui.isSauceLabs = location.port == '9001'; 146 | 147 | // Used to indicate that lodash is in strict mode. 148 | ui.isStrict = /\bes\b/.test([location.pathname, location.search]); 149 | 150 | ui.urlParams = { 'build': build, 'loader': loader }; 151 | ui.timing = { 'loadEventEnd': 0 }; 152 | 153 | window.ui = ui; 154 | 155 | }(this)); 156 | -------------------------------------------------------------------------------- /lib/main/build-site.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const fs = require('fs'); 5 | const marky = require('marky-markdown'); 6 | const path = require('path'); 7 | const util = require('../common/util'); 8 | 9 | const basePath = path.join(__dirname, '..', '..'); 10 | const docPath = path.join(basePath, 'doc'); 11 | const readmePath = path.join(docPath, 'README.md'); 12 | 13 | const highlights = { 14 | 'html': [ 15 | 'string' 16 | ], 17 | 'js': [ 18 | 'comment', 19 | 'console', 20 | 'delimiter', 21 | 'method', 22 | 'modifier', 23 | 'name', 24 | 'numeric', 25 | 'string', 26 | 'support', 27 | 'type' 28 | ] 29 | }; 30 | 31 | const exts = _.keys(highlights); 32 | 33 | /** 34 | * Converts Lodash method references into documentation links. 35 | * 36 | * @private 37 | * @param {Object} $ The Cheerio object. 38 | */ 39 | function autoLink($) { 40 | $('.doc-container code').each(function() { 41 | const $code = $(this); 42 | const html = $code.html(); 43 | if (/^_\.\w+$/.test(html)) { 44 | const id = html.split('.')[1]; 45 | $code.replaceWith(`_.${ id }`); 46 | } 47 | }); 48 | } 49 | 50 | /** 51 | * Removes horizontal rules from the document. 52 | * 53 | * @private 54 | * @param {Object} $ The Cheerio object. 55 | */ 56 | function removeHorizontalRules($) { 57 | $('hr').remove(); 58 | } 59 | 60 | /** 61 | * Removes marky-markdown specific ids and class names. 62 | * 63 | * @private 64 | * @param {Object} $ The Cheerio object. 65 | */ 66 | function removeMarkyAttributes($) { 67 | $('[id^="user-content-"]') 68 | .attr('class', null) 69 | .attr('id', null); 70 | 71 | $(':header:not(h3) > a').each(function() { 72 | const $a = $(this); 73 | $a.replaceWith($a.html()); 74 | }); 75 | } 76 | 77 | /** 78 | * Renames "_" id and anchor references to "lodash". 79 | * 80 | * @private 81 | * @param {Object} $ The Cheerio object. 82 | */ 83 | function renameLodashId($) { 84 | $('#_').attr('id', 'lodash'); 85 | $('[href="#_"]').attr('href', '#lodash'); 86 | } 87 | 88 | /** 89 | * Repairs broken marky-markdown headers. 90 | * See https://github.com/npm/marky-markdown/issues/217 for more details. 91 | * 92 | * @private 93 | * @param {Object} $ The Cheerio object. 94 | */ 95 | function repairMarkyHeaders($) { 96 | $('p:empty + h3').prev().remove(); 97 | 98 | $('h3 ~ p:empty').each(function() { 99 | const $p = $(this); 100 | let node = this.prev; 101 | while ((node = node.prev) && node.name != 'h3' && node.name != 'p') { 102 | $p.prepend(node.next); 103 | } 104 | }); 105 | 106 | $('h3 code em').parent().each(function() { 107 | const $code = $(this); 108 | $code.html($code.html().replace(/<\/?em>/g, '_')); 109 | }); 110 | } 111 | 112 | /** 113 | * Cleans up highlights blocks by removing extraneous class names and elements. 114 | * 115 | * @private 116 | * @param {Object} $ The Cheerio object. 117 | */ 118 | function tidyHighlights($) { 119 | $('.highlight').each(function() { 120 | let $spans; 121 | const $parent = $(this); 122 | const classes = $parent.find('.source,.text').first().attr('class').split(' '); 123 | const ext = _(classes).intersection(exts).last(); 124 | 125 | $parent.addClass(ext); 126 | 127 | // Remove line indicators for single line snippets. 128 | $parent.children('pre').each(function() { 129 | const $divs = $(this).children('div'); 130 | if ($divs.length == 1) { 131 | $divs.replaceWith($divs.html()); 132 | } 133 | }); 134 | // Remove extraneous class names. 135 | $parent.find('[class]').each(function() { 136 | const $element = $(this); 137 | const classes = $element.attr('class').split(' '); 138 | const attr = _(classes).intersection(highlights[ext]).join(' '); 139 | $element.attr('class', attr || null); 140 | }); 141 | // Collapse nested comment highlights. 142 | $parent.find(`[class~="comment"]`).each(function() { 143 | const $element = $(this); 144 | $element.text($element.text().trim()); 145 | }); 146 | // Collapse nested string highlights. 147 | $parent.find(`[class~="string"]`).each(function() { 148 | const $element = $(this); 149 | $element.text($element.text()); 150 | }); 151 | // Collapse nested spans. 152 | while (($spans = $parent.find('span:not([class])')).length) { 153 | $spans.each(function() { 154 | let $span = $(this); 155 | while ($span[0] && $span[0].name == 'span' && !$span.attr('class')) { 156 | const $parent = $span.parent(); 157 | $span.replaceWith($span.html()); 158 | $span = $parent; 159 | } 160 | }); 161 | } 162 | }); 163 | } 164 | 165 | /*----------------------------------------------------------------------------*/ 166 | 167 | /** 168 | * Creates the documentation HTML. 169 | * 170 | * @private 171 | */ 172 | function build() { 173 | const markdown = fs 174 | // Load markdown. 175 | .readFileSync(readmePath, 'utf8') 176 | // Uncomment docdown HTML hints. 177 | .replace(/(<)!--\s*|\s*--(>)/g, '$1$2'); 178 | 179 | const $ = marky(markdown, { 'sanitize': false }); 180 | const $header = $('h1').first().remove(); 181 | const version = $header.find('span').first().text().trim().slice(1); 182 | 183 | // Auto-link Lodash method references. 184 | autoLink($); 185 | // Rename "_" id references to "lodash". 186 | renameLodashId($); 187 | // Remove docdown horizontal rules. 188 | removeHorizontalRules($); 189 | // Remove marky-markdown attribute additions. 190 | removeMarkyAttributes($); 191 | // Repair marky-markdown wrapping around headers. 192 | repairMarkyHeaders($); 193 | // Cleanup highlights. 194 | tidyHighlights($); 195 | 196 | const html = [ 197 | // Append YAML front matter. 198 | '---', 199 | 'id: docs', 200 | 'layout: docs', 201 | 'title: Lodash Documentation', 202 | 'version: ' + (version || null), 203 | '---', 204 | '', 205 | // Wrap in raw tags to avoid Liquid template tag processing. 206 | '{% raw %}', 207 | $.html().trim(), 208 | '{% endraw %}', 209 | '' 210 | ].join('\n'); 211 | 212 | fs.writeFile(path.join(docPath, version + '.html'), html, util.pitch); 213 | } 214 | 215 | build(); 216 | -------------------------------------------------------------------------------- /test/backbone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Backbone Test Suite 6 | 7 | 8 | 9 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 84 | 102 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /lib/fp/template/doc/wiki.jst: -------------------------------------------------------------------------------- 1 | ## lodash/fp 2 | 3 | The `lodash/fp` module promotes a more 4 | [functional programming](https://en.wikipedia.org/wiki/Functional_programming) 5 | (FP) friendly style by exporting an instance of `lodash` with its methods wrapped 6 | to produce immutable auto-curried iteratee-first data-last methods. 7 | 8 | ## Installation 9 | 10 | In a browser: 11 | ```html 12 | 13 | 26 | ``` 27 | 28 | In Node.js: 29 | ```js 30 | // Load the fp build. 31 | var fp = require('lodash/fp'); 32 | 33 | // Load a method category. 34 | var object = require('lodash/fp/object'); 35 | 36 | // Load a single method for smaller builds with browserify/rollup/webpack. 37 | var extend = require('lodash/fp/extend'); 38 | ``` 39 | 40 | ## Mapping 41 | 42 | Immutable auto-curried iteratee-first data-last methods sound great, but what 43 | does that really mean for each method? Below is a breakdown of the mapping used 44 | to convert each method. 45 | 46 | #### Capped Iteratee Arguments 47 | 48 | Iteratee arguments are capped to avoid gotchas with variadic iteratees. 49 | ```js 50 | // The `lodash/map` iteratee receives three arguments: 51 | // (value, index|key, collection) 52 | _.map(['6', '8', '10'], parseInt); 53 | // ➜ [6, NaN, 2] 54 | 55 | // The `lodash/fp/map` iteratee is capped at one argument: 56 | // (value) 57 | fp.map(parseInt)(['6', '8', '10']); 58 | // ➜ [6, 8, 10] 59 | ``` 60 | 61 | Methods that cap iteratees to one argument:
62 | <%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %> 63 | 64 | Methods that cap iteratees to two arguments:
65 | <%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %> 66 | 67 | The iteratee of `mapKeys` is invoked with one argument: (key) 68 | 69 | #### Fixed Arity 70 | 71 | Methods have fixed arities to support auto-currying. 72 | ```js 73 | // `lodash/padStart` accepts an optional `chars` param. 74 | _.padStart('a', 3, '-') 75 | // ➜ '--a' 76 | 77 | // `lodash/fp/padStart` does not. 78 | fp.padStart(3)('a'); 79 | // ➜ ' a' 80 | fp.padCharsStart('-')(3)('a'); 81 | // ➜ '--a' 82 | ``` 83 | 84 | Methods with a fixed arity of one:
85 | <%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %> 86 | 87 | Methods with a fixed arity of two:
88 | <%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %> 89 | 90 | Methods with a fixed arity of three:
91 | <%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %> 92 | 93 | Methods with a fixed arity of four:
94 | <%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %> 95 | 96 | #### Rearranged Arguments 97 | 98 | Method arguments are rearranged to make composition easier. 99 | ```js 100 | // `lodash/filter` is data-first iteratee-last: 101 | // (collection, iteratee) 102 | var compact = _.partial(_.filter, _, Boolean); 103 | compact(['a', null, 'c']); 104 | // ➜ ['a', 'c'] 105 | 106 | // `lodash/fp/filter` is iteratee-first data-last: 107 | // (iteratee, collection) 108 | var compact = fp.filter(Boolean); 109 | compact(['a', null, 'c']); 110 | // ➜ ['a', 'c'] 111 | ``` 112 | 113 | ##### Most methods follow these rules 114 | 115 | A fixed arity of two has an argument order of:
116 | <%= toArgOrder(mapping.aryRearg[2]) %> 117 | 118 | A fixed arity of three has an argument order of:
119 | <%= toArgOrder(mapping.aryRearg[3]) %> 120 | 121 | A fixed arity of four has an argument order of:
122 | <%= toArgOrder(mapping.aryRearg[4]) %> 123 | 124 | ##### Exceptions to the rules 125 | 126 | Methods that accept an array as their last or only argument:
127 | <%= toFuncList(_.keys(mapping.methodSpread)) %> 128 | 129 | Methods with unchanged argument orders:
130 | <%= toFuncList(_.keys(mapping.skipRearg)) %> 131 | 132 | Methods with custom argument orders:
133 | <%= _.map(_.keys(mapping.methodRearg), methodName => { 134 | const orders = mapping.methodRearg[methodName]; 135 | return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders); 136 | }).join('\n') %> 137 | 138 | #### New Methods 139 | 140 | Not all variadic methods have corresponding new method variants. Feel free to 141 | [request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests) 142 | any additions. 143 | 144 | Methods created to accommodate Lodash’s variadic methods:
145 | <%= toFuncList(_.keys(mapping.remap)) %> 146 | 147 | #### Aliases 148 | 149 | There are <%= _.size(mapping.aliasToReal) %> method aliases:
150 | <%= _.map(_.keys(mapping.aliasToReal).sort(), alias => { 151 | const realName = mapping.aliasToReal[alias]; 152 | return ' * `_.' + alias + '` is an alias of `_.' + realName + '`'; 153 | }).join('\n') %> 154 | 155 | ## Placeholders 156 | 157 | The placeholder argument, which defaults to `_`, may be used to fill in method 158 | arguments in a different order. Placeholders are filled by the first available 159 | arguments of the curried returned function. 160 | ```js 161 | // The equivalent of `2 > 5`. 162 | _.gt(2)(5); 163 | // ➜ false 164 | 165 | // The equivalent of `_.gt(5, 2)` or `5 > 2`. 166 | _.gt(_, 2)(5); 167 | // ➜ true 168 | ``` 169 | 170 | ## Chaining 171 | 172 | The `lodash/fp` module **does not** convert chain sequence methods. See 173 | [Izaak Schroeder’s article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba) 174 | on using functional composition as an alternative to method chaining. 175 | 176 | ## Convert 177 | 178 | Although `lodash/fp` & its method modules come pre-converted, there are times 179 | when you may want to customize the conversion. That’s when the `convert` method 180 | comes in handy. 181 | ```js 182 | // Every option is `true` by default. 183 | var _fp = fp.convert({ 184 | // Specify capping iteratee arguments. 185 | 'cap': true, 186 | // Specify currying. 187 | 'curry': true, 188 | // Specify fixed arity. 189 | 'fixed': true, 190 | // Specify immutable operations. 191 | 'immutable': true, 192 | // Specify rearranging arguments. 193 | 'rearg': true 194 | }); 195 | 196 | // The `convert` method is available on each method too. 197 | var mapValuesWithKey = fp.mapValues.convert({ 'cap': false }); 198 | 199 | // Here’s an example of disabling iteratee argument caps to access the `key` param. 200 | mapValuesWithKey(function(value, key) { 201 | return key == 'a' ? -1 : value; 202 | })({ 'a': 1, 'b': 1 }); 203 | // => { 'a': -1, 'b': 1 } 204 | ``` 205 | 206 | Manual conversions are also possible with the `convert` module. 207 | ```js 208 | var convert = require('lodash/fp/convert'); 209 | 210 | // Convert by name. 211 | var assign = convert('assign', require('lodash.assign')); 212 | 213 | // Convert by object. 214 | var fp = convert({ 215 | 'assign': require('lodash.assign'), 216 | 'chunk': require('lodash.chunk') 217 | }); 218 | 219 | // Convert by `lodash` instance. 220 | var fp = convert(lodash.runInContext()); 221 | ``` 222 | 223 | ## Tooling 224 | 225 | Use [eslint-plugin-lodash-fp](https://www.npmjs.com/package/eslint-plugin-lodash-fp) 226 | to help use `lodash/fp` more efficiently. 227 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/firebug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firebug Lite 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 153 | 154 | 155 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 196 | 197 | 198 | 199 | 200 |
17 | 18 | 24 | 25 | 26 |
27 |   28 |   29 |   30 |
31 | 32 | 33 |
34 |
35 | 36 | 37 | 38 |   39 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | 49 | Inspect 50 | 51 | 52 | 53 | 54 | Clear 55 | 56 | 57 | 58 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 73 | 74 | 75 |
76 | 77 |
78 | 79 | 80 |
81 | 82 | 83 | 111 | 112 | 113 |
114 |
115 | 132 |
133 |
134 | 135 |
136 | 137 | 138 |
 
139 | 140 |
148 |
149 |
150 |
151 |
152 |
156 | 157 | 158 |
 
159 | 160 | 161 |
162 | 163 | 164 |
165 |
166 |
167 | 168 |
169 | 170 | 171 | 172 | 173 | 174 |
175 | Run 176 | Clear 177 | 178 | 179 |
180 | 181 |
190 |
191 |
>>>
192 | 193 | 194 |
195 |
201 | 202 | 203 | 204 | 205 | 206 | 207 | 214 | 215 | -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/html.css: -------------------------------------------------------------------------------- 1 | /* See license.txt for terms of usage */ 2 | 3 | .panelNode-html { 4 | -moz-box-sizing: padding-box; 5 | padding: 4px 0 0 2px; 6 | } 7 | 8 | .nodeBox { 9 | position: relative; 10 | font-family: Monaco, monospace; 11 | padding-left: 13px; 12 | -moz-user-select: -moz-none; 13 | } 14 | .nodeBox.search-selection { 15 | -moz-user-select: text; 16 | } 17 | .twisty { 18 | position: absolute; 19 | left: 0px; 20 | top: 0px; 21 | width: 14px; 22 | height: 14px; 23 | } 24 | 25 | .nodeChildBox { 26 | margin-left: 12px; 27 | display: none; 28 | } 29 | 30 | .nodeLabel, 31 | .nodeCloseLabel { 32 | margin: -2px 2px 0 2px; 33 | border: 2px solid transparent; 34 | -moz-border-radius: 3px; 35 | padding: 0 2px; 36 | color: #000088; 37 | } 38 | 39 | .nodeCloseLabel { 40 | display: none; 41 | } 42 | 43 | .nodeTag { 44 | cursor: pointer; 45 | color: blue; 46 | } 47 | 48 | .nodeValue { 49 | color: #FF0000; 50 | font-weight: normal; 51 | } 52 | 53 | .nodeText, 54 | .nodeComment { 55 | margin: 0 2px; 56 | vertical-align: top; 57 | } 58 | 59 | .nodeText { 60 | color: #333333; 61 | } 62 | 63 | .nodeWhiteSpace { 64 | border: 1px solid LightGray; 65 | white-space: pre; /* otherwise the border will be collapsed around zero pixels */ 66 | margin-left: 1px; 67 | color: gray; 68 | } 69 | 70 | 71 | .nodeWhiteSpace_Space { 72 | border: 1px solid #ddd; 73 | } 74 | 75 | .nodeTextEntity { 76 | border: 1px solid gray; 77 | white-space: pre; /* otherwise the border will be collapsed around zero pixels */ 78 | margin-left: 1px; 79 | } 80 | 81 | .nodeComment { 82 | color: DarkGreen; 83 | } 84 | 85 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 86 | 87 | .nodeBox.highlightOpen > .nodeLabel { 88 | background-color: #EEEEEE; 89 | } 90 | 91 | .nodeBox.highlightOpen > .nodeCloseLabel, 92 | .nodeBox.highlightOpen > .nodeChildBox, 93 | .nodeBox.open > .nodeCloseLabel, 94 | .nodeBox.open > .nodeChildBox { 95 | display: block; 96 | } 97 | 98 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 99 | 100 | .nodeBox.selected > .nodeLabel > .nodeLabelBox, 101 | .nodeBox.selected > .nodeLabel { 102 | border-color: Highlight; 103 | background-color: Highlight; 104 | color: HighlightText !important; 105 | } 106 | 107 | .nodeBox.selected > .nodeLabel > .nodeLabelBox, 108 | .nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag, 109 | .nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue, 110 | .nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText { 111 | color: inherit !important; 112 | } 113 | 114 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 115 | 116 | .nodeBox.highlighted > .nodeLabel { 117 | border-color: Highlight !important; 118 | background-color: cyan !important; 119 | color: #000000 !important; 120 | } 121 | 122 | .nodeBox.highlighted > .nodeLabel > .nodeLabelBox, 123 | .nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag, 124 | .nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue, 125 | .nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText { 126 | color: #000000 !important; 127 | } 128 | 129 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 130 | 131 | .nodeBox.nodeHidden .nodeLabel > .nodeLabelBox, 132 | .nodeBox.nodeHidden .nodeCloseLabel, 133 | .nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText, 134 | .nodeBox.nodeHidden .nodeText { 135 | color: #888888; 136 | } 137 | 138 | .nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag, 139 | .nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag { 140 | color: #5F82D9; 141 | } 142 | 143 | .nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue { 144 | color: #D86060; 145 | } 146 | 147 | .nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox, 148 | .nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag, 149 | .nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue, 150 | .nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText { 151 | color: SkyBlue !important; 152 | } 153 | 154 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 155 | 156 | .nodeBox.mutated > .nodeLabel, 157 | .nodeAttr.mutated, 158 | .nodeValue.mutated, 159 | .nodeText.mutated, 160 | .nodeBox.mutated > .nodeText { 161 | background-color: #EFFF79; 162 | color: #FF0000 !important; 163 | } 164 | 165 | .nodeBox.selected.mutated > .nodeLabel, 166 | .nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox, 167 | .nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue, 168 | .nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated, 169 | .nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated { 170 | background-color: #EFFF79; 171 | border-color: #EFFF79; 172 | color: #FF0000 !important; 173 | } 174 | 175 | /************************************************************************************************/ 176 | 177 | .logRow-dirxml { 178 | padding-left: 0; 179 | } 180 | 181 | .soloElement > .nodeBox { 182 | padding-left: 0; 183 | } 184 | 185 | .useA11y .nodeLabel.focused { 186 | outline: 2px solid #FF9933; 187 | -moz-outline-radius: 3px; 188 | outline-offset: -2px; 189 | } 190 | 191 | .useA11y .nodeLabelBox:focus { 192 | outline: none; 193 | } 194 | 195 | /************************************************************************************************/ 196 | 197 | .breakpointCode .twisty { 198 | display: none; 199 | } 200 | 201 | .breakpointCode .nodeBox.containerNodeBox, 202 | .breakpointCode .nodeLabel { 203 | padding-left: 0px; 204 | margin-left: 0px; 205 | font-family: Monaco, monospace !important; 206 | } 207 | 208 | .breakpointCode .nodeTag, 209 | .breakpointCode .nodeAttr, 210 | .breakpointCode .nodeText, 211 | .breakpointCode .nodeValue, 212 | .breakpointCode .nodeLabel { 213 | color: DarkGreen !important; 214 | } 215 | 216 | .breakpointMutationType { 217 | position: absolute; 218 | top: 4px; 219 | right: 20px; 220 | color: gray; 221 | } 222 | 223 | 224 | 225 | 226 | 227 | 228 | /************************************************************************************************/ 229 | /************************************************************************************************/ 230 | /************************************************************************************************/ 231 | /************************************************************************************************/ 232 | /************************************************************************************************/ 233 | /************************************************************************************************/ 234 | /************************************************************************************************/ 235 | /************************************************************************************************/ 236 | /************************************************************************************************/ 237 | /************************************************************************************************/ 238 | 239 | 240 | 241 | /************************************************************************************************/ 242 | /* Twisties */ 243 | 244 | .twisty, 245 | .logRow-errorMessage > .hasTwisty > .errorTitle, 246 | .logRow-log > .objectBox-array.hasTwisty, 247 | .logRow-spy .spyHead .spyTitle, 248 | .logGroup > .logRow, 249 | .memberRow.hasChildren > .memberLabelCell > .memberLabel, 250 | .hasHeaders .netHrefLabel, 251 | .netPageRow > .netCol > .netPageTitle { 252 | background-image: url(twistyClosed.png); 253 | background-repeat: no-repeat; 254 | background-position: 2px 2px; 255 | min-height: 12px; 256 | } 257 | 258 | .logRow-errorMessage > .hasTwisty.opened > .errorTitle, 259 | .logRow-log > .objectBox-array.hasTwisty.opened, 260 | .logRow-spy.opened .spyHead .spyTitle, 261 | .logGroup.opened > .logRow, 262 | .memberRow.hasChildren.opened > .memberLabelCell > .memberLabel, 263 | .nodeBox.highlightOpen > .nodeLabel > .twisty, 264 | .nodeBox.open > .nodeLabel > .twisty, 265 | .netRow.opened > .netCol > .netHrefLabel, 266 | .netPageRow.opened > .netCol > .netPageTitle { 267 | background-image: url(twistyOpen.png); 268 | } 269 | 270 | .twisty { 271 | background-position: 4px 4px; 272 | } -------------------------------------------------------------------------------- /vendor/firebug-lite/skin/xp/debugger.css: -------------------------------------------------------------------------------- 1 | /* See license.txt for terms of usage */ 2 | 3 | .panelNode-script { 4 | overflow: hidden; 5 | font-family: monospace; 6 | } 7 | 8 | /************************************************************************************************/ 9 | 10 | .scriptTooltip { 11 | position: fixed; 12 | z-index: 2147483647; 13 | padding: 2px 3px; 14 | border: 1px solid #CBE087; 15 | background: LightYellow; 16 | font-family: monospace; 17 | color: #000000; 18 | } 19 | 20 | /************************************************************************************************/ 21 | 22 | .sourceBox { 23 | /* TODO: xxxpedro problem with sourceBox and scrolling elements */ 24 | /*overflow: scroll; /* see issue 1479 */ 25 | position: absolute; 26 | left: 0; 27 | top: 0; 28 | width: 100%; 29 | height: 100%; 30 | } 31 | 32 | .sourceRow { 33 | white-space: nowrap; 34 | -moz-user-select: text; 35 | } 36 | 37 | .sourceRow.hovered { 38 | background-color: #EEEEEE; 39 | } 40 | 41 | /************************************************************************************************/ 42 | 43 | .sourceLine { 44 | -moz-user-select: none; 45 | margin-right: 10px; 46 | border-right: 1px solid #CCCCCC; 47 | padding: 0px 4px 0 20px; 48 | background: #EEEEEE no-repeat 2px 0px; 49 | color: #888888; 50 | white-space: pre; 51 | font-family: monospace; /* see issue 2953 */ 52 | } 53 | 54 | .noteInToolTip { /* below sourceLine, so it overrides it */ 55 | background-color: #FFD472; 56 | } 57 | 58 | .useA11y .sourceBox .sourceViewport:focus .sourceLine { 59 | background-color: #FFFFC0; 60 | color: navy; 61 | border-right: 1px solid black; 62 | } 63 | 64 | .useA11y .sourceBox .sourceViewport:focus { 65 | outline: none; 66 | } 67 | 68 | .a11y1emSize { 69 | width: 1em; 70 | height: 1em; 71 | position: absolute; 72 | } 73 | 74 | .useA11y .panelStatusLabel:focus { 75 | outline-offset: -2px !important; 76 | } 77 | 78 | .sourceBox > .sourceRow > .sourceLine { 79 | cursor: pointer; 80 | } 81 | 82 | .sourceLine:hover { 83 | text-decoration: none; 84 | } 85 | 86 | .sourceRowText { 87 | white-space: pre; 88 | } 89 | 90 | .sourceRow[exe_line="true"] { 91 | outline: 1px solid #D9D9B6; 92 | margin-right: 1px; 93 | background-color: lightgoldenrodyellow; 94 | } 95 | 96 | .sourceRow[executable="true"] > .sourceLine { 97 | content: "-"; 98 | color: #4AA02C; /* Spring Green */ 99 | font-weight: bold; 100 | } 101 | 102 | .sourceRow[exe_line="true"] > .sourceLine { 103 | background-image: url(chrome://firebug/skin/exe.png); 104 | color: #000000; 105 | } 106 | 107 | .sourceRow[breakpoint="true"] > .sourceLine { 108 | background-image: url(chrome://firebug/skin/breakpoint.png); 109 | } 110 | 111 | .sourceRow[breakpoint="true"][condition="true"] > .sourceLine { 112 | background-image: url(chrome://firebug/skin/breakpointCondition.png); 113 | } 114 | 115 | .sourceRow[breakpoint="true"][disabledBreakpoint="true"] > .sourceLine { 116 | background-image: url(chrome://firebug/skin/breakpointDisabled.png); 117 | } 118 | 119 | .sourceRow[breakpoint="true"][exe_line="true"] > .sourceLine { 120 | background-image: url(chrome://firebug/skin/breakpointExe.png); 121 | } 122 | 123 | .sourceRow[breakpoint="true"][exe_line="true"][disabledBreakpoint="true"] > .sourceLine { 124 | background-image: url(chrome://firebug/skin/breakpointDisabledExe.png); 125 | } 126 | 127 | .sourceLine.editing { 128 | background-image: url(chrome://firebug/skin/breakpoint.png); 129 | } 130 | 131 | /************************************************************************************************/ 132 | 133 | .conditionEditor { 134 | z-index: 2147483647; 135 | position: absolute; 136 | margin-top: 0; 137 | left: 2px; 138 | width: 90%; 139 | } 140 | 141 | .conditionEditorInner { 142 | position: relative; 143 | top: -26px; 144 | height: 0; 145 | } 146 | 147 | .conditionCaption { 148 | margin-bottom: 2px; 149 | font-family: Lucida Grande, sans-serif; 150 | font-weight: bold; 151 | font-size: 11px; 152 | color: #226679; 153 | } 154 | 155 | .conditionInput { 156 | width: 100%; 157 | border: 1px solid #0096C0; 158 | font-family: monospace; 159 | font-size: inherit; 160 | } 161 | 162 | .conditionEditorInner1 { 163 | padding-left: 37px; 164 | background: url(condBorders.png) repeat-y; 165 | } 166 | 167 | .conditionEditorInner2 { 168 | padding-right: 25px; 169 | background: url(condBorders.png) repeat-y 100% 0; 170 | } 171 | 172 | .conditionEditorTop1 { 173 | background: url(condCorners.png) no-repeat 100% 0; 174 | margin-left: 37px; 175 | height: 35px; 176 | } 177 | 178 | .conditionEditorTop2 { 179 | position: relative; 180 | left: -37px; 181 | width: 37px; 182 | height: 35px; 183 | background: url(condCorners.png) no-repeat; 184 | } 185 | 186 | .conditionEditorBottom1 { 187 | background: url(condCorners.png) no-repeat 100% 100%; 188 | margin-left: 37px; 189 | height: 33px; 190 | } 191 | 192 | .conditionEditorBottom2 { 193 | position: relative; left: -37px; 194 | width: 37px; 195 | height: 33px; 196 | background: url(condCorners.png) no-repeat 0 100%; 197 | } 198 | 199 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 200 | 201 | .upsideDown { 202 | margin-top: 2px; 203 | } 204 | 205 | .upsideDown .conditionEditorInner { 206 | top: -8px; 207 | } 208 | 209 | .upsideDown .conditionEditorInner1 { 210 | padding-left: 33px; 211 | background: url(condBordersUps.png) repeat-y; 212 | } 213 | 214 | .upsideDown .conditionEditorInner2 { 215 | padding-right: 25px; 216 | background: url(condBordersUps.png) repeat-y 100% 0; 217 | } 218 | 219 | .upsideDown .conditionEditorTop1 { 220 | background: url(condCornersUps.png) no-repeat 100% 0; 221 | margin-left: 33px; 222 | height: 25px; 223 | } 224 | 225 | .upsideDown .conditionEditorTop2 { 226 | position: relative; 227 | left: -33px; 228 | width: 33px; 229 | height: 25px; 230 | background: url(condCornersUps.png) no-repeat; 231 | } 232 | 233 | .upsideDown .conditionEditorBottom1 { 234 | background: url(condCornersUps.png) no-repeat 100% 100%; 235 | margin-left: 33px; 236 | height: 43px; 237 | } 238 | 239 | .upsideDown .conditionEditorBottom2 { 240 | position: relative; 241 | left: -33px; 242 | width: 33px; 243 | height: 43px; 244 | background: url(condCornersUps.png) no-repeat 0 100%; 245 | } 246 | 247 | /************************************************************************************************/ 248 | 249 | .breakpointsGroupListBox { 250 | overflow: hidden; 251 | } 252 | 253 | .breakpointBlockHead { 254 | position: relative; 255 | padding-top: 4px; 256 | } 257 | 258 | .breakpointBlockHead > .checkbox { 259 | margin-right: 4px; 260 | } 261 | 262 | .breakpointBlockHead > .objectLink-sourceLink { 263 | top: 4px; 264 | right: 20px; 265 | background-color: #FFFFFF; /* issue 3308 */ 266 | } 267 | 268 | .breakpointBlockHead > .closeButton { 269 | position: absolute; 270 | top: 2px; 271 | right: 2px; 272 | } 273 | 274 | .breakpointCheckbox { 275 | margin-top: 0; 276 | vertical-align: top; 277 | } 278 | 279 | .breakpointName { 280 | margin-left: 4px; 281 | font-weight: bold; 282 | } 283 | 284 | .breakpointRow[aria-checked="false"] > .breakpointBlockHead > *, 285 | .breakpointRow[aria-checked="false"] > .breakpointCode { 286 | opacity: 0.5; 287 | } 288 | 289 | .breakpointRow[aria-checked="false"] .breakpointCheckbox, 290 | .breakpointRow[aria-checked="false"] .objectLink-sourceLink, 291 | .breakpointRow[aria-checked="false"] .closeButton, 292 | .breakpointRow[aria-checked="false"] .breakpointMutationType { 293 | opacity: 1.0 !important; 294 | } 295 | 296 | .breakpointCode { 297 | overflow: hidden; 298 | white-space: nowrap; 299 | padding-left: 24px; 300 | padding-bottom: 2px; 301 | border-bottom: 1px solid #D7D7D7; 302 | font-family: monospace; 303 | color: DarkGreen; 304 | } 305 | 306 | .breakpointCondition { 307 | white-space: nowrap; 308 | padding-left: 24px; 309 | padding-bottom: 2px; 310 | border-bottom: 1px solid #D7D7D7; 311 | font-family: monospace; 312 | color: Gray; 313 | } 314 | 315 | .breakpointBlock-breakpoints > .groupHeader { 316 | display: none; 317 | } 318 | 319 | .breakpointBlock-monitors > .breakpointCode { 320 | padding: 0; 321 | } 322 | 323 | .breakpointBlock-errorBreakpoints .breakpointCheckbox, 324 | .breakpointBlock-monitors .breakpointCheckbox { 325 | display: none; 326 | } 327 | 328 | .breakpointHeader { 329 | margin: 0 !important; 330 | border-top: none !important; 331 | } 332 | -------------------------------------------------------------------------------- /vendor/backbone/test/sync.js: -------------------------------------------------------------------------------- 1 | (function(QUnit) { 2 | 3 | var Library = Backbone.Collection.extend({ 4 | url: function() { return '/library'; } 5 | }); 6 | var library; 7 | 8 | var attrs = { 9 | title: 'The Tempest', 10 | author: 'Bill Shakespeare', 11 | length: 123 12 | }; 13 | 14 | QUnit.module('Backbone.sync', { 15 | 16 | beforeEach: function(assert) { 17 | library = new Library; 18 | library.create(attrs, {wait: false}); 19 | }, 20 | 21 | afterEach: function(assert) { 22 | Backbone.emulateHTTP = false; 23 | } 24 | 25 | }); 26 | 27 | QUnit.test('read', function(assert) { 28 | assert.expect(4); 29 | library.fetch(); 30 | assert.equal(this.ajaxSettings.url, '/library'); 31 | assert.equal(this.ajaxSettings.type, 'GET'); 32 | assert.equal(this.ajaxSettings.dataType, 'json'); 33 | assert.ok(_.isEmpty(this.ajaxSettings.data)); 34 | }); 35 | 36 | QUnit.test('passing data', function(assert) { 37 | assert.expect(3); 38 | library.fetch({data: {a: 'a', one: 1}}); 39 | assert.equal(this.ajaxSettings.url, '/library'); 40 | assert.equal(this.ajaxSettings.data.a, 'a'); 41 | assert.equal(this.ajaxSettings.data.one, 1); 42 | }); 43 | 44 | QUnit.test('create', function(assert) { 45 | assert.expect(6); 46 | assert.equal(this.ajaxSettings.url, '/library'); 47 | assert.equal(this.ajaxSettings.type, 'POST'); 48 | assert.equal(this.ajaxSettings.dataType, 'json'); 49 | var data = JSON.parse(this.ajaxSettings.data); 50 | assert.equal(data.title, 'The Tempest'); 51 | assert.equal(data.author, 'Bill Shakespeare'); 52 | assert.equal(data.length, 123); 53 | }); 54 | 55 | QUnit.test('update', function(assert) { 56 | assert.expect(7); 57 | library.first().save({id: '1-the-tempest', author: 'William Shakespeare'}); 58 | assert.equal(this.ajaxSettings.url, '/library/1-the-tempest'); 59 | assert.equal(this.ajaxSettings.type, 'PUT'); 60 | assert.equal(this.ajaxSettings.dataType, 'json'); 61 | var data = JSON.parse(this.ajaxSettings.data); 62 | assert.equal(data.id, '1-the-tempest'); 63 | assert.equal(data.title, 'The Tempest'); 64 | assert.equal(data.author, 'William Shakespeare'); 65 | assert.equal(data.length, 123); 66 | }); 67 | 68 | QUnit.test('update with emulateHTTP and emulateJSON', function(assert) { 69 | assert.expect(7); 70 | library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, { 71 | emulateHTTP: true, 72 | emulateJSON: true 73 | }); 74 | assert.equal(this.ajaxSettings.url, '/library/2-the-tempest'); 75 | assert.equal(this.ajaxSettings.type, 'POST'); 76 | assert.equal(this.ajaxSettings.dataType, 'json'); 77 | assert.equal(this.ajaxSettings.data._method, 'PUT'); 78 | var data = JSON.parse(this.ajaxSettings.data.model); 79 | assert.equal(data.id, '2-the-tempest'); 80 | assert.equal(data.author, 'Tim Shakespeare'); 81 | assert.equal(data.length, 123); 82 | }); 83 | 84 | QUnit.test('update with just emulateHTTP', function(assert) { 85 | assert.expect(6); 86 | library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, { 87 | emulateHTTP: true 88 | }); 89 | assert.equal(this.ajaxSettings.url, '/library/2-the-tempest'); 90 | assert.equal(this.ajaxSettings.type, 'POST'); 91 | assert.equal(this.ajaxSettings.contentType, 'application/json'); 92 | var data = JSON.parse(this.ajaxSettings.data); 93 | assert.equal(data.id, '2-the-tempest'); 94 | assert.equal(data.author, 'Tim Shakespeare'); 95 | assert.equal(data.length, 123); 96 | }); 97 | 98 | QUnit.test('update with just emulateJSON', function(assert) { 99 | assert.expect(6); 100 | library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, { 101 | emulateJSON: true 102 | }); 103 | assert.equal(this.ajaxSettings.url, '/library/2-the-tempest'); 104 | assert.equal(this.ajaxSettings.type, 'PUT'); 105 | assert.equal(this.ajaxSettings.contentType, 'application/x-www-form-urlencoded'); 106 | var data = JSON.parse(this.ajaxSettings.data.model); 107 | assert.equal(data.id, '2-the-tempest'); 108 | assert.equal(data.author, 'Tim Shakespeare'); 109 | assert.equal(data.length, 123); 110 | }); 111 | 112 | QUnit.test('read model', function(assert) { 113 | assert.expect(3); 114 | library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}); 115 | library.first().fetch(); 116 | assert.equal(this.ajaxSettings.url, '/library/2-the-tempest'); 117 | assert.equal(this.ajaxSettings.type, 'GET'); 118 | assert.ok(_.isEmpty(this.ajaxSettings.data)); 119 | }); 120 | 121 | QUnit.test('destroy', function(assert) { 122 | assert.expect(3); 123 | library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}); 124 | library.first().destroy({wait: true}); 125 | assert.equal(this.ajaxSettings.url, '/library/2-the-tempest'); 126 | assert.equal(this.ajaxSettings.type, 'DELETE'); 127 | assert.equal(this.ajaxSettings.data, null); 128 | }); 129 | 130 | QUnit.test('destroy with emulateHTTP', function(assert) { 131 | assert.expect(3); 132 | library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}); 133 | library.first().destroy({ 134 | emulateHTTP: true, 135 | emulateJSON: true 136 | }); 137 | assert.equal(this.ajaxSettings.url, '/library/2-the-tempest'); 138 | assert.equal(this.ajaxSettings.type, 'POST'); 139 | assert.equal(JSON.stringify(this.ajaxSettings.data), '{"_method":"DELETE"}'); 140 | }); 141 | 142 | QUnit.test('urlError', function(assert) { 143 | assert.expect(2); 144 | var model = new Backbone.Model(); 145 | assert.raises(function() { 146 | model.fetch(); 147 | }); 148 | model.fetch({url: '/one/two'}); 149 | assert.equal(this.ajaxSettings.url, '/one/two'); 150 | }); 151 | 152 | QUnit.test('#1052 - `options` is optional.', function(assert) { 153 | assert.expect(0); 154 | var model = new Backbone.Model(); 155 | model.url = '/test'; 156 | Backbone.sync('create', model); 157 | }); 158 | 159 | QUnit.test('Backbone.ajax', function(assert) { 160 | assert.expect(1); 161 | Backbone.ajax = function(settings) { 162 | assert.strictEqual(settings.url, '/test'); 163 | }; 164 | var model = new Backbone.Model(); 165 | model.url = '/test'; 166 | Backbone.sync('create', model); 167 | }); 168 | 169 | QUnit.test('Call provided error callback on error.', function(assert) { 170 | assert.expect(1); 171 | var model = new Backbone.Model; 172 | model.url = '/test'; 173 | Backbone.sync('read', model, { 174 | error: function() { assert.ok(true); } 175 | }); 176 | this.ajaxSettings.error(); 177 | }); 178 | 179 | QUnit.test('Use Backbone.emulateHTTP as default.', function(assert) { 180 | assert.expect(2); 181 | var model = new Backbone.Model; 182 | model.url = '/test'; 183 | 184 | Backbone.emulateHTTP = true; 185 | model.sync('create', model); 186 | assert.strictEqual(this.ajaxSettings.emulateHTTP, true); 187 | 188 | Backbone.emulateHTTP = false; 189 | model.sync('create', model); 190 | assert.strictEqual(this.ajaxSettings.emulateHTTP, false); 191 | }); 192 | 193 | QUnit.test('Use Backbone.emulateJSON as default.', function(assert) { 194 | assert.expect(2); 195 | var model = new Backbone.Model; 196 | model.url = '/test'; 197 | 198 | Backbone.emulateJSON = true; 199 | model.sync('create', model); 200 | assert.strictEqual(this.ajaxSettings.emulateJSON, true); 201 | 202 | Backbone.emulateJSON = false; 203 | model.sync('create', model); 204 | assert.strictEqual(this.ajaxSettings.emulateJSON, false); 205 | }); 206 | 207 | QUnit.test('#1756 - Call user provided beforeSend function.', function(assert) { 208 | assert.expect(4); 209 | Backbone.emulateHTTP = true; 210 | var model = new Backbone.Model; 211 | model.url = '/test'; 212 | var xhr = { 213 | setRequestHeader: function(header, value) { 214 | assert.strictEqual(header, 'X-HTTP-Method-Override'); 215 | assert.strictEqual(value, 'DELETE'); 216 | } 217 | }; 218 | model.sync('delete', model, { 219 | beforeSend: function(_xhr) { 220 | assert.ok(_xhr === xhr); 221 | return false; 222 | } 223 | }); 224 | assert.strictEqual(this.ajaxSettings.beforeSend(xhr), false); 225 | }); 226 | 227 | QUnit.test('#2928 - Pass along `textStatus` and `errorThrown`.', function(assert) { 228 | assert.expect(2); 229 | var model = new Backbone.Model; 230 | model.url = '/test'; 231 | model.on('error', function(m, xhr, options) { 232 | assert.strictEqual(options.textStatus, 'textStatus'); 233 | assert.strictEqual(options.errorThrown, 'errorThrown'); 234 | }); 235 | model.fetch(); 236 | this.ajaxSettings.error({}, 'textStatus', 'errorThrown'); 237 | }); 238 | 239 | })(QUnit); 240 | -------------------------------------------------------------------------------- /dist/lodash.fp.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()})(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&"function"==typeof _.runInContext&&(_=n(_.runInContext())), 2 | t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n), 3 | i}}}function l(t,e,r,f){function d(t,e){if(k.cap){var r=u.iterateeRearg[t];if(r)return W(e,r);var n=!O&&u.iterateeAry[t];if(n)return A(e,n)}return e}function c(t,e,r){return B||k.curry&&r>1?D(e,r):e}function h(t,e,r){if(k.fixed&&(E||!u.skipFixed[t])){var n=u.methodSpread[t],i=n&&n.start;return void 0===i?S(e,r):_(e,i)}return e}function g(t,e,r){return k.rearg&&r>1&&(F||!u.skipRearg[t])?K(e,u.methodRearg[t]||u.aryRearg[r]):e}function y(t,e){e=V(e);for(var r=-1,n=e.length,i=n-1,a=M(Object(t)),o=a;null!=o&&++r2?r-2:1, 8 | a&&a<=r?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!P(r))return t(r,Object(e));var n=[];return z(T(e),function(t){P(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),z(n,function(t){var e=t[1];P(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]]}),r}},nthArg:function(t){return function(e){var r=e<0?1:N(e)+1;return D(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return D(t(e,r),n)}},runInContext:function(e){return function(r){return l(t,e(r),f)}}};if(!b)return I(e,r); 9 | var H=r,J=[];return z(U,function(t){z(u.aryMethod[t],function(t){var e=H[u.remap[t]||t];e&&J.push([t,I(t,e)])})}),z(T(H),function(t){var e=H[t];if("function"==typeof e){for(var r=J.length;r--;)if(J[r][0]==t)return;e.convert=v(t,e),J.push([t,e])}}),z(J,function(t){H[t[0]]=t[1]}),H.convert=m,R&&(H.placeholder=j),z(T(H),function(t){z(u.realToAlias[t]||[],function(e){H[e]=H[t]})}),H}var u=r(2),p=r(3);t.exports=l},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn", 10 | extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq", 11 | indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"}, 12 | e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"], 13 | 3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"], 14 | 4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1, 15 | transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0], 16 | sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0, 17 | pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={}; 18 | for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf", 19 | mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0, 20 | lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])}); -------------------------------------------------------------------------------- /fp/_mapping.js: -------------------------------------------------------------------------------- 1 | /** Used to map aliases to their real names. */ 2 | exports.aliasToReal = { 3 | 4 | // Lodash aliases. 5 | 'each': 'forEach', 6 | 'eachRight': 'forEachRight', 7 | 'entries': 'toPairs', 8 | 'entriesIn': 'toPairsIn', 9 | 'extend': 'assignIn', 10 | 'extendAll': 'assignInAll', 11 | 'extendAllWith': 'assignInAllWith', 12 | 'extendWith': 'assignInWith', 13 | 'first': 'head', 14 | 15 | // Methods that are curried variants of others. 16 | 'conforms': 'conformsTo', 17 | 'matches': 'isMatch', 18 | 'property': 'get', 19 | 20 | // Ramda aliases. 21 | '__': 'placeholder', 22 | 'F': 'stubFalse', 23 | 'T': 'stubTrue', 24 | 'all': 'every', 25 | 'allPass': 'overEvery', 26 | 'always': 'constant', 27 | 'any': 'some', 28 | 'anyPass': 'overSome', 29 | 'apply': 'spread', 30 | 'assoc': 'set', 31 | 'assocPath': 'set', 32 | 'complement': 'negate', 33 | 'compose': 'flowRight', 34 | 'contains': 'includes', 35 | 'dissoc': 'unset', 36 | 'dissocPath': 'unset', 37 | 'dropLast': 'dropRight', 38 | 'dropLastWhile': 'dropRightWhile', 39 | 'equals': 'isEqual', 40 | 'identical': 'eq', 41 | 'indexBy': 'keyBy', 42 | 'init': 'initial', 43 | 'invertObj': 'invert', 44 | 'juxt': 'over', 45 | 'omitAll': 'omit', 46 | 'nAry': 'ary', 47 | 'path': 'get', 48 | 'pathEq': 'matchesProperty', 49 | 'pathOr': 'getOr', 50 | 'paths': 'at', 51 | 'pickAll': 'pick', 52 | 'pipe': 'flow', 53 | 'pluck': 'map', 54 | 'prop': 'get', 55 | 'propEq': 'matchesProperty', 56 | 'propOr': 'getOr', 57 | 'props': 'at', 58 | 'symmetricDifference': 'xor', 59 | 'symmetricDifferenceBy': 'xorBy', 60 | 'symmetricDifferenceWith': 'xorWith', 61 | 'takeLast': 'takeRight', 62 | 'takeLastWhile': 'takeRightWhile', 63 | 'unapply': 'rest', 64 | 'unnest': 'flatten', 65 | 'useWith': 'overArgs', 66 | 'where': 'conformsTo', 67 | 'whereEq': 'isMatch', 68 | 'zipObj': 'zipObject' 69 | }; 70 | 71 | /** Used to map ary to method names. */ 72 | exports.aryMethod = { 73 | '1': [ 74 | 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', 75 | 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', 76 | 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', 77 | 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', 78 | 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 79 | 'uniqueId', 'words', 'zipAll' 80 | ], 81 | '2': [ 82 | 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', 83 | 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', 84 | 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', 85 | 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', 86 | 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 87 | 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 88 | 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', 89 | 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', 90 | 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', 91 | 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 92 | 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 93 | 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', 94 | 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 95 | 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 96 | 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 97 | 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 98 | 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', 99 | 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 100 | 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 101 | 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 102 | 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 103 | 'zipObjectDeep' 104 | ], 105 | '3': [ 106 | 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 107 | 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', 108 | 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 109 | 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 110 | 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', 111 | 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', 112 | 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 113 | 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 114 | 'xorWith', 'zipWith' 115 | ], 116 | '4': [ 117 | 'fill', 'setWith', 'updateWith' 118 | ] 119 | }; 120 | 121 | /** Used to map ary to rearg configs. */ 122 | exports.aryRearg = { 123 | '2': [1, 0], 124 | '3': [2, 0, 1], 125 | '4': [3, 2, 0, 1] 126 | }; 127 | 128 | /** Used to map method names to their iteratee ary. */ 129 | exports.iterateeAry = { 130 | 'dropRightWhile': 1, 131 | 'dropWhile': 1, 132 | 'every': 1, 133 | 'filter': 1, 134 | 'find': 1, 135 | 'findFrom': 1, 136 | 'findIndex': 1, 137 | 'findIndexFrom': 1, 138 | 'findKey': 1, 139 | 'findLast': 1, 140 | 'findLastFrom': 1, 141 | 'findLastIndex': 1, 142 | 'findLastIndexFrom': 1, 143 | 'findLastKey': 1, 144 | 'flatMap': 1, 145 | 'flatMapDeep': 1, 146 | 'flatMapDepth': 1, 147 | 'forEach': 1, 148 | 'forEachRight': 1, 149 | 'forIn': 1, 150 | 'forInRight': 1, 151 | 'forOwn': 1, 152 | 'forOwnRight': 1, 153 | 'map': 1, 154 | 'mapKeys': 1, 155 | 'mapValues': 1, 156 | 'partition': 1, 157 | 'reduce': 2, 158 | 'reduceRight': 2, 159 | 'reject': 1, 160 | 'remove': 1, 161 | 'some': 1, 162 | 'takeRightWhile': 1, 163 | 'takeWhile': 1, 164 | 'times': 1, 165 | 'transform': 2 166 | }; 167 | 168 | /** Used to map method names to iteratee rearg configs. */ 169 | exports.iterateeRearg = { 170 | 'mapKeys': [1] 171 | }; 172 | 173 | /** Used to map method names to rearg configs. */ 174 | exports.methodRearg = { 175 | 'assignInAllWith': [1, 0], 176 | 'assignInWith': [1, 2, 0], 177 | 'assignAllWith': [1, 0], 178 | 'assignWith': [1, 2, 0], 179 | 'differenceBy': [1, 2, 0], 180 | 'differenceWith': [1, 2, 0], 181 | 'getOr': [2, 1, 0], 182 | 'intersectionBy': [1, 2, 0], 183 | 'intersectionWith': [1, 2, 0], 184 | 'isEqualWith': [1, 2, 0], 185 | 'isMatchWith': [2, 1, 0], 186 | 'mergeAllWith': [1, 0], 187 | 'mergeWith': [1, 2, 0], 188 | 'padChars': [2, 1, 0], 189 | 'padCharsEnd': [2, 1, 0], 190 | 'padCharsStart': [2, 1, 0], 191 | 'pullAllBy': [2, 1, 0], 192 | 'pullAllWith': [2, 1, 0], 193 | 'rangeStep': [1, 2, 0], 194 | 'rangeStepRight': [1, 2, 0], 195 | 'setWith': [3, 1, 2, 0], 196 | 'sortedIndexBy': [2, 1, 0], 197 | 'sortedLastIndexBy': [2, 1, 0], 198 | 'unionBy': [1, 2, 0], 199 | 'unionWith': [1, 2, 0], 200 | 'updateWith': [3, 1, 2, 0], 201 | 'xorBy': [1, 2, 0], 202 | 'xorWith': [1, 2, 0], 203 | 'zipWith': [1, 2, 0] 204 | }; 205 | 206 | /** Used to map method names to spread configs. */ 207 | exports.methodSpread = { 208 | 'assignAll': { 'start': 0 }, 209 | 'assignAllWith': { 'start': 0 }, 210 | 'assignInAll': { 'start': 0 }, 211 | 'assignInAllWith': { 'start': 0 }, 212 | 'defaultsAll': { 'start': 0 }, 213 | 'defaultsDeepAll': { 'start': 0 }, 214 | 'invokeArgs': { 'start': 2 }, 215 | 'invokeArgsMap': { 'start': 2 }, 216 | 'mergeAll': { 'start': 0 }, 217 | 'mergeAllWith': { 'start': 0 }, 218 | 'partial': { 'start': 1 }, 219 | 'partialRight': { 'start': 1 }, 220 | 'without': { 'start': 1 }, 221 | 'zipAll': { 'start': 0 } 222 | }; 223 | 224 | /** Used to identify methods which mutate arrays or objects. */ 225 | exports.mutate = { 226 | 'array': { 227 | 'fill': true, 228 | 'pull': true, 229 | 'pullAll': true, 230 | 'pullAllBy': true, 231 | 'pullAllWith': true, 232 | 'pullAt': true, 233 | 'remove': true, 234 | 'reverse': true 235 | }, 236 | 'object': { 237 | 'assign': true, 238 | 'assignAll': true, 239 | 'assignAllWith': true, 240 | 'assignIn': true, 241 | 'assignInAll': true, 242 | 'assignInAllWith': true, 243 | 'assignInWith': true, 244 | 'assignWith': true, 245 | 'defaults': true, 246 | 'defaultsAll': true, 247 | 'defaultsDeep': true, 248 | 'defaultsDeepAll': true, 249 | 'merge': true, 250 | 'mergeAll': true, 251 | 'mergeAllWith': true, 252 | 'mergeWith': true, 253 | }, 254 | 'set': { 255 | 'set': true, 256 | 'setWith': true, 257 | 'unset': true, 258 | 'update': true, 259 | 'updateWith': true 260 | } 261 | }; 262 | 263 | /** Used to track methods with placeholder support */ 264 | exports.placeholder = { 265 | 'bind': true, 266 | 'bindKey': true, 267 | 'curry': true, 268 | 'curryRight': true, 269 | 'partial': true, 270 | 'partialRight': true 271 | }; 272 | 273 | /** Used to map real names to their aliases. */ 274 | exports.realToAlias = (function() { 275 | var hasOwnProperty = Object.prototype.hasOwnProperty, 276 | object = exports.aliasToReal, 277 | result = {}; 278 | 279 | for (var key in object) { 280 | var value = object[key]; 281 | if (hasOwnProperty.call(result, value)) { 282 | result[value].push(key); 283 | } else { 284 | result[value] = [key]; 285 | } 286 | } 287 | return result; 288 | }()); 289 | 290 | /** Used to map method names to other names. */ 291 | exports.remap = { 292 | 'assignAll': 'assign', 293 | 'assignAllWith': 'assignWith', 294 | 'assignInAll': 'assignIn', 295 | 'assignInAllWith': 'assignInWith', 296 | 'curryN': 'curry', 297 | 'curryRightN': 'curryRight', 298 | 'defaultsAll': 'defaults', 299 | 'defaultsDeepAll': 'defaultsDeep', 300 | 'findFrom': 'find', 301 | 'findIndexFrom': 'findIndex', 302 | 'findLastFrom': 'findLast', 303 | 'findLastIndexFrom': 'findLastIndex', 304 | 'getOr': 'get', 305 | 'includesFrom': 'includes', 306 | 'indexOfFrom': 'indexOf', 307 | 'invokeArgs': 'invoke', 308 | 'invokeArgsMap': 'invokeMap', 309 | 'lastIndexOfFrom': 'lastIndexOf', 310 | 'mergeAll': 'merge', 311 | 'mergeAllWith': 'mergeWith', 312 | 'padChars': 'pad', 313 | 'padCharsEnd': 'padEnd', 314 | 'padCharsStart': 'padStart', 315 | 'propertyOf': 'get', 316 | 'rangeStep': 'range', 317 | 'rangeStepRight': 'rangeRight', 318 | 'restFrom': 'rest', 319 | 'spreadFrom': 'spread', 320 | 'trimChars': 'trim', 321 | 'trimCharsEnd': 'trimEnd', 322 | 'trimCharsStart': 'trimStart', 323 | 'zipAll': 'zip' 324 | }; 325 | 326 | /** Used to track methods that skip fixing their arity. */ 327 | exports.skipFixed = { 328 | 'castArray': true, 329 | 'flow': true, 330 | 'flowRight': true, 331 | 'iteratee': true, 332 | 'mixin': true, 333 | 'rearg': true, 334 | 'runInContext': true 335 | }; 336 | 337 | /** Used to track methods that skip rearranging arguments. */ 338 | exports.skipRearg = { 339 | 'add': true, 340 | 'assign': true, 341 | 'assignIn': true, 342 | 'bind': true, 343 | 'bindKey': true, 344 | 'concat': true, 345 | 'difference': true, 346 | 'divide': true, 347 | 'eq': true, 348 | 'gt': true, 349 | 'gte': true, 350 | 'isEqual': true, 351 | 'lt': true, 352 | 'lte': true, 353 | 'matchesProperty': true, 354 | 'merge': true, 355 | 'multiply': true, 356 | 'overArgs': true, 357 | 'partial': true, 358 | 'partialRight': true, 359 | 'propertyOf': true, 360 | 'random': true, 361 | 'range': true, 362 | 'rangeRight': true, 363 | 'subtract': true, 364 | 'zip': true, 365 | 'zipObject': true, 366 | 'zipObjectDeep': true 367 | }; 368 | -------------------------------------------------------------------------------- /dist/lodash.core.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE 4 | * Build: `lodash core -o ./dist/lodash.core.js` 5 | */ 6 | ;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return d(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function f(n,t,r){ 7 | if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(nn,r)},t)}function a(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!K(t)?n!==n&&t!==t:g(n,t,r,e,b,u))}function g(n,t,r,e,u,o){var i=Sn(n),c=Sn(t),f="[object Array]",a="[object Array]";i||(f=hn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=hn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]); 9 | var p=En(o,function(t){return t[0]==n}),s=En(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o), 10 | o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=u(i,f,r,e,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:nn;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn); 16 | }function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function H(n){var t=typeof n; 17 | return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Sn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,qn(n))}function Y(n){return n}function Z(n,r,e){var u=qn(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,qn(r)));var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n); 18 | return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ 19 | return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; 20 | var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r 2 | 3 | 4 | 5 | lodash Test Suite 6 | 7 | 12 | 13 | 14 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |
34 | 196 | 209 | 340 | 341 | 342 | -------------------------------------------------------------------------------- /dist/mapping.fp.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(); 4 | else if(typeof define === 'function' && define.amd) 5 | define([], factory); 6 | else if(typeof exports === 'object') 7 | exports["mapping"] = factory(); 8 | else 9 | root["mapping"] = factory(); 10 | })(this, function() { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) 20 | /******/ return installedModules[moduleId].exports; 21 | 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ exports: {}, 25 | /******/ id: moduleId, 26 | /******/ loaded: false 27 | /******/ }; 28 | 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | 32 | /******/ // Flag the module as loaded 33 | /******/ module.loaded = true; 34 | 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | 39 | 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | 46 | /******/ // __webpack_public_path__ 47 | /******/ __webpack_require__.p = ""; 48 | 49 | /******/ // Load entry module and return exports 50 | /******/ return __webpack_require__(0); 51 | /******/ }) 52 | /************************************************************************/ 53 | /******/ ([ 54 | /* 0 */ 55 | /***/ function(module, exports) { 56 | 57 | /** Used to map aliases to their real names. */ 58 | exports.aliasToReal = { 59 | 60 | // Lodash aliases. 61 | 'each': 'forEach', 62 | 'eachRight': 'forEachRight', 63 | 'entries': 'toPairs', 64 | 'entriesIn': 'toPairsIn', 65 | 'extend': 'assignIn', 66 | 'extendAll': 'assignInAll', 67 | 'extendAllWith': 'assignInAllWith', 68 | 'extendWith': 'assignInWith', 69 | 'first': 'head', 70 | 71 | // Methods that are curried variants of others. 72 | 'conforms': 'conformsTo', 73 | 'matches': 'isMatch', 74 | 'property': 'get', 75 | 76 | // Ramda aliases. 77 | '__': 'placeholder', 78 | 'F': 'stubFalse', 79 | 'T': 'stubTrue', 80 | 'all': 'every', 81 | 'allPass': 'overEvery', 82 | 'always': 'constant', 83 | 'any': 'some', 84 | 'anyPass': 'overSome', 85 | 'apply': 'spread', 86 | 'assoc': 'set', 87 | 'assocPath': 'set', 88 | 'complement': 'negate', 89 | 'compose': 'flowRight', 90 | 'contains': 'includes', 91 | 'dissoc': 'unset', 92 | 'dissocPath': 'unset', 93 | 'dropLast': 'dropRight', 94 | 'dropLastWhile': 'dropRightWhile', 95 | 'equals': 'isEqual', 96 | 'identical': 'eq', 97 | 'indexBy': 'keyBy', 98 | 'init': 'initial', 99 | 'invertObj': 'invert', 100 | 'juxt': 'over', 101 | 'omitAll': 'omit', 102 | 'nAry': 'ary', 103 | 'path': 'get', 104 | 'pathEq': 'matchesProperty', 105 | 'pathOr': 'getOr', 106 | 'paths': 'at', 107 | 'pickAll': 'pick', 108 | 'pipe': 'flow', 109 | 'pluck': 'map', 110 | 'prop': 'get', 111 | 'propEq': 'matchesProperty', 112 | 'propOr': 'getOr', 113 | 'props': 'at', 114 | 'symmetricDifference': 'xor', 115 | 'symmetricDifferenceBy': 'xorBy', 116 | 'symmetricDifferenceWith': 'xorWith', 117 | 'takeLast': 'takeRight', 118 | 'takeLastWhile': 'takeRightWhile', 119 | 'unapply': 'rest', 120 | 'unnest': 'flatten', 121 | 'useWith': 'overArgs', 122 | 'where': 'conformsTo', 123 | 'whereEq': 'isMatch', 124 | 'zipObj': 'zipObject' 125 | }; 126 | 127 | /** Used to map ary to method names. */ 128 | exports.aryMethod = { 129 | '1': [ 130 | 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', 131 | 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', 132 | 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', 133 | 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', 134 | 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 135 | 'uniqueId', 'words', 'zipAll' 136 | ], 137 | '2': [ 138 | 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', 139 | 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', 140 | 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', 141 | 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', 142 | 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 143 | 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 144 | 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', 145 | 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', 146 | 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', 147 | 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 148 | 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 149 | 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', 150 | 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 151 | 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 152 | 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 153 | 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 154 | 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', 155 | 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 156 | 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 157 | 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 158 | 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 159 | 'zipObjectDeep' 160 | ], 161 | '3': [ 162 | 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 163 | 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', 164 | 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 165 | 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 166 | 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', 167 | 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', 168 | 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 169 | 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 170 | 'xorWith', 'zipWith' 171 | ], 172 | '4': [ 173 | 'fill', 'setWith', 'updateWith' 174 | ] 175 | }; 176 | 177 | /** Used to map ary to rearg configs. */ 178 | exports.aryRearg = { 179 | '2': [1, 0], 180 | '3': [2, 0, 1], 181 | '4': [3, 2, 0, 1] 182 | }; 183 | 184 | /** Used to map method names to their iteratee ary. */ 185 | exports.iterateeAry = { 186 | 'dropRightWhile': 1, 187 | 'dropWhile': 1, 188 | 'every': 1, 189 | 'filter': 1, 190 | 'find': 1, 191 | 'findFrom': 1, 192 | 'findIndex': 1, 193 | 'findIndexFrom': 1, 194 | 'findKey': 1, 195 | 'findLast': 1, 196 | 'findLastFrom': 1, 197 | 'findLastIndex': 1, 198 | 'findLastIndexFrom': 1, 199 | 'findLastKey': 1, 200 | 'flatMap': 1, 201 | 'flatMapDeep': 1, 202 | 'flatMapDepth': 1, 203 | 'forEach': 1, 204 | 'forEachRight': 1, 205 | 'forIn': 1, 206 | 'forInRight': 1, 207 | 'forOwn': 1, 208 | 'forOwnRight': 1, 209 | 'map': 1, 210 | 'mapKeys': 1, 211 | 'mapValues': 1, 212 | 'partition': 1, 213 | 'reduce': 2, 214 | 'reduceRight': 2, 215 | 'reject': 1, 216 | 'remove': 1, 217 | 'some': 1, 218 | 'takeRightWhile': 1, 219 | 'takeWhile': 1, 220 | 'times': 1, 221 | 'transform': 2 222 | }; 223 | 224 | /** Used to map method names to iteratee rearg configs. */ 225 | exports.iterateeRearg = { 226 | 'mapKeys': [1] 227 | }; 228 | 229 | /** Used to map method names to rearg configs. */ 230 | exports.methodRearg = { 231 | 'assignInAllWith': [1, 0], 232 | 'assignInWith': [1, 2, 0], 233 | 'assignAllWith': [1, 0], 234 | 'assignWith': [1, 2, 0], 235 | 'differenceBy': [1, 2, 0], 236 | 'differenceWith': [1, 2, 0], 237 | 'getOr': [2, 1, 0], 238 | 'intersectionBy': [1, 2, 0], 239 | 'intersectionWith': [1, 2, 0], 240 | 'isEqualWith': [1, 2, 0], 241 | 'isMatchWith': [2, 1, 0], 242 | 'mergeAllWith': [1, 0], 243 | 'mergeWith': [1, 2, 0], 244 | 'padChars': [2, 1, 0], 245 | 'padCharsEnd': [2, 1, 0], 246 | 'padCharsStart': [2, 1, 0], 247 | 'pullAllBy': [2, 1, 0], 248 | 'pullAllWith': [2, 1, 0], 249 | 'rangeStep': [1, 2, 0], 250 | 'rangeStepRight': [1, 2, 0], 251 | 'setWith': [3, 1, 2, 0], 252 | 'sortedIndexBy': [2, 1, 0], 253 | 'sortedLastIndexBy': [2, 1, 0], 254 | 'unionBy': [1, 2, 0], 255 | 'unionWith': [1, 2, 0], 256 | 'updateWith': [3, 1, 2, 0], 257 | 'xorBy': [1, 2, 0], 258 | 'xorWith': [1, 2, 0], 259 | 'zipWith': [1, 2, 0] 260 | }; 261 | 262 | /** Used to map method names to spread configs. */ 263 | exports.methodSpread = { 264 | 'assignAll': { 'start': 0 }, 265 | 'assignAllWith': { 'start': 0 }, 266 | 'assignInAll': { 'start': 0 }, 267 | 'assignInAllWith': { 'start': 0 }, 268 | 'defaultsAll': { 'start': 0 }, 269 | 'defaultsDeepAll': { 'start': 0 }, 270 | 'invokeArgs': { 'start': 2 }, 271 | 'invokeArgsMap': { 'start': 2 }, 272 | 'mergeAll': { 'start': 0 }, 273 | 'mergeAllWith': { 'start': 0 }, 274 | 'partial': { 'start': 1 }, 275 | 'partialRight': { 'start': 1 }, 276 | 'without': { 'start': 1 }, 277 | 'zipAll': { 'start': 0 } 278 | }; 279 | 280 | /** Used to identify methods which mutate arrays or objects. */ 281 | exports.mutate = { 282 | 'array': { 283 | 'fill': true, 284 | 'pull': true, 285 | 'pullAll': true, 286 | 'pullAllBy': true, 287 | 'pullAllWith': true, 288 | 'pullAt': true, 289 | 'remove': true, 290 | 'reverse': true 291 | }, 292 | 'object': { 293 | 'assign': true, 294 | 'assignAll': true, 295 | 'assignAllWith': true, 296 | 'assignIn': true, 297 | 'assignInAll': true, 298 | 'assignInAllWith': true, 299 | 'assignInWith': true, 300 | 'assignWith': true, 301 | 'defaults': true, 302 | 'defaultsAll': true, 303 | 'defaultsDeep': true, 304 | 'defaultsDeepAll': true, 305 | 'merge': true, 306 | 'mergeAll': true, 307 | 'mergeAllWith': true, 308 | 'mergeWith': true, 309 | }, 310 | 'set': { 311 | 'set': true, 312 | 'setWith': true, 313 | 'unset': true, 314 | 'update': true, 315 | 'updateWith': true 316 | } 317 | }; 318 | 319 | /** Used to track methods with placeholder support */ 320 | exports.placeholder = { 321 | 'bind': true, 322 | 'bindKey': true, 323 | 'curry': true, 324 | 'curryRight': true, 325 | 'partial': true, 326 | 'partialRight': true 327 | }; 328 | 329 | /** Used to map real names to their aliases. */ 330 | exports.realToAlias = (function() { 331 | var hasOwnProperty = Object.prototype.hasOwnProperty, 332 | object = exports.aliasToReal, 333 | result = {}; 334 | 335 | for (var key in object) { 336 | var value = object[key]; 337 | if (hasOwnProperty.call(result, value)) { 338 | result[value].push(key); 339 | } else { 340 | result[value] = [key]; 341 | } 342 | } 343 | return result; 344 | }()); 345 | 346 | /** Used to map method names to other names. */ 347 | exports.remap = { 348 | 'assignAll': 'assign', 349 | 'assignAllWith': 'assignWith', 350 | 'assignInAll': 'assignIn', 351 | 'assignInAllWith': 'assignInWith', 352 | 'curryN': 'curry', 353 | 'curryRightN': 'curryRight', 354 | 'defaultsAll': 'defaults', 355 | 'defaultsDeepAll': 'defaultsDeep', 356 | 'findFrom': 'find', 357 | 'findIndexFrom': 'findIndex', 358 | 'findLastFrom': 'findLast', 359 | 'findLastIndexFrom': 'findLastIndex', 360 | 'getOr': 'get', 361 | 'includesFrom': 'includes', 362 | 'indexOfFrom': 'indexOf', 363 | 'invokeArgs': 'invoke', 364 | 'invokeArgsMap': 'invokeMap', 365 | 'lastIndexOfFrom': 'lastIndexOf', 366 | 'mergeAll': 'merge', 367 | 'mergeAllWith': 'mergeWith', 368 | 'padChars': 'pad', 369 | 'padCharsEnd': 'padEnd', 370 | 'padCharsStart': 'padStart', 371 | 'propertyOf': 'get', 372 | 'rangeStep': 'range', 373 | 'rangeStepRight': 'rangeRight', 374 | 'restFrom': 'rest', 375 | 'spreadFrom': 'spread', 376 | 'trimChars': 'trim', 377 | 'trimCharsEnd': 'trimEnd', 378 | 'trimCharsStart': 'trimStart', 379 | 'zipAll': 'zip' 380 | }; 381 | 382 | /** Used to track methods that skip fixing their arity. */ 383 | exports.skipFixed = { 384 | 'castArray': true, 385 | 'flow': true, 386 | 'flowRight': true, 387 | 'iteratee': true, 388 | 'mixin': true, 389 | 'rearg': true, 390 | 'runInContext': true 391 | }; 392 | 393 | /** Used to track methods that skip rearranging arguments. */ 394 | exports.skipRearg = { 395 | 'add': true, 396 | 'assign': true, 397 | 'assignIn': true, 398 | 'bind': true, 399 | 'bindKey': true, 400 | 'concat': true, 401 | 'difference': true, 402 | 'divide': true, 403 | 'eq': true, 404 | 'gt': true, 405 | 'gte': true, 406 | 'isEqual': true, 407 | 'lt': true, 408 | 'lte': true, 409 | 'matchesProperty': true, 410 | 'merge': true, 411 | 'multiply': true, 412 | 'overArgs': true, 413 | 'partial': true, 414 | 'partialRight': true, 415 | 'propertyOf': true, 416 | 'random': true, 417 | 'range': true, 418 | 'rangeRight': true, 419 | 'subtract': true, 420 | 'zip': true, 421 | 'zipObject': true, 422 | 'zipObjectDeep': true 423 | }; 424 | 425 | 426 | /***/ } 427 | /******/ ]) 428 | }); 429 | ; -------------------------------------------------------------------------------- /vendor/underscore/underscore-min.js: -------------------------------------------------------------------------------- 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 | (function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); 6 | //# sourceMappingURL=underscore-min.map --------------------------------------------------------------------------------