Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | ·ab489f52a05cb6f576a7f31bbb51ac3b·115632·javascript·optional·libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb | 1 | ·ab489f52a05cb6f576a7f31bbb51ac3b·115632·javascript·optional·libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb |
2 | · | 2 | ·cd2a6a07ba203dab25fdeca49713cdc7·120464·javascript·optional·node-underscore_1.13.4~dfsg+~1.11.4-3_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2023-01-02·04:09:24.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2023-01-02·04:09:24.000000·debian-binary |
2 | -rw-r--r--···0········0········0····115 | 2 | -rw-r--r--···0········0········0····11552·2023-01-02·04:09:24.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0···108 | 3 | -rw-r--r--···0········0········0···108720·2023-01-02·04:09:24.000000·data.tar.xz |
Offset 13, 133 lines modified | Offset 13, 133 lines modified | ||
13 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/ | 13 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/ |
14 | -rw-r--r--···0·root·········(0)·root·········(0)·····1697·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/index.d.mts | 14 | -rw-r--r--···0·root·········(0)·root·········(0)·····1697·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/index.d.mts |
15 | -rw-r--r--···0·root·········(0)·root·········(0)···242854·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/index.d.ts | 15 | -rw-r--r--···0·root·········(0)·root·········(0)···242854·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/index.d.ts |
16 | -rw-r--r--···0·root·········(0)·root·········(0)·····2254·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/package.json | 16 | -rw-r--r--···0·root·········(0)·root·········(0)·····2254·2023-01-02·04:09:24.000000·./usr/share/nodejs/@types/underscore/package.json |
17 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/ | 17 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/ |
18 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/ | 18 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/ |
19 | -rw-r--r--···0·root·········(0)·root·········(0)······574·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index.js | 19 | -rw-r--r--···0·root·········(0)·root·········(0)······574·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index.js |
20 | -rw-r--r--···0·root·········(0)·root·········(0)····· | 20 | -rw-r--r--···0·root·········(0)·root·········(0)·····1085·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index10.js |
21 | -rw-r--r--···0·root·········(0)·root·········(0)······728·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index100.js | 21 | -rw-r--r--···0·root·········(0)·root·········(0)······728·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index100.js |
22 | -rw-r--r--···0·root·········(0)·root·········(0)······149·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index101.js | 22 | -rw-r--r--···0·root·········(0)·root·········(0)······149·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index101.js |
23 | -rw-r--r--···0·root·········(0)·root·········(0)······270·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index102.js | 23 | -rw-r--r--···0·root·········(0)·root·········(0)······270·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index102.js |
24 | -rw-r--r--···0·root·········(0)·root·········(0)······114·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index103.js | 24 | -rw-r--r--···0·root·········(0)·root·········(0)······114·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index103.js |
25 | -rw-r--r--···0·root·········(0)·root·········(0)······446·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index104.js | 25 | -rw-r--r--···0·root·········(0)·root·········(0)······446·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index104.js |
26 | -rw-r--r--···0·root·········(0)·root·········(0)······554·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index105.js | 26 | -rw-r--r--···0·root·········(0)·root·········(0)······554·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index105.js |
27 | -rw-r--r--···0·root·········(0)·root·········(0)······405·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index106.js | 27 | -rw-r--r--···0·root·········(0)·root·········(0)······405·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index106.js |
28 | -rw-r--r--···0·root·········(0)·root·········(0)······292·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index107.js | 28 | -rw-r--r--···0·root·········(0)·root·········(0)······292·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index107.js |
29 | -rw-r--r--···0·root·········(0)·root·········(0)······577·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index108.js | 29 | -rw-r--r--···0·root·········(0)·root·········(0)······577·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index108.js |
30 | -rw-r--r--···0·root·········(0)·root·········(0)······571·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index109.js | ||
31 | -rw-r--r--···0·root·········(0)·root·········(0)·····1085·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index11.js | ||
32 | -rw-r--r--···0·root·········(0)·root·········(0)······327·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index1 | 30 | -rw-r--r--···0·root·········(0)·root·········(0)······327·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index109.js |
31 | -rw-r--r--···0·root·········(0)·root·········(0)······411·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index11.js | ||
32 | -rw-r--r--···0·root·········(0)·root·········(0)······571·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index110.js | ||
33 | -rw-r--r--···0·root·········(0)·root·········(0)······985·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index111.js | 33 | -rw-r--r--···0·root·········(0)·root·········(0)······985·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index111.js |
34 | -rw-r--r--···0·root·········(0)·root·········(0)······464·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index112.js | 34 | -rw-r--r--···0·root·········(0)·root·········(0)······464·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index112.js |
35 | -rw-r--r--···0·root·········(0)·root·········(0)······981·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index113.js | 35 | -rw-r--r--···0·root·········(0)·root·········(0)······981·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index113.js |
36 | -rw-r--r--···0·root·········(0)·root·········(0)······573·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index114.js | 36 | -rw-r--r--···0·root·········(0)·root·········(0)······573·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index114.js |
37 | -rw-r--r--···0·root·········(0)·root·········(0)······220·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index115.js | 37 | -rw-r--r--···0·root·········(0)·root·········(0)······220·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index115.js |
38 | -rw-r--r--···0·root·········(0)·root·········(0)······134·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index116.js | 38 | -rw-r--r--···0·root·········(0)·root·········(0)······134·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index116.js |
39 | -rw-r--r--···0·root·········(0)·root·········(0)······192·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index117.js | 39 | -rw-r--r--···0·root·········(0)·root·········(0)······192·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index117.js |
40 | -rw-r--r--···0·root·········(0)·root·········(0)······580·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index118.js | 40 | -rw-r--r--···0·root·········(0)·root·········(0)······580·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index118.js |
41 | -rw-r--r--···0·root·········(0)·root·········(0)······681·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index119.js | 41 | -rw-r--r--···0·root·········(0)·root·········(0)······681·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index119.js |
42 | -rw-r--r--···0·root·········(0)·root·········(0)······ | 42 | -rw-r--r--···0·root·········(0)·root·········(0)······331·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index12.js |
43 | -rw-r--r--···0·root·········(0)·root·········(0)······252·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index120.js | 43 | -rw-r--r--···0·root·········(0)·root·········(0)······252·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index120.js |
44 | -rw-r--r--···0·root·········(0)·root·········(0)······401·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index121.js | 44 | -rw-r--r--···0·root·········(0)·root·········(0)······401·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index121.js |
45 | -rw-r--r--···0·root·········(0)·root·········(0)·····1001·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index122.js | ||
46 | -rw-r--r--···0·root·········(0)·root·········(0)······840·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index123.js | ||
47 | -rw-r--r--···0·root·········(0)·root·········(0)······237·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index124.js | ||
48 | -rw-r--r--···0·root·········(0)·root·········(0)······329·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index12 | 45 | -rw-r--r--···0·root·········(0)·root·········(0)······329·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index122.js |
46 | -rw-r--r--···0·root·········(0)·root·········(0)·····1001·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index123.js | ||
47 | -rw-r--r--···0·root·········(0)·root·········(0)······840·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index124.js | ||
48 | -rw-r--r--···0·root·········(0)·root·········(0)······237·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index125.js | ||
49 | -rw-r--r--···0·root·········(0)·root·········(0)······384·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index126.js | 49 | -rw-r--r--···0·root·········(0)·root·········(0)······384·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index126.js |
50 | -rw-r--r--···0·root·········(0)·root·········(0)······296·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index127.js | 50 | -rw-r--r--···0·root·········(0)·root·········(0)······296·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index127.js |
51 | -rw-r--r--···0·root·········(0)·root·········(0)······185·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index128.js | ||
52 | -rw-r--r--···0·root·········(0)·root·········(0)······270·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index12 | 51 | -rw-r--r--···0·root·········(0)·root·········(0)······270·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index128.js |
52 | -rw-r--r--···0·root·········(0)·root·········(0)······640·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index129.js | ||
53 | -rw-r--r--···0·root·········(0)·root·········(0)······ | 53 | -rw-r--r--···0·root·········(0)·root·········(0)······233·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index13.js |
54 | -rw-r--r--···0·root·········(0)·root·········(0)······272·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index130.js | ||
55 | -rw-r--r--···0·root·········(0)·root·········(0)······200·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index13 | 54 | -rw-r--r--···0·root·········(0)·root·········(0)······200·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index130.js |
55 | -rw-r--r--···0·root·········(0)·root·········(0)······185·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index131.js | ||
56 | -rw-r--r--···0·root·········(0)·root·········(0)······272·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index132.js | ||
56 | -rw-r--r--···0·root·········(0)·root·········(0)······348·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index13 | 57 | -rw-r--r--···0·root·········(0)·root·········(0)······348·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index133.js |
57 | -rw-r--r--···0·root·········(0)·root·········(0)······640·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index133.js | ||
58 | -rw-r--r--···0·root·········(0)·root·········(0)·····1219·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index134.js | 58 | -rw-r--r--···0·root·········(0)·root·········(0)·····1219·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index134.js |
59 | -rw-r--r--···0·root·········(0)·root·········(0)······785·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index135.js | ||
60 | -rw-r--r--···0·root·········(0)·root·········(0)······982·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index13 | 59 | -rw-r--r--···0·root·········(0)·root·········(0)······982·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index135.js |
60 | -rw-r--r--···0·root·········(0)·root·········(0)······785·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index136.js | ||
61 | -rw-r--r--···0·root·········(0)·root·········(0)······161·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index137.js | 61 | -rw-r--r--···0·root·········(0)·root·········(0)······161·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index137.js |
62 | -rw-r--r--···0·root·········(0)·root·········(0)······264·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index138.js | 62 | -rw-r--r--···0·root·········(0)·root·········(0)······264·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index138.js |
63 | -rw-r--r--···0·root·········(0)·root·········(0)······556·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index139.js | 63 | -rw-r--r--···0·root·········(0)·root·········(0)······556·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index139.js |
64 | -rw-r--r--···0·root·········(0)·root·········(0)······608·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index14.js | 64 | -rw-r--r--···0·root·········(0)·root·········(0)······608·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index14.js |
65 | -rw-r--r--···0·root·········(0)·root·········(0)······722·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index140.js | 65 | -rw-r--r--···0·root·········(0)·root·········(0)······722·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index140.js |
66 | -rw-r--r--···0·root·········(0)·root·········(0)······338·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index141.js | ||
67 | -rw-r--r--···0·root·········(0)·root·········(0)······587·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index14 | 66 | -rw-r--r--···0·root·········(0)·root·········(0)······587·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index141.js |
67 | -rw-r--r--···0·root·········(0)·root·········(0)······338·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index142.js | ||
68 | -rw-r--r--···0·root·········(0)·root·········(0)·····3476·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index143.js | 68 | -rw-r--r--···0·root·········(0)·root·········(0)·····3476·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index143.js |
69 | -rw-r--r--···0·root·········(0)·root·········(0)······385·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index144.js | 69 | -rw-r--r--···0·root·········(0)·root·········(0)······385·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index144.js |
70 | -rw-r--r--···0·root·········(0)·root·········(0)·····1567·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index145.js | ||
71 | -rw-r--r--···0·root·········(0)·root·········(0)······313·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index146.js | ||
72 | -rw-r--r--···0·root·········(0)·root·········(0)······659·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index14 | 70 | -rw-r--r--···0·root·········(0)·root·········(0)······659·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index145.js |
73 | -rw-r--r--···0·root·········(0)·root·········(0)······304·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index14 | 71 | -rw-r--r--···0·root·········(0)·root·········(0)······304·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index146.js |
74 | -rw-r--r--···0·root·········(0)·root·········(0)······978·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index14 | 72 | -rw-r--r--···0·root·········(0)·root·········(0)······978·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index147.js |
73 | -rw-r--r--···0·root·········(0)·root·········(0)······844·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index148.js | ||
74 | -rw-r--r--···0·root·········(0)·root·········(0)······210·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index149.js | ||
75 | -rw-r--r--···0·root·········(0)·root·········(0)·····1006·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15.js | 75 | -rw-r--r--···0·root·········(0)·root·········(0)·····1006·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15.js |
76 | -rw-r--r--···0·root·········(0)·root·········(0)······844·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index150.js | ||
77 | -rw-r--r--···0·root·········(0)·root·········(0)······210·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index151.js | ||
78 | -rw-r--r--···0·root·········(0)·root·········(0)······326·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 76 | -rw-r--r--···0·root·········(0)·root·········(0)······326·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index150.js |
79 | -rw-r--r--···0·root·········(0)·root·········(0)·····1251·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 77 | -rw-r--r--···0·root·········(0)·root·········(0)·····1251·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index151.js |
80 | -rw-r--r--···0·root·········(0)·root·········(0)······285·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 78 | -rw-r--r--···0·root·········(0)·root·········(0)······285·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index152.js |
81 | -rw-r--r--···0·root·········(0)·root·········(0)······471·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 79 | -rw-r--r--···0·root·········(0)·root·········(0)······471·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index153.js |
82 | -rw-r--r--···0·root·········(0)·root·········(0)······335·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 80 | -rw-r--r--···0·root·········(0)·root·········(0)······335·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index154.js |
83 | -rw-r--r--···0·root·········(0)·root·········(0)······293·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 81 | -rw-r--r--···0·root·········(0)·root·········(0)······293·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index155.js |
84 | -rw-r--r--···0·root·········(0)·root·········(0)······293·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 82 | -rw-r--r--···0·root·········(0)·root·········(0)······293·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index156.js |
83 | -rw-r--r--···0·root·········(0)·root·········(0)······329·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index157.js | ||
85 | -rw-r--r--···0·root·········(0)·root·········(0)······227·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index15 | 84 | -rw-r--r--···0·root·········(0)·root·········(0)······227·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index158.js |
85 | -rw-r--r--···0·root·········(0)·root·········(0)·····1567·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index159.js | ||
86 | -rw-r--r--···0·root·········(0)·root·········(0)······207·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index16.js | 86 | -rw-r--r--···0·root·········(0)·root·········(0)······207·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index16.js |
87 | -rw-r--r--···0·root·········(0)·root·········(0)······3 | 87 | -rw-r--r--···0·root·········(0)·root·········(0)······313·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index160.js |
88 | -rw-r--r--···0·root·········(0)·root·········(0)······191·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index17.js | 88 | -rw-r--r--···0·root·········(0)·root·········(0)······191·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index17.js |
89 | -rw-r--r--···0·root·········(0)·root·········(0)······491·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index18.js | 89 | -rw-r--r--···0·root·········(0)·root·········(0)······491·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index18.js |
90 | -rw-r--r--···0·root·········(0)·root·········(0)······240·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index19.js | 90 | -rw-r--r--···0·root·········(0)·root·········(0)······240·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index19.js |
91 | -rw-r--r--···0·root·········(0)·root·········(0)······ | 91 | -rw-r--r--···0·root·········(0)·root·········(0)······715·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index2.js |
92 | -rw-r--r--···0·root·········(0)·root·········(0)······119·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index20.js | 92 | -rw-r--r--···0·root·········(0)·root·········(0)······119·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index20.js |
93 | -rw-r--r--···0·root·········(0)·root·········(0)······436·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index21.js | 93 | -rw-r--r--···0·root·········(0)·root·········(0)······436·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index21.js |
94 | -rw-r--r--···0·root·········(0)·root·········(0)······289·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index22.js | 94 | -rw-r--r--···0·root·········(0)·root·········(0)······289·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index22.js |
95 | -rw-r--r--···0·root·········(0)·root·········(0)······227·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index23.js | 95 | -rw-r--r--···0·root·········(0)·root·········(0)······227·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index23.js |
96 | -rw-r--r--···0·root·········(0)·root·········(0)·····1708·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index24.js | 96 | -rw-r--r--···0·root·········(0)·root·········(0)·····1708·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index24.js |
97 | -rw-r--r--···0·root·········(0)·root·········(0)······888·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index25.js | 97 | -rw-r--r--···0·root·········(0)·root·········(0)······888·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index25.js |
98 | -rw-r--r--···0·root·········(0)·root·········(0)·····2593·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index26.js | 98 | -rw-r--r--···0·root·········(0)·root·········(0)·····2593·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index26.js |
99 | -rw-r--r--···0·root·········(0)·root·········(0)······255·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index27.js | 99 | -rw-r--r--···0·root·········(0)·root·········(0)······255·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index27.js |
100 | -rw-r--r--···0·root·········(0)·root·········(0)······555·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index28.js | 100 | -rw-r--r--···0·root·········(0)·root·········(0)······555·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index28.js |
101 | -rw-r--r--···0·root·········(0)·root·········(0)······293·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index29.js | 101 | -rw-r--r--···0·root·········(0)·root·········(0)······293·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index29.js |
102 | -rw-r--r--···0·root·········(0)·root·········(0)······ | 102 | -rw-r--r--···0·root·········(0)·root·········(0)······435·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index3.js |
103 | -rw-r--r--···0·root·········(0)·root·········(0)······401·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index30.js | 103 | -rw-r--r--···0·root·········(0)·root·········(0)······401·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index30.js |
104 | -rw-r--r--···0·root·········(0)·root·········(0)······263·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index31.js | 104 | -rw-r--r--···0·root·········(0)·root·········(0)······263·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index31.js |
105 | -rw-r--r--···0·root·········(0)·root·········(0)······187·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index32.js | 105 | -rw-r--r--···0·root·········(0)·root·········(0)······187·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index32.js |
106 | -rw-r--r--···0·root·········(0)·root·········(0)······268·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index33.js | 106 | -rw-r--r--···0·root·········(0)·root·········(0)······268·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index33.js |
107 | -rw-r--r--···0·root·········(0)·root·········(0)······411·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index34.js | 107 | -rw-r--r--···0·root·········(0)·root·········(0)······411·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index34.js |
108 | -rw-r--r--···0·root·········(0)·root·········(0)······356·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index35.js | 108 | -rw-r--r--···0·root·········(0)·root·········(0)······356·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index35.js |
109 | -rw-r--r--···0·root·········(0)·root·········(0)······532·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index36.js | 109 | -rw-r--r--···0·root·········(0)·root·········(0)······532·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index36.js |
110 | -rw-r--r--···0·root·········(0)·root·········(0)······631·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index37.js | 110 | -rw-r--r--···0·root·········(0)·root·········(0)······631·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index37.js |
111 | -rw-r--r--···0·root·········(0)·root·········(0)······234·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index38.js | 111 | -rw-r--r--···0·root·········(0)·root·········(0)······234·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index38.js |
112 | -rw-r--r--···0·root·········(0)·root·········(0)······413·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index39.js | 112 | -rw-r--r--···0·root·········(0)·root·········(0)······413·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index39.js |
113 | -rw-r--r--···0·root·········(0)·root·········(0)····· | 113 | -rw-r--r--···0·root·········(0)·root·········(0)······246·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index4.js |
114 | -rw-r--r--···0·root·········(0)·root·········(0)······288·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index40.js | 114 | -rw-r--r--···0·root·········(0)·root·········(0)······288·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index40.js |
115 | -rw-r--r--···0·root·········(0)·root·········(0)······182·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index41.js | 115 | -rw-r--r--···0·root·········(0)·root·········(0)······182·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index41.js |
116 | -rw-r--r--···0·root·········(0)·root·········(0)······456·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index42.js | 116 | -rw-r--r--···0·root·········(0)·root·········(0)······456·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index42.js |
117 | -rw-r--r--···0·root·········(0)·root·········(0)······205·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index43.js | 117 | -rw-r--r--···0·root·········(0)·root·········(0)······205·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index43.js |
118 | -rw-r--r--···0·root·········(0)·root·········(0)······406·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index44.js | 118 | -rw-r--r--···0·root·········(0)·root·········(0)······406·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index44.js |
119 | -rw-r--r--···0·root·········(0)·root·········(0)······378·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index45.js | 119 | -rw-r--r--···0·root·········(0)·root·········(0)······378·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index45.js |
120 | -rw-r--r--···0·root·········(0)·root·········(0)······403·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index46.js | 120 | -rw-r--r--···0·root·········(0)·root·········(0)······403·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index46.js |
121 | -rw-r--r--···0·root·········(0)·root·········(0)·····1291·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index47.js | 121 | -rw-r--r--···0·root·········(0)·root·········(0)·····1291·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index47.js |
122 | -rw-r--r--···0·root·········(0)·root·········(0)······199·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index48.js | 122 | -rw-r--r--···0·root·········(0)·root·········(0)······199·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index48.js |
123 | -rw-r--r--···0·root·········(0)·root·········(0)······248·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index49.js | 123 | -rw-r--r--···0·root·········(0)·root·········(0)······248·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index49.js |
124 | -rw-r--r--···0·root·········(0)·root·········(0)····· | 124 | -rw-r--r--···0·root·········(0)·root·········(0)·····1429·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index5.js |
125 | -rw-r--r--···0·root·········(0)·root·········(0)······337·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index50.js | 125 | -rw-r--r--···0·root·········(0)·root·········(0)······337·2023-01-02·04:09:24.000000·./usr/share/nodejs/underscore/amd/index50.js |
Max diff block lines reached; 35491/55751 bytes (63.66%) of diff not shown. |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index9 | 1 | define(['./index94',·'./index26'],·(function(isObject,·_setup)·{ |
2 | ····//·Create·a·naked·function·reference·for·surrogate-prototype-swapping. | 2 | ····//·Create·a·naked·function·reference·for·surrogate-prototype-swapping. |
3 | ····function·ctor()·{ | 3 | ····function·ctor()·{ |
4 | ········return·function()·{}; | 4 | ········return·function()·{}; |
5 | ····} | 5 | ····} |
6 | ····//·An·internal·function·for·creating·a·new·object·that·inherits·from·another. | 6 | ····//·An·internal·function·for·creating·a·new·object·that·inherits·from·another. |
Offset 1, 13 lines modified | Offset 1, 30 lines modified | ||
1 | define(['./index2 | 1 | define(['./index21',·'./index105',·'./index25'],·(function(_isArrayLike,·keys,·_optimizeCb)·{ |
2 | ····//·Common·internal·logic·for·`isArrayLike`·and·`isBufferLike`. | ||
3 | ····function·createSizePropertyCheck(getSizeProperty)·{ | ||
4 | ········return·function(collection)·{ | ||
5 | ············var·sizeProperty·=·getSizeProperty(collection); | ||
6 | ···· | 2 | ····//·Internal·helper·to·create·a·reducing·function,·iterating·left·or·right. |
3 | ····function·createReduce(dir)·{ | ||
4 | ········//·Wrap·code·that·reassigns·argument·variables·in·a·separate·function·than | ||
5 | ········//·the·one·that·accesses·`arguments.length`·to·avoid·a·perf·hit.·(#1991) | ||
6 | ········var·reducer·=·function(obj,·iteratee,·memo,·initial)·{ | ||
7 | ············var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | ||
8 | ················length·=·(_keys·||·obj).length, | ||
9 | ················index·=·dir·>·0·?·0·:·length·-·1; | ||
10 | ············if·(!initial)·{ | ||
11 | ················memo·=·obj[_keys·?·_keys[index]·:·index]; | ||
12 | ················index·+=·dir; | ||
13 | ············} | ||
14 | ············for·(;·index·>=·0·&&·index·<·length;·index·+=·dir)·{ | ||
15 | ················var·currentKey·=·_keys·?·_keys[index]·:·index; | ||
16 | ················memo·=·iteratee(memo,·obj[currentKey],·currentKey,·obj); | ||
17 | ············} | ||
18 | ············return·memo; | ||
7 | ········} | 19 | ········}; |
20 | ········return·function(obj,·iteratee,·memo,·context)·{ | ||
21 | ············var·initial·=·arguments.length·>=·3; | ||
22 | ············return·reducer(obj,·_optimizeCb(iteratee,·context,·4),·memo,·initial); | ||
23 | ········}; | ||
8 | ····} | 24 | ····} |
9 | ····return·create | 25 | ····return·createReduce; |
10 | })); | 26 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index148',·'./index2'],·(function(underscore,·_baseIteratee)·{ |
2 | ····//·External·wrapper·for·our·callback·generator.·Users·may·customize | 2 | ····//·External·wrapper·for·our·callback·generator.·Users·may·customize |
3 | ····//·`_.iteratee`·if·they·want·additional·predicate/iteratee·shorthand·styles. | 3 | ····//·`_.iteratee`·if·they·want·additional·predicate/iteratee·shorthand·styles. |
4 | ····//·This·abstraction·hides·the·internal-only·`argCount`·argument. | 4 | ····//·This·abstraction·hides·the·internal-only·`argCount`·argument. |
5 | ····function·iteratee(value,·context)·{ | 5 | ····function·iteratee(value,·context)·{ |
6 | ········return·_baseIteratee(value,·context,·Infinity); | 6 | ········return·_baseIteratee(value,·context,·Infinity); |
7 | ····} | 7 | ····} |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index9 | 1 | define(['./index94',·'./index26',·'./index19',·'./index5'],·(function(isObject,·_setup,·_has,·_collectNonEnumProps)·{ |
2 | ····//·Retrieve·the·names·of·an·object's·own·properties. | 2 | ····//·Retrieve·the·names·of·an·object's·own·properties. |
3 | ····//·Delegates·to·**ECMAScript·5**'s·native·`Object.keys`. | 3 | ····//·Delegates·to·**ECMAScript·5**'s·native·`Object.keys`. |
4 | ····function·keys(obj)·{ | 4 | ····function·keys(obj)·{ |
5 | ········if·(!isObject(obj))·return·[]; | 5 | ········if·(!isObject(obj))·return·[]; |
6 | ········if·(_setup.nativeKeys)·return·_setup.nativeKeys(obj); | 6 | ········if·(_setup.nativeKeys)·return·_setup.nativeKeys(obj); |
7 | ········var·keys·=·[]; | 7 | ········var·keys·=·[]; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index13 | 1 | define(['./index133'],·(function(rest)·{ |
2 | ····//·Get·the·last·element·of·an·array.·Passing·**n**·will·return·the·last·N | 2 | ····//·Get·the·last·element·of·an·array.·Passing·**n**·will·return·the·last·N |
3 | ····//·values·in·the·array. | 3 | ····//·values·in·the·array. |
4 | ····function·last(array,·n,·guard)·{ | 4 | ····function·last(array,·n,·guard)·{ |
5 | ········if·(array·==·null·||·array.length·<·1)·return·n·==·null·||·guard·?·void·0·:·[]; | 5 | ········if·(array·==·null·||·array.length·<·1)·return·n·==·null·||·guard·?·void·0·:·[]; |
6 | ········if·(n·==·null·||·guard)·return·array[array.length·-·1]; | 6 | ········if·(n·==·null·||·guard)·return·array[array.length·-·1]; |
7 | ········return·rest(array,·Math.max(0,·array.length·-·n)); | 7 | ········return·rest(array,·Math.max(0,·array.length·-·n)); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index6 | 1 | define(['./index62',·'./index8'],·(function(findLastIndex,·_createIndexFinder)·{ |
2 | ····//·Return·the·position·of·the·last·occurrence·of·an·item·in·an·array, | 2 | ····//·Return·the·position·of·the·last·occurrence·of·an·item·in·an·array, |
3 | ····//·or·-1·if·the·item·is·not·included·in·the·array. | 3 | ····//·or·-1·if·the·item·is·not·included·in·the·array. |
4 | ····var·lastIndexOf·=·_createIndexFinder(-1,·findLastIndex); | 4 | ····var·lastIndexOf·=·_createIndexFinder(-1,·findLastIndex); |
5 | ····return·lastIndexOf; | 5 | ····return·lastIndexOf; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index21',·'./index105'],·(function(_cb,·_isArrayLike,·keys)·{ |
2 | ····//·Return·the·results·of·applying·the·iteratee·to·each·element. | 2 | ····//·Return·the·results·of·applying·the·iteratee·to·each·element. |
3 | ····function·map(obj,·iteratee,·context)·{ | 3 | ····function·map(obj,·iteratee,·context)·{ |
4 | ········iteratee·=·_cb(iteratee,·context); | 4 | ········iteratee·=·_cb(iteratee,·context); |
5 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | 5 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), |
6 | ············length·=·(_keys·||·obj).length, | 6 | ············length·=·(_keys·||·obj).length, |
7 | ············results·=·Array(length); | 7 | ············results·=·Array(length); |
Offset 1, 19 lines modified | Offset 1, 14 lines modified | ||
1 | define(['./index5',·'./index | 1 | define(['./index56',·'./index91'],·(function(extendOwn,·isMatch)·{ |
2 | ····//·Returns·a·predicate·for·checking·whether·an·object·has·a·given·set·of | ||
3 | ····//·`key:value`·pairs. | ||
4 | ····function·matcher(attrs)·{ | ||
5 | ········attrs·=·extendOwn({},·attrs); | ||
6 | ········return·function(obj)·{ | ||
7 | ············return·isMatch(obj,·attrs); | ||
2 | ····//·Returns·the·results·of·applying·the·`iteratee`·to·each·element·of·`obj`. | ||
3 | ····//·In·contrast·to·`_.map`·it·returns·an·object. | ||
4 | ····function·mapObject(obj,·iteratee,·context)·{ | ||
5 | ········iteratee·=·_cb(iteratee,·context); | ||
6 | ········var·_keys·=·keys(obj), | ||
7 | ············length·=·_keys.length, | ||
8 | ············results·=·{}; | ||
9 | ········for·(var·index·=·0;·index·<·length;·index++)·{ | ||
10 | ············var·currentKey·=·_keys[index]; | ||
11 | ············results[currentKey]·=·iteratee(obj[currentKey],·currentKey,·obj); | ||
12 | ········} | 8 | ········}; |
13 | ········return·results; | ||
14 | ····} | 9 | ····} |
15 | ····return·ma | 10 | ····return·matcher; |
16 | })); | 11 | })); |
Offset 1, 30 lines modified | Offset 1, 13 lines modified | ||
1 | define(['./index2 | 1 | define(['./index26'],·(function(_setup)·{ |
2 | ····//·Common·internal·logic·for·`isArrayLike`·and·`isBufferLike`. | ||
3 | ····function·createSizePropertyCheck(getSizeProperty)·{ | ||
4 | ········return·function(collection)·{ | ||
5 | ············var·sizeProperty·=·getSizeProperty(collection); | ||
6 | ············return·typeof·sizeProperty·==·'number'·&&·sizeProperty·>=·0·&&·sizeProperty·<=·_setup.MAX_ARRAY_INDEX; | ||
2 | ····//·Internal·helper·to·create·a·reducing·function,·iterating·left·or·right. | ||
3 | ····function·createReduce(dir)·{ | ||
4 | ········//·Wrap·code·that·reassigns·argument·variables·in·a·separate·function·than | ||
5 | ········//·the·one·that·accesses·`arguments.length`·to·avoid·a·perf·hit.·(#1991) | ||
6 | ········var·reducer·=·function(obj,·iteratee,·memo,·initial)·{ | ||
7 | ············var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | ||
8 | ················length·=·(_keys·||·obj).length, | ||
9 | ················index·=·dir·>·0·?·0·:·length·-·1; | ||
10 | ············if·(!initial)·{ | ||
11 | ················memo·=·obj[_keys·?·_keys[index]·:·index]; | ||
12 | ················index·+=·dir; | ||
13 | ············} | ||
14 | ············for·(;·index·>=·0·&&·index·<·length;·index·+=·dir)·{ | ||
15 | ················var·currentKey·=·_keys·?·_keys[index]·:·index; | ||
16 | ················memo·=·iteratee(memo,·obj[currentKey],·currentKey,·obj); | ||
17 | ············} | ||
18 | ············return·memo; | ||
19 | ········} | 7 | ········} |
20 | ········return·function(obj,·iteratee,·memo,·context)·{ | ||
21 | ············var·initial·=·arguments.length·>=·3; | ||
22 | ············return·reducer(obj,·_optimizeCb(iteratee,·context,·4),·memo,·initial); | ||
23 | ········}; | ||
24 | ····} | 8 | ····} |
25 | ····return·create | 9 | ····return·createSizePropertyCheck; |
26 | })); | 10 | })); |
Offset 1, 14 lines modified | Offset 1, 19 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index105'],·(function(_cb,·keys)·{ |
2 | ····//·Returns·a·predicate·for·checking·whether·an·object·has·a·given·set·of | ||
3 | ····//·`key:value`·pairs. | ||
4 | ····function·matcher(attrs)·{ | ||
5 | ········attrs·=·extendOwn({},·attrs); | ||
6 | ········return·function(obj)·{ | ||
7 | ····· | 2 | ····//·Returns·the·results·of·applying·the·`iteratee`·to·each·element·of·`obj`. |
3 | ····//·In·contrast·to·`_.map`·it·returns·an·object. | ||
4 | ····function·mapObject(obj,·iteratee,·context)·{ | ||
5 | ········iteratee·=·_cb(iteratee,·context); | ||
6 | ········var·_keys·=·keys(obj), | ||
7 | ············length·=·_keys.length, | ||
8 | ············results·=·{}; | ||
9 | ········for·(var·index·=·0;·index·<·length;·index++)·{ | ||
10 | ············var·currentKey·=·_keys[index]; | ||
11 | ············results[currentKey]·=·iteratee(obj[currentKey],·currentKey,·obj); | ||
8 | ········} | 12 | ········} |
13 | ········return·results; | ||
9 | ····} | 14 | ····} |
10 | ····return·ma | 15 | ····return·mapObject; |
11 | })); | 16 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index21',·'./index15 | 1 | define(['./index21',·'./index154',·'./index3',·'./index52'],·(function(_isArrayLike,·values,·_cb,·each)·{ |
2 | ····//·Return·the·maximum·element·(or·element-based·computation). | 2 | ····//·Return·the·maximum·element·(or·element-based·computation). |
3 | ····function·max(obj,·iteratee,·context)·{ | 3 | ····function·max(obj,·iteratee,·context)·{ |
4 | ········var·result·=·-Infinity, | 4 | ········var·result·=·-Infinity, |
5 | ············lastComputed·=·-Infinity, | 5 | ············lastComputed·=·-Infinity, |
6 | ············value,·computed; | 6 | ············value,·computed; |
7 | ········if·(iteratee·==·null·||·(typeof·iteratee·==·'number'·&&·typeof·obj[0]·!=·'object'·&&·obj·!=·null))·{ | 7 | ········if·(iteratee·==·null·||·(typeof·iteratee·==·'number'·&&·typeof·obj[0]·!=·'object'·&&·obj·!=·null))·{ |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index21',·'./index15 | 1 | define(['./index21',·'./index154',·'./index3',·'./index52'],·(function(_isArrayLike,·values,·_cb,·each)·{ |
2 | ····//·Return·the·minimum·element·(or·element-based·computation). | 2 | ····//·Return·the·minimum·element·(or·element-based·computation). |
3 | ····function·min(obj,·iteratee,·context)·{ | 3 | ····function·min(obj,·iteratee,·context)·{ |
4 | ········var·result·=·Infinity, | 4 | ········var·result·=·Infinity, |
5 | ············lastComputed·=·Infinity, | 5 | ············lastComputed·=·Infinity, |
6 | ············value,·computed; | 6 | ············value,·computed; |
7 | ········if·(iteratee·==·null·||·(typeof·iteratee·==·'number'·&&·typeof·obj[0]·!=·'object'·&&·obj·!=·null))·{ | 7 | ········if·(iteratee·==·null·||·(typeof·iteratee·==·'number'·&&·typeof·obj[0]·!=·'object'·&&·obj·!=·null))·{ |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index148',·'./index52',·'./index65',·'./index26',·'./index4'],·(function(underscore,·each,·functions,·_setup,·_chainResult)·{ |
2 | ····//·Add·your·own·custom·functions·to·the·Underscore·object. | 2 | ····//·Add·your·own·custom·functions·to·the·Underscore·object. |
3 | ····function·mixin(obj)·{ | 3 | ····function·mixin(obj)·{ |
4 | ········each(functions(obj),·function(name)·{ | 4 | ········each(functions(obj),·function(name)·{ |
5 | ············var·func·=·underscore[name]·=·obj[name]; | 5 | ············var·func·=·underscore[name]·=·obj[name]; |
6 | ············underscore.prototype[name]·=·function()·{ | 6 | ············underscore.prototype[name]·=·function()·{ |
7 | ················var·args·=·[this._wrapped]; | 7 | ················var·args·=·[this._wrapped]; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index134',·'./index89',·'./index115',·'./index108',·'./index15',·'./index44',·'./index12 | 1 | define(['./index134',·'./index89',·'./index115',·'./index108',·'./index15',·'./index44',·'./index124'],·(function(restArguments,·isFunction,·negate,·map,·_flatten,·contains,·pick)·{ |
2 | ····//·Return·a·copy·of·the·object·without·the·disallowed·properties. | 2 | ····//·Return·a·copy·of·the·object·without·the·disallowed·properties. |
3 | ····var·omit·=·restArguments(function(obj,·keys)·{ | 3 | ····var·omit·=·restArguments(function(obj,·keys)·{ |
4 | ········var·iteratee·=·keys[0], | 4 | ········var·iteratee·=·keys[0], |
5 | ············context; | 5 | ············context; |
6 | ········if·(isFunction(iteratee))·{ | 6 | ········if·(isFunction(iteratee))·{ |
7 | ············iteratee·=·negate(iteratee); | 7 | ············iteratee·=·negate(iteratee); |
Offset 1, 15 lines modified | Offset 1, 15 lines modified | ||
1 | define((function()·{ | 1 | define((function()·{ |
2 | ····//·Internal·list·of·HTML·entities·for·escaping. | ||
3 | ····var·escapeMap·=·{ | ||
4 | ········'&':·'&', | ||
5 | ········'<':·'<', | ||
6 | ········'>':·'>', | ||
7 | ········'"':·'"', | ||
8 | ········"'":·''', | ||
9 | ········ | 2 | ····//·Internal·function·to·obtain·a·nested·property·in·`obj`·along·`path`. |
3 | ····function·deepGet(obj,·path)·{ | ||
4 | ········var·length·=·path.length; | ||
5 | ········for·(var·i·=·0;·i·<·length;·i++)·{ | ||
6 | ············if·(obj·==·null)·return·void·0; | ||
7 | ············obj·=·obj[path[i]]; | ||
8 | ········} | ||
9 | ········return·length·?·obj·:·void·0; | ||
10 | ····} | 10 | ····} |
11 | ····return· | 11 | ····return·deepGet; |
12 | })); | 12 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index12 | 1 | define(['./index123',·'./index35'],·(function(partial,·before)·{ |
2 | ····//·Returns·a·function·that·will·be·executed·at·most·one·time,·no·matter·how | 2 | ····//·Returns·a·function·that·will·be·executed·at·most·one·time,·no·matter·how |
3 | ····//·often·you·call·it.·Useful·for·lazy·initialization. | 3 | ····//·often·you·call·it.·Useful·for·lazy·initialization. |
4 | ····var·once·=·partial(before,·2); | 4 | ····var·once·=·partial(before,·2); |
5 | ····return·once; | 5 | ····return·once; |
Offset 1, 26 lines modified | Offset 1, 11 lines modified | ||
1 | define(['./index1 | 1 | define(['./index18'],·(function(_group)·{ |
2 | ····//·Split·a·collection·into·two·arrays:·one·whose·elements·all·pass·the·given | ||
3 | ····//·truth·test,·and·one·whose·elements·all·do·not·pass·the·truth·test. | ||
4 | ····var·partition·=·_group(function(result,·value,·pass)·{ | ||
5 | ········result[pass·?·0·:·1].push(value); | ||
6 | ····},·true); | ||
2 | ····//·Partially·apply·a·function·by·creating·a·version·that·has·had·some·of·its | ||
3 | ····//·arguments·pre-filled,·without·changing·its·dynamic·`this`·context.·`_`·acts | ||
4 | ····//·as·a·placeholder·by·default,·allowing·any·combination·of·arguments·to·be | ||
5 | ····//·pre-filled.·Set·`_.partial.placeholder`·for·a·custom·placeholder·argument. | ||
6 | ····var·partial·=·restArguments(function(func,·boundArgs)·{ | ||
7 | ········var·placeholder·=·partial.placeholder; | ||
8 | ········var·bound·=·function()·{ | ||
9 | ············var·position·=·0, | ||
10 | ················length·=·boundArgs.length; | ||
11 | ············var·args·=·Array(length); | ||
12 | ············for·(var·i·=·0;·i·<·length;·i++)·{ | ||
13 | ················args[i]·=·boundArgs[i]·===·placeholder·?·arguments[position++]·:·boundArgs[i]; | ||
14 | ············} | ||
15 | ············while·(position·<·arguments.length)·args.push(arguments[position++]); | ||
16 | ············return·_executeBound(func,·bound,·this,·this,·args); | ||
17 | ········}; | ||
18 | ········return·bound; | ||
19 | ····}); | ||
20 | ····partial.placeholder·=·underscore; | ||
21 | ····return·parti | 7 | ····return·partition; |
22 | })); | 8 | })); |
Offset 1, 26 lines modified | Offset 1, 26 lines modified | ||
1 | define(['./index134',·'./index | 1 | define(['./index134',·'./index14',·'./index148'],·(function(restArguments,·_executeBound,·underscore)·{ |
2 | ····//· | 2 | ····//·Partially·apply·a·function·by·creating·a·version·that·has·had·some·of·its |
3 | ····//·arguments·pre-filled,·without·changing·its·dynamic·`this`·context.·`_`·acts | ||
4 | ····//·as·a·placeholder·by·default,·allowing·any·combination·of·arguments·to·be | ||
5 | ····//·pre-filled.·Set·`_.partial.placeholder`·for·a·custom·placeholder·argument. | ||
3 | ····var·pi | 6 | ····var·partial·=·restArguments(function(func,·boundArgs)·{ |
4 | ········var·result·=·{}, | ||
5 | ············iteratee·=·keys[0]; | ||
6 | ········if·(obj·==·null)·return·result; | ||
7 | ········if·(isFunction(iteratee))·{ | ||
8 | ············if·(keys.length·>·1)·iteratee·=·_optimizeCb(iteratee,·keys[1]); | ||
9 | ············keys·=·allKeys(obj); | ||
10 | ········}·else·{ | ||
11 | ············iteratee·=·_keyInObj; | ||
12 | ············keys·=·_flatten(keys,·false,·false); | ||
13 | ········· | 7 | ········var·placeholder·=·partial.placeholder; |
8 | ········var·bound·=·function()·{ | ||
9 | ············var·position·=·0, | ||
10 | ················length·=·boundArgs.length; | ||
11 | ············var·args·=·Array(length); | ||
12 | ············for·(var·i·=·0;·i·<·length;·i++)·{ | ||
13 | ················args[i]·=·boundArgs[i]·===·placeholder·?·arguments[position++]·:·boundArgs[i]; | ||
14 | ············} | ||
15 | ············while·(position·<·arguments.length)·args.push(arguments[position++]); | ||
16 | ············return·_executeBound(func,·bound,·this,·this,·args); | ||
14 | ········} | 17 | ········}; |
15 | ········for·(var·i·=·0,·length·=·keys.length;·i·<·length;·i++)·{ | ||
16 | ············var·key·=·keys[i]; | ||
17 | ············var·value·=·obj[key]; | ||
18 | ············if·(iteratee(value,·key,·obj))·result[key]·=·value; | ||
19 | ········} | ||
20 | ········return· | 18 | ········return·bound; |
21 | ····}); | 19 | ····}); |
20 | ····partial.placeholder·=·underscore; | ||
22 | ····return·pi | 21 | ····return·partial; |
23 | })); | 22 | })); |
Offset 1, 10 lines modified | Offset 1, 26 lines modified | ||
1 | define(['./index1 | 1 | define(['./index134',·'./index89',·'./index25',·'./index34',·'./index23',·'./index15'],·(function(restArguments,·isFunction,·_optimizeCb,·allKeys,·_keyInObj,·_flatten)·{ |
2 | ····//·Convenience·version·of·a·common·use·case·of·`_.map`:·fetching·a·property. | ||
3 | ····function·pluck(obj,·key)·{ | ||
4 | ········ | 2 | ····//·Return·a·copy·of·the·object·only·containing·the·allowed·properties. |
3 | ····var·pick·=·restArguments(function(obj,·keys)·{ | ||
4 | ········var·result·=·{}, | ||
5 | ············iteratee·=·keys[0]; | ||
6 | ········if·(obj·==·null)·return·result; | ||
7 | ········if·(isFunction(iteratee))·{ | ||
8 | ············if·(keys.length·>·1)·iteratee·=·_optimizeCb(iteratee,·keys[1]); | ||
9 | ············keys·=·allKeys(obj); | ||
10 | ········}·else·{ | ||
11 | ············iteratee·=·_keyInObj; | ||
12 | ············keys·=·_flatten(keys,·false,·false); | ||
13 | ············obj·=·Object(obj); | ||
14 | ········} | ||
15 | ········for·(var·i·=·0,·length·=·keys.length;·i·<·length;·i++)·{ | ||
16 | ············var·key·=·keys[i]; | ||
17 | ············var·value·=·obj[key]; | ||
18 | ············if·(iteratee(value,·key,·obj))·result[key]·=·value; | ||
19 | ········} | ||
20 | ········return·result; | ||
5 | ····} | 21 | ····}); |
6 | ····return·p | 22 | ····return·pick; |
7 | })); | 23 | })); |
Offset 1, 11 lines modified | Offset 1, 10 lines modified | ||
1 | define(['./index18'],·(function( | 1 | define(['./index108',·'./index126'],·(function(map,·property)·{ |
2 | ····//·Convenience·version·of·a·common·use·case·of·`_.map`:·fetching·a·property. | ||
3 | ····function·pluck(obj,·key)·{ | ||
4 | ········return·map(obj,·property(key)); | ||
5 | ····} | ||
2 | ····//·Split·a·collection·into·two·arrays:·one·whose·elements·all·pass·the·given | ||
3 | ····//·truth·test,·and·one·whose·elements·all·do·not·pass·the·truth·test. | ||
4 | ····var·partition·=·_group(function(result,·value,·pass)·{ | ||
5 | ········result[pass·?·0·:·1].push(value); | ||
6 | ····},·true); | ||
7 | ····return·p | 6 | ····return·pluck; |
8 | })); | 7 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index12',·'./index31'],·(function(_deepGet,·_toPath)·{ |
2 | ····//·Creates·a·function·that,·when·passed·an·object,·will·traverse·that·object’s | 2 | ····//·Creates·a·function·that,·when·passed·an·object,·will·traverse·that·object’s |
3 | ····//·properties·down·the·given·`path`,·specified·as·an·array·of·keys·or·indices. | 3 | ····//·properties·down·the·given·`path`,·specified·as·an·array·of·keys·or·indices. |
4 | ····function·property(path)·{ | 4 | ····function·property(path)·{ |
5 | ········path·=·_toPath(path); | 5 | ········path·=·_toPath(path); |
6 | ········return·function(obj)·{ | 6 | ········return·function(obj)·{ |
7 | ············return·_deepGet(obj,·path); | 7 | ············return·_deepGet(obj,·path); |
Offset 1, 8 lines modified | Offset 1, 14 lines modified | ||
1 | define( | 1 | define((function()·{ |
2 | ····//·The·right-associative·version·of·reduce,·also·known·as·`foldr`. | ||
3 | ···· | 2 | ····//·Return·a·random·integer·between·`min`·and·`max`·(inclusive). |
3 | ····function·random(min,·max)·{ | ||
4 | ········if·(max·==·null)·{ | ||
5 | ············max·=·min; | ||
6 | ············min·=·0; | ||
7 | ········} | ||
8 | ········return·min·+·Math.floor(Math.random()·*·(max·-·min·+·1)); | ||
9 | ····} | ||
4 | ····return·r | 10 | ····return·random; |
5 | })); | 11 | })); |
Offset 1, 14 lines modified | Offset 1, 27 lines modified | ||
1 | define((function()·{ | 1 | define((function()·{ |
2 | ····//·Return·a·random·integer·between·`min`·and·`max`·(inclusive). | ||
3 | ···· | 2 | ····//·Generate·an·integer·Array·containing·an·arithmetic·progression.·A·port·of |
3 | ····//·the·native·Python·`range()`·function.·See | ||
4 | ····//·[the·Python·documentation](https://docs.python.org/library/functions.html#range). | ||
5 | ····function·range(start,·stop,·step)·{ | ||
4 | ········if·( | 6 | ········if·(stop·==·null)·{ |
5 | ············ | 7 | ············stop·=·start·||·0; |
6 | ············ | 8 | ············start·=·0; |
7 | ········} | 9 | ········} |
8 | ········ | 10 | ········if·(!step)·{ |
11 | ············step·=·stop·<·start·?·-1·:·1; | ||
12 | ········} | ||
13 | ········var·length·=·Math.max(Math.ceil((stop·-·start)·/·step),·0); | ||
14 | ········var·range·=·Array(length); | ||
15 | ········for·(var·idx·=·0;·idx·<·length;·idx++,·start·+=·step)·{ | ||
16 | ············range[idx]·=·start; | ||
17 | ········} | ||
18 | ········return·range; | ||
9 | ····} | 19 | ····} |
10 | ····return·ran | 20 | ····return·range; |
11 | })); | 21 | })); |
Offset 1, 15 lines modified | Offset 1, 15 lines modified | ||
1 | define((function()·{ | 1 | define((function()·{ |
2 | ····//·Internal·function·to·obtain·a·nested·property·in·`obj`·along·`path`. | ||
3 | ····function·deepGet(obj,·path)·{ | ||
4 | ········var·length·=·path.length; | ||
5 | ········for·(var·i·=·0;·i·<·length;·i++)·{ | ||
6 | ············if·(obj·==·null)·return·void·0; | ||
7 | ············obj·=·obj[path[i]]; | ||
8 | ········} | ||
9 | ···· | 2 | ····//·Internal·list·of·HTML·entities·for·escaping. |
3 | ····var·escapeMap·=·{ | ||
4 | ········'&':·'&', | ||
5 | ········'<':·'<', | ||
6 | ········'>':·'>', | ||
7 | ········'"':·'"', | ||
8 | ········"'":·''', | ||
9 | ········'`':·'`' | ||
10 | ····} | 10 | ····}; |
11 | ····return· | 11 | ····return·escapeMap; |
12 | })); | 12 | })); |
Offset 1, 10 lines modified | Offset 1, 9 lines modified | ||
1 | define(['./index | 1 | define(['./index10'],·(function(_createReduce)·{ |
2 | ····//·**Reduce**·builds·up·a·single·result·from·a·list·of·values,·aka·`inject`, | ||
3 | ····//·or·`foldl`. | ||
4 | ····var·reduce·=·_createReduce(1); | ||
2 | ····//·Return·all·the·elements·for·which·a·truth·test·fails. | ||
3 | ····function·reject(obj,·predicate,·context)·{ | ||
4 | ········return·filter(obj,·negate(_cb(predicate)),·context); | ||
5 | ····} | ||
6 | ····return·re | 5 | ····return·reduce; |
7 | })); | 6 | })); |
Offset 1, 9 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index10'],·(function(_createReduce)·{ |
2 | ····//·The·right-associative·version·of·reduce,·also·known·as·`foldr`. | ||
2 | ····//·**Reduce**·builds·up·a·single·result·from·a·list·of·values,·aka·`inject`, | ||
3 | ····//·or·`foldl`. | ||
4 | ····var·reduce·=·_createReduce(1); | 3 | ····var·reduceRight·=·_createReduce(-1); |
5 | ····return·reduce; | 4 | ····return·reduceRight; |
6 | })); | 5 | })); |
Offset 1, 12 lines modified | Offset 1, 10 lines modified | ||
1 | define(['./index | 1 | define(['./index57',·'./index115',·'./index3'],·(function(filter,·negate,·_cb)·{ |
2 | ····//·Return·all·the·elements·for·which·a·truth·test·fails. | ||
3 | ····function·reject(obj,·predicate,·context)·{ | ||
4 | ········return·filter(obj,·negate(_cb(predicate)),·context); | ||
2 | ····//·Returns·everything·but·the·first·entry·of·the·`array`.·Especially·useful·on | ||
3 | ····//·the·`arguments`·object.·Passing·an·**n**·will·return·the·rest·N·values·in·the | ||
4 | ····//·`array`. | ||
5 | ····function·rest(array,·n,·guard)·{ | ||
6 | ········return·_setup.slice.call(array,·n·==·null·||·guard·?·1·:·n); | ||
7 | ····} | 5 | ····} |
8 | ····return·re | 6 | ····return·reject; |
9 | })); | 7 | })); |
Offset 1, 27 lines modified | Offset 1, 12 lines modified | ||
1 | define((function()·{ | 1 | define(['./index26'],·(function(_setup)·{ |
2 | ····//·Returns·everything·but·the·first·entry·of·the·`array`.·Especially·useful·on | ||
3 | ····//·the·`arguments`·object.·Passing·an·**n**·will·return·the·rest·N·values·in·the | ||
4 | ····//·`array`. | ||
5 | ····function·rest(array,·n,·guard)·{ | ||
6 | ········return·_setup.slice.call(array,·n·==·null·||·guard·?·1·:·n); | ||
2 | ····//·Generate·an·integer·Array·containing·an·arithmetic·progression.·A·port·of | ||
3 | ····//·the·native·Python·`range()`·function.·See | ||
4 | ····//·[the·Python·documentation](https://docs.python.org/library/functions.html#range). | ||
5 | ····function·range(start,·stop,·step)·{ | ||
6 | ········if·(stop·==·null)·{ | ||
7 | ············stop·=·start·||·0; | ||
8 | ············start·=·0; | ||
9 | ········} | ||
10 | ········if·(!step)·{ | ||
11 | ············step·=·stop·<·start·?·-1·:·1; | ||
12 | ········} | ||
13 | ········var·length·=·Math.max(Math.ceil((stop·-·start)·/·step),·0); | ||
14 | ········var·range·=·Array(length); | ||
15 | ········for·(var·idx·=·0;·idx·<·length;·idx++,·start·+=·step)·{ | ||
16 | ············range[idx]·=·start; | ||
17 | ········} | ||
18 | ········return·range; | ||
19 | ····} | 7 | ····} |
20 | ····return·r | 8 | ····return·rest; |
21 | })); | 9 | })); |
Offset 1, 25 lines modified | Offset 1, 27 lines modified | ||
1 | define(['./index | 1 | define(['./index21',·'./index154',·'./index17',·'./index128',·'./index145'],·(function(_isArrayLike,·values,·_getLength,·random,·toArray)·{ |
2 | ····//·Traverses·the·children·of·`obj`·along·`path`.·If·a·child·is·a·function,·it | ||
3 | ····//·is·invoked·with·its·parent·as·context.·Returns·the·value·of·the·final | ||
4 | ····//·child,·or·`fallback`·if·any·child·is·undefined. | ||
5 | ····function·result(obj,·path,·fallback)·{ | ||
6 | ········path·=·_toPath(path); | ||
7 | ········var·length·=·path.length; | ||
8 | ········if·(!length)·{ | ||
9 | ······ | 2 | ····//·Sample·**n**·random·values·from·a·collection·using·the·modern·version·of·the |
3 | ····//·[Fisher-Yates·shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). | ||
4 | ····//·If·**n**·is·not·specified,·returns·a·single·random·element. | ||
5 | ····//·The·internal·`guard`·argument·allows·it·to·work·with·`_.map`. | ||
6 | ····function·sample(obj,·n,·guard)·{ | ||
7 | ········if·(n·==·null·||·guard)·{ | ||
8 | ············if·(!_isArrayLike(obj))·obj·=·values(obj); | ||
9 | ············return·obj[random(obj.length·-·1)]; | ||
10 | ········} | 10 | ········} |
11 | ········var·sample·=·toArray(obj); | ||
12 | ········var·length·=·_getLength(sample); | ||
13 | ········n·=·Math.max(Math.min(n,·length),·0); | ||
14 | ········var·last·=·length·-·1; | ||
11 | ········for·(var·i·=·0;·i·<· | 15 | ········for·(var·index·=·0;·index·<·n;·index++)·{ |
16 | ············var·rand·=·random(index,·last); | ||
17 | ············var·temp·=·sample[index]; | ||
18 | ············sample[index]·=·sample[rand]; | ||
19 | ············sample[rand]·=·temp; | ||
12 | ············var·prop·=·obj·==·null·?·void·0·:·obj[path[i]]; | ||
13 | ············if·(prop·===·void·0)·{ | ||
14 | ················prop·=·fallback; | ||
15 | ················i·=·length;·//·Ensure·we·don't·continue·iterating. | ||
16 | ············} | ||
17 | ············obj·=·isFunction(prop)·?·prop.call(obj)·:·prop; | ||
18 | ········} | 20 | ········} |
19 | ········return· | 21 | ········return·sample.slice(0,·n); |
20 | ····} | 22 | ····} |
21 | ····return· | 23 | ····return·sample; |
22 | })); | 24 | })); |
Offset 1, 27 lines modified | Offset 1, 25 lines modified | ||
1 | define(['./index | 1 | define(['./index89',·'./index31'],·(function(isFunction,·_toPath)·{ |
2 | ····//·Sample·**n**·random·values·from·a·collection·using·the·modern·version·of·the | ||
3 | ····//·[Fisher-Yates·shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). | ||
4 | ····//·If·**n**·is·not·specified,·returns·a·single·random·element. | ||
5 | ····//·The·internal·`guard`·argument·allows·it·to·work·with·`_.map`. | ||
6 | ····function·sample(obj,·n,·guard)·{ | ||
7 | ········if·(n·==·null·||·guard)·{ | ||
8 | ············if·(!_isArrayLike(obj))·obj·=·values(obj); | ||
9 | ···· | 2 | ····//·Traverses·the·children·of·`obj`·along·`path`.·If·a·child·is·a·function,·it |
3 | ····//·is·invoked·with·its·parent·as·context.·Returns·the·value·of·the·final | ||
4 | ····//·child,·or·`fallback`·if·any·child·is·undefined. | ||
5 | ····function·result(obj,·path,·fallback)·{ | ||
6 | ········path·=·_toPath(path); | ||
7 | ········var·length·=·path.length; | ||
8 | ········if·(!length)·{ | ||
9 | ············return·isFunction(fallback)·?·fallback.call(obj)·:·fallback; | ||
10 | ········} | 10 | ········} |
11 | ········var·sample·=·toArray(obj); | ||
12 | ········var·length·=·_getLength(sample); | ||
13 | ········n·=·Math.max(Math.min(n,·length),·0); | ||
14 | ········var·last·=·length·-·1; | ||
15 | ········for·(var·i | 11 | ········for·(var·i·=·0;·i·<·length;·i++)·{ |
16 | ············var·rand·=·random(index,·last); | ||
17 | ············var·temp·=·sample[index]; | ||
18 | ············sample[index]·=·sample[rand]; | ||
19 | ············ | 12 | ············var·prop·=·obj·==·null·?·void·0·:·obj[path[i]]; |
13 | ············if·(prop·===·void·0)·{ | ||
14 | ················prop·=·fallback; | ||
15 | ················i·=·length;·//·Ensure·we·don't·continue·iterating. | ||
16 | ············} | ||
17 | ············obj·=·isFunction(prop)·?·prop.call(obj)·:·prop; | ||
20 | ········} | 18 | ········} |
21 | ········return· | 19 | ········return·obj; |
22 | ····} | 20 | ····} |
23 | ····return· | 21 | ····return·result; |
24 | })); | 22 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index13 | 1 | define(['./index135'],·(function(sample)·{ |
2 | ····//·Shuffle·a·collection. | 2 | ····//·Shuffle·a·collection. |
3 | ····function·shuffle(obj)·{ | 3 | ····function·shuffle(obj)·{ |
4 | ········return·sample(obj,·Infinity); | 4 | ········return·sample(obj,·Infinity); |
5 | ····} | 5 | ····} |
6 | ····return·shuffle; | 6 | ····return·shuffle; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index21',·'./index105'],·(function(_cb,·_isArrayLike,·keys)·{ |
2 | ····//·Determine·if·at·least·one·element·in·the·object·passes·a·truth·test. | 2 | ····//·Determine·if·at·least·one·element·in·the·object·passes·a·truth·test. |
3 | ····function·some(obj,·predicate,·context)·{ | 3 | ····function·some(obj,·predicate,·context)·{ |
4 | ········predicate·=·_cb(predicate,·context); | 4 | ········predicate·=·_cb(predicate,·context); |
5 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | 5 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), |
6 | ············length·=·(_keys·||·obj).length; | 6 | ············length·=·(_keys·||·obj).length; |
7 | ········for·(var·index·=·0;·index·<·length;·index++)·{ | 7 | ········for·(var·index·=·0;·index·<·length;·index++)·{ |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index',·'./index9 | 1 | define(['./index',·'./index94'],·(function(_baseCreate,·isObject)·{ |
2 | ····//·Internal·function·to·execute·`sourceFunc`·bound·to·`context`·with·optional | 2 | ····//·Internal·function·to·execute·`sourceFunc`·bound·to·`context`·with·optional |
3 | ····//·`args`.·Determines·whether·to·execute·a·function·as·a·constructor·or·as·a | 3 | ····//·`args`.·Determines·whether·to·execute·a·function·as·a·constructor·or·as·a |
4 | ····//·normal·function. | 4 | ····//·normal·function. |
5 | ····function·executeBound(sourceFunc,·boundFunc,·context,·callingContext,·args)·{ | 5 | ····function·executeBound(sourceFunc,·boundFunc,·context,·callingContext,·args)·{ |
6 | ········if·(!(callingContext·instanceof·boundFunc))·return·sourceFunc.apply(context,·args); | 6 | ········if·(!(callingContext·instanceof·boundFunc))·return·sourceFunc.apply(context,·args); |
7 | ········var·self·=·_baseCreate(sourceFunc.prototype); | 7 | ········var·self·=·_baseCreate(sourceFunc.prototype); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index125',·'./index108'],·(function(_cb,·pluck,·map)·{ |
2 | ····//·Sort·the·object's·values·by·a·criterion·produced·by·an·iteratee. | 2 | ····//·Sort·the·object's·values·by·a·criterion·produced·by·an·iteratee. |
3 | ····function·sortBy(obj,·iteratee,·context)·{ | 3 | ····function·sortBy(obj,·iteratee,·context)·{ |
4 | ········var·index·=·0; | 4 | ········var·index·=·0; |
5 | ········iteratee·=·_cb(iteratee,·context); | 5 | ········iteratee·=·_cb(iteratee,·context); |
6 | ········return·pluck(map(obj,·function(value,·key,·list)·{ | 6 | ········return·pluck(map(obj,·function(value,·key,·list)·{ |
7 | ············return·{ | 7 | ············return·{ |
Offset 1, 13 lines modified | Offset 1, 20 lines modified | ||
1 | define((function()·{ | 1 | define(['./index3',·'./index17'],·(function(_cb,·_getLength)·{ |
2 | ····//·Invokes·`interceptor`·with·the·`obj`·and·then·returns·`obj`. | ||
3 | ····//·The·primary·purpose·of·this·method·is·to·"tap·into"·a·method·chain,·in | ||
4 | ····//·order·to·perform·operations·on·intermediate·results·within·the·chain. | ||
5 | ····function·tap(obj,·interceptor)·{ | ||
6 | ········inte | 2 | ····//·Use·a·comparator·function·to·figure·out·the·smallest·index·at·which |
3 | ····//·an·object·should·be·inserted·so·as·to·maintain·order.·Uses·binary·search. | ||
4 | ····function·sortedIndex(array,·obj,·iteratee,·context)·{ | ||
5 | ········iteratee·=·_cb(iteratee,·context,·1); | ||
6 | ········var·value·=·iteratee(obj); | ||
7 | ········var·low·=·0, | ||
8 | ············high·=·_getLength(array); | ||
9 | ········while·(low·<·high)·{ | ||
10 | ············var·mid·=·Math.floor((low·+·high)·/·2); | ||
11 | ············if·(iteratee(array[mid])·<·value)·low·=·mid·+·1; | ||
12 | ············else·high·=·mid; | ||
13 | ········} | ||
7 | ········return· | 14 | ········return·low; |
8 | ····} | 15 | ····} |
9 | ····return·t | 16 | ····return·sortedIndex; |
10 | })); | 17 | })); |
Offset 1, 20 lines modified | Offset 1, 13 lines modified | ||
1 | define( | 1 | define((function()·{ |
2 | ····//·Invokes·`interceptor`·with·the·`obj`·and·then·returns·`obj`. | ||
3 | ····//·The·primary·purpose·of·this·method·is·to·"tap·into"·a·method·chain,·in | ||
4 | ····//·order·to·perform·operations·on·intermediate·results·within·the·chain. | ||
5 | ····function·tap(obj,·interceptor)·{ | ||
6 | ········interceptor(obj); | ||
2 | ····//·Use·a·comparator·function·to·figure·out·the·smallest·index·at·which | ||
3 | ····//·an·object·should·be·inserted·so·as·to·maintain·order.·Uses·binary·search. | ||
4 | ····function·sortedIndex(array,·obj,·iteratee,·context)·{ | ||
5 | ········iteratee·=·_cb(iteratee,·context,·1); | ||
6 | ········var·value·=·iteratee(obj); | ||
7 | ········var·low·=·0, | ||
8 | ············high·=·_getLength(array); | ||
9 | ········while·(low·<·high)·{ | ||
10 | ············var·mid·=·Math.floor((low·+·high)·/·2); | ||
11 | ············if·(iteratee(array[mid])·<·value)·low·=·mid·+·1; | ||
12 | ············else·high·=·mid; | ||
13 | ········} | ||
14 | ········return· | 7 | ········return·obj; |
15 | ····} | 8 | ····} |
16 | ····return· | 9 | ····return·tap; |
17 | })); | 10 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index48',·'./index1 | 1 | define(['./index48',·'./index148',·'./index144'],·(function(defaults,·underscore,·templateSettings)·{ |
2 | ····//·When·customizing·`_.templateSettings`,·if·you·don't·want·to·define·an | 2 | ····//·When·customizing·`_.templateSettings`,·if·you·don't·want·to·define·an |
3 | ····//·interpolation,·evaluation·or·escaping·regex,·we·need·one·that·is | 3 | ····//·interpolation,·evaluation·or·escaping·regex,·we·need·one·that·is |
4 | ····//·guaranteed·not·to·match. | 4 | ····//·guaranteed·not·to·match. |
5 | ····var·noMatch·=·/(.)^/; | 5 | ····var·noMatch·=·/(.)^/; |
6 | ····//·Certain·characters·need·to·be·escaped·so·that·they·can·be·put·into·a | 6 | ····//·Certain·characters·need·to·be·escaped·so·that·they·can·be·put·into·a |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index148'],·(function(underscore)·{ |
2 | ····//·By·default,·Underscore·uses·ERB-style·template·delimiters.·Change·the | 2 | ····//·By·default,·Underscore·uses·ERB-style·template·delimiters.·Change·the |
3 | ····//·following·template·settings·to·use·alternative·delimiters. | 3 | ····//·following·template·settings·to·use·alternative·delimiters. |
4 | ····var·templateSettings·=·underscore.templateSettings·=·{ | 4 | ····var·templateSettings·=·underscore.templateSettings·=·{ |
5 | ········evaluate:·/<%([\s\S]+?)%>/g, | 5 | ········evaluate:·/<%([\s\S]+?)%>/g, |
6 | ········interpolate:·/<%=([\s\S]+?)%>/g, | 6 | ········interpolate:·/<%=([\s\S]+?)%>/g, |
7 | ········escape:·/<%-([\s\S]+?)%>/g | 7 | ········escape:·/<%-([\s\S]+?)%>/g |
Offset 1, 51 lines modified | Offset 1, 19 lines modified | ||
1 | define(['./index11 | 1 | define(['./index80',·'./index26',·'./index98',·'./index21',·'./index108',·'./index69',·'./index154'],·(function(isArray,·_setup,·isString,·_isArrayLike,·map,·identity,·values)·{ |
2 | ····//·Safely·create·a·real,·live·array·from·anything·iterable. | ||
3 | ····var·reStrSymbol·=·/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; | ||
2 | ····//·Returns·a·function,·that,·when·invoked,·will·only·be·triggered·at·most·once | ||
3 | ····//·during·a·given·window·of·time.·Normally,·the·throttled·function·will·run | ||
4 | ····//·as·much·as·it·can,·without·ever·going·more·than·once·per·`wait`·duration; | ||
5 | ····//·but·if·you'd·like·to·disable·the·execution·on·the·leading·edge,·pass | ||
6 | ····//·`{leading:·false}`.·To·disable·execution·on·the·trailing·edge,·ditto. | ||
7 | ····function·throttle(func,·wait,·options)·{ | ||
8 | ········var·timeout,·context,·args,·result; | ||
9 | ········var·previous·=·0; | ||
10 | ········if·(!options)·options·=·{}; | ||
11 | ········var·later·=·function()·{ | ||
12 | ············previous·=·options.leading·===·false·?·0·:·now(); | ||
13 | ············timeout·=·null; | ||
14 | ············result·=·func.apply(context,·args); | ||
15 | ···· | 4 | ····function·toArray(obj)·{ |
5 | ········if·(!obj)·return·[]; | ||
6 | ········if·(isArray(obj))·return·_setup.slice.call(obj); | ||
7 | ········if·(isString(obj))·{ | ||
8 | ············//·Keep·surrogate·pair·characters·together. | ||
9 | ············return·obj.match(reStrSymbol); | ||
16 | ········} | 10 | ········} |
11 | ········if·(_isArrayLike(obj))·return·map(obj,·identity); | ||
12 | ········return·values(obj); | ||
17 | ········var·throttled·=·function()·{ | ||
18 | ············var·_now·=·now(); | ||
19 | ············if·(!previous·&&·options.leading·===·false)·previous·=·_now; | ||
20 | ············var·remaining·=·wait·-·(_now·-·previous); | ||
21 | ············context·=·this; | ||
22 | ············args·=·arguments; | ||
23 | ············if·(remaining·<=·0·||·remaining·>·wait)·{ | ||
24 | ················if·(timeout)·{ | ||
25 | ····················clearTimeout(timeout); | ||
26 | ····················timeout·=·null; | ||
27 | ················} | ||
28 | ················previous·=·_now; | ||
29 | ················result·=·func.apply(context,·args); | ||
30 | ················if·(!timeout)·context·=·args·=·null; | ||
31 | ············}·else·if·(!timeout·&&·options.trailing·!==·false)·{ | ||
32 | ················timeout·=·setTimeout(later,·remaining); | ||
33 | ············} | ||
34 | ············return·result; | ||
35 | ········}; | ||
36 | ········throttled.cancel·=·function()·{ | ||
37 | ············clearTimeout(timeout); | ||
38 | ············previous·=·0; | ||
39 | ············timeout·=·context·=·args·=·null; | ||
40 | ········}; | ||
41 | ········return·throttled; | ||
42 | ····} | 13 | ····} |
43 | ····return·t | 14 | ····return·toArray; |
44 | })); | 15 | })); |
Offset 1, 13 lines modified | Offset 1, 12 lines modified | ||
1 | define(['./index | 1 | define(['./index148',·'./index80'],·(function(underscore,·isArray)·{ |
2 | ····//·Normalize·a·(deep)·property·`path`·to·array. | ||
3 | ····//·Like·`_.iteratee`,·this·function·can·be·customized. | ||
4 | ····function·toPath(path)·{ | ||
5 | ········return·isArray(path)·?·path·:·[path]; | ||
2 | ····//·Run·a·function·**n**·times. | ||
3 | ····function·times(n,·iteratee,·context)·{ | ||
4 | ········var·accum·=·Array(Math.max(0,·n)); | ||
5 | ········iteratee·=·_optimizeCb(iteratee,·context,·1); | ||
6 | ········for·(var·i·=·0;·i·<·n;·i++)·accum[i]·=·iteratee(i); | ||
7 | ········return·accum; | ||
8 | ····} | 6 | ····} |
7 | ····underscore.toPath·=·toPath; | ||
9 | ····return·t | 8 | ····return·toPath; |
10 | })); | 9 | })); |
Offset 1, 19 lines modified | Offset 1, 30 lines modified | ||
1 | define(['./index | 1 | define(['./index148',·'./index52',·'./index26',·'./index4'],·(function(underscore,·each,·_setup,·_chainResult)·{ |
2 | ····//·Safely·create·a·real,·live·array·from·anything·iterable. | ||
3 | ···· | 2 | ····//·Add·all·mutator·`Array`·functions·to·the·wrapper. |
3 | ····each(['pop',·'push',·'reverse',·'shift',·'sort',·'splice',·'unshift'],·function(name)·{ | ||
4 | ········var·method·=·_setup.ArrayProto[name]; | ||
5 | ········underscore.prototype[name]·=·function()·{ | ||
6 | ············var·obj·=·this._wrapped; | ||
7 | ············if·(obj·!=·null)·{ | ||
8 | ················method.apply(obj,·arguments); | ||
9 | ················if·((name·===·'shift'·||·name·===·'splice')·&&·obj.length·===·0)·{ | ||
10 | ····················delete·obj[0]; | ||
11 | ················} | ||
12 | ············} | ||
13 | ············return·_chainResult(this,·obj); | ||
14 | ········}; | ||
15 | ····}); | ||
4 | ····function·toArray(obj)·{ | ||
5 | ········if·(!obj)·return·[]; | ||
6 | ········if·(isArray(obj))·return·_setup.slice.call(obj); | ||
7 | ········if·(isString(obj))·{ | ||
8 | ············//·Keep·surrogate·pair·characters·together. | ||
9 | ······· | 16 | ····//·Add·all·accessor·`Array`·functions·to·the·wrapper. |
17 | ····each(['concat',·'join',·'slice'],·function(name)·{ | ||
18 | ········var·method·=·_setup.ArrayProto[name]; | ||
19 | ········underscore.prototype[name]·=·function()·{ | ||
20 | ············var·obj·=·this._wrapped; | ||
21 | ············if·(obj·!=·null)·obj·=·method.apply(obj,·arguments); | ||
22 | ············return·_chainResult(this,·obj); | ||
10 | ········} | 23 | ········}; |
11 | ········if·(_isArrayLike(obj))·return·map(obj,·identity); | ||
12 | ········return·values(obj); | ||
13 | ····} | 24 | ····}); |
14 | ····return· | 25 | ····return·underscore; |
15 | })); | 26 | })); |
Offset 1, 12 lines modified | Offset 1, 29 lines modified | ||
1 | define(['./index | 1 | define(['./index26'],·(function(_setup)·{ |
2 | ····//·Normalize·a·(deep)·property·`path`·to·array. | ||
3 | ····//·Like·`_.iteratee`,·this·function·can·be·customized. | ||
4 | ····function·toPath(path)·{ | ||
5 | ······ | 2 | ····//·If·Underscore·is·called·as·a·function,·it·returns·a·wrapped·object·that·can |
3 | ····//·be·used·OO-style.·This·wrapper·holds·altered·versions·of·all·functions·added | ||
4 | ····//·through·`_.mixin`.·Wrapped·objects·may·be·chained. | ||
5 | ····function·_(obj)·{ | ||
6 | ········if·(obj·instanceof·_)·return·obj; | ||
7 | ········if·(!(this·instanceof·_))·return·new·_(obj); | ||
8 | ········this._wrapped·=·obj; | ||
6 | ····} | 9 | ····} |
7 | ····underscore.toPath·=·toPath; | ||
10 | ····_.VERSION·=·_setup.VERSION; | ||
11 | ····//·Extracts·the·result·from·a·wrapped·and·chained·object. | ||
12 | ····_.prototype.value·=·function()·{ | ||
13 | ········return·this._wrapped; | ||
14 | ····}; | ||
15 | ····//·Provide·unwrapping·proxies·for·some·methods·used·in·engine·operations | ||
16 | ····//·such·as·arithmetic·and·JSON·stringification. | ||
17 | ····_.prototype.valueOf·=·_.prototype.toJSON·=·_.prototype.value; | ||
18 | ····_.prototype.toString·=·function()·{ | ||
19 | ········return·String(this._wrapped); | ||
20 | ····}; | ||
8 | ····return· | 21 | ····return·_; |
9 | })); | 22 | })); |
Offset 1, 30 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index7',·'./index32'],·(function(_createEscaper,·_unescapeMap)·{ |
2 | ····//·Function·for·unescaping·strings·from·HTML·interpolation. | ||
3 | ····var·unescape·=·_createEscaper(_unescapeMap); | ||
2 | ····//·Add·all·mutator·`Array`·functions·to·the·wrapper. | ||
3 | ····each(['pop',·'push',·'reverse',·'shift',·'sort',·'splice',·'unshift'],·function(name)·{ | ||
4 | ········var·method·=·_setup.ArrayProto[name]; | ||
5 | ········underscore.prototype[name]·=·function()·{ | ||
6 | ············var·obj·=·this._wrapped; | ||
7 | ············if·(obj·!=·null)·{ | ||
8 | ················method.apply(obj,·arguments); | ||
9 | ················if·((name·===·'shift'·||·name·===·'splice')·&&·obj.length·===·0)·{ | ||
10 | ····················delete·obj[0]; | ||
11 | ················} | ||
12 | ············} | ||
13 | ············return·_chainResult(this,·obj); | ||
14 | ········}; | ||
15 | ····}); | ||
16 | ····//·Add·all·accessor·`Array`·functions·to·the·wrapper. | ||
17 | ····each(['concat',·'join',·'slice'],·function(name)·{ | ||
18 | ········var·method·=·_setup.ArrayProto[name]; | ||
19 | ········underscore.prototype[name]·=·function()·{ | ||
20 | ············var·obj·=·this._wrapped; | ||
21 | ············if·(obj·!=·null)·obj·=·method.apply(obj,·arguments); | ||
22 | ············return·_chainResult(this,·obj); | ||
23 | ········}; | ||
24 | ····}); | ||
25 | ····return·un | 4 | ····return·unescape; |
26 | })); | 5 | })); |
Offset 1, 29 lines modified | Offset 1, 11 lines modified | ||
1 | define(['./index | 1 | define(['./index134',·'./index151',·'./index15'],·(function(restArguments,·uniq,·_flatten)·{ |
2 | ····//·Produce·an·array·that·contains·the·union:·each·distinct·element·from·all·of | ||
3 | ····//·the·passed-in·arrays. | ||
4 | ····var·union·=·restArguments(function(arrays)·{ | ||
5 | ········return·uniq(_flatten(arrays,·true,·true)); | ||
2 | ····//·If·Underscore·is·called·as·a·function,·it·returns·a·wrapped·object·that·can | ||
3 | ····//·be·used·OO-style.·This·wrapper·holds·altered·versions·of·all·functions·added | ||
4 | ····//·through·`_.mixin`.·Wrapped·objects·may·be·chained. | ||
5 | ····function·_(obj)·{ | ||
6 | ········if·(obj·instanceof·_)·return·obj; | ||
7 | ········if·(!(this·instanceof·_))·return·new·_(obj); | ||
8 | ········this._wrapped·=·obj; | ||
9 | ····} | 6 | ····}); |
10 | ····_.VERSION·=·_setup.VERSION; | ||
11 | ····//·Extracts·the·result·from·a·wrapped·and·chained·object. | ||
12 | ····_.prototype.value·=·function()·{ | ||
13 | ········return·this._wrapped; | ||
14 | ····}; | ||
15 | ····//·Provide·unwrapping·proxies·for·some·methods·used·in·engine·operations | ||
16 | ····//·such·as·arithmetic·and·JSON·stringification. | ||
17 | ····_.prototype.valueOf·=·_.prototype.toJSON·=·_.prototype.value; | ||
18 | ····_.prototype.toString·=·function()·{ | ||
19 | ········return·String(this._wrapped); | ||
20 | ····}; | ||
21 | ····return· | 7 | ····return·union; |
22 | })); | 8 | })); |
Offset 1, 8 lines modified | Offset 1, 37 lines modified | ||
1 | define(['./index7',·'./index | 1 | define(['./index81',·'./index3',·'./index17',·'./index44'],·(function(isBoolean,·_cb,·_getLength,·contains)·{ |
2 | ····//·Function·for·unescaping·strings·from·HTML·interpolation. | ||
3 | ···· | 2 | ····//·Produce·a·duplicate-free·version·of·the·array.·If·the·array·has·already |
3 | ····//·been·sorted,·you·have·the·option·of·using·a·faster·algorithm. | ||
4 | ····//·The·faster·algorithm·will·not·work·with·an·iteratee·if·the·iteratee | ||
5 | ····//·is·not·a·one-to-one·function,·so·providing·an·iteratee·will·disable | ||
6 | ····//·the·faster·algorithm. | ||
7 | ····function·uniq(array,·isSorted,·iteratee,·context)·{ | ||
8 | ········if·(!isBoolean(isSorted))·{ | ||
9 | ············context·=·iteratee; | ||
10 | ············iteratee·=·isSorted; | ||
11 | ············isSorted·=·false; | ||
12 | ········} | ||
13 | ········if·(iteratee·!=·null)·iteratee·=·_cb(iteratee,·context); | ||
14 | ········var·result·=·[]; | ||
15 | ········var·seen·=·[]; | ||
16 | ········for·(var·i·=·0,·length·=·_getLength(array);·i·<·length;·i++)·{ | ||
17 | ············var·value·=·array[i], | ||
18 | ················computed·=·iteratee·?·iteratee(value,·i,·array)·:·value; | ||
19 | ············if·(isSorted·&&·!iteratee)·{ | ||
20 | ················if·(!i·||·seen·!==·computed)·result.push(value); | ||
21 | ················seen·=·computed; | ||
22 | ············}·else·if·(iteratee)·{ | ||
23 | ················if·(!contains(seen,·computed))·{ | ||
24 | ····················seen.push(computed); | ||
25 | ····················result.push(value); | ||
26 | ················} | ||
27 | ············}·else·if·(!contains(result,·value))·{ | ||
28 | ················result.push(value); | ||
29 | ············} | ||
30 | ········} | ||
31 | ········return·result; | ||
32 | ····} | ||
4 | ····return·un | 33 | ····return·uniq; |
5 | })); | 34 | })); |
Offset 1, 11 lines modified | Offset 1, 14 lines modified | ||
1 | define( | 1 | define((function()·{ |
2 | ····//·Generate·a·unique·integer·id·(unique·within·the·entire·client·session). | ||
3 | ····//·Useful·for·temporary·DOM·ids. | ||
4 | ····var·idCounter·=·0; | ||
2 | ····//·Produce·an·array·that·contains·the·union:·each·distinct·element·from·all·of | ||
3 | ····//·the·passed-in·arrays. | ||
4 | ····var·union·=·restArguments(function(arrays)·{ | ||
5 | ········return·uniq(_flatten(arrays,·true,·true)); | ||
6 | ····}); | ||
5 | ····function·uniqueId(prefix)·{ | ||
6 | ········var·id·=·++idCounter·+·''; | ||
7 | ········return·prefix·?·prefix·+·id·:·id; | ||
8 | ····} | ||
7 | ····return·uni | 9 | ····return·uniqueId; |
8 | })); | 10 | })); |
Offset 1, 37 lines modified | Offset 1, 17 lines modified | ||
1 | define(['./index | 1 | define(['./index111',·'./index17',·'./index125'],·(function(max,·_getLength,·pluck)·{ |
2 | ····//·Complement·of·zip.·Unzip·accepts·an·array·of·arrays·and·groups | ||
3 | ····//·each·array's·elements·on·shared·indices. | ||
4 | ····function·unzip(array)·{ | ||
5 | ········var·length·=·(array·&&·max(array,·_getLength).length)·||·0; | ||
6 | ········var·result·=·Array(length); | ||
7 | ········for·(var·index·=·0;·index·<·length;·index++)·{ | ||
8 | ············result[index]·=·pluck(array,·index); | ||
2 | ····//·Produce·a·duplicate-free·version·of·the·array.·If·the·array·has·already | ||
3 | ····//·been·sorted,·you·have·the·option·of·using·a·faster·algorithm. | ||
4 | ····//·The·faster·algorithm·will·not·work·with·an·iteratee·if·the·iteratee | ||
5 | ····//·is·not·a·one-to-one·function,·so·providing·an·iteratee·will·disable | ||
6 | ····//·the·faster·algorithm. | ||
7 | ····function·uniq(array,·isSorted,·iteratee,·context)·{ | ||
8 | ········if·(!isBoolean(isSorted))·{ | ||
9 | ············context·=·iteratee; | ||
10 | ············iteratee·=·isSorted; | ||
11 | ············isSorted·=·false; | ||
12 | ········} | ||
13 | ········if·(iteratee·!=·null)·iteratee·=·_cb(iteratee,·context); | ||
14 | ········var·result·=·[]; | ||
15 | ········var·seen·=·[]; | ||
16 | ········for·(var·i·=·0,·length·=·_getLength(array);·i·<·length;·i++)·{ | ||
17 | ············var·value·=·array[i], | ||
18 | ················computed·=·iteratee·?·iteratee(value,·i,·array)·:·value; | ||
19 | ············if·(isSorted·&&·!iteratee)·{ | ||
20 | ················if·(!i·||·seen·!==·computed)·result.push(value); | ||
21 | ················seen·=·computed; | ||
22 | ············}·else·if·(iteratee)·{ | ||
23 | ················if·(!contains(seen,·computed))·{ | ||
24 | ····················seen.push(computed); | ||
25 | ····················result.push(value); | ||
26 | ················} | ||
27 | ············}·else·if·(!contains(result,·value))·{ | ||
28 | ················result.push(value); | ||
29 | ············} | ||
30 | ········} | 9 | ········} |
31 | ········return·result; | 10 | ········return·result; |
32 | ····} | 11 | ····} |
33 | ····return·uni | 12 | ····return·unzip; |
34 | })); | 13 | })); |
Offset 1, 14 lines modified | Offset 1, 16 lines modified | ||
1 | define((function()·{ | 1 | define(['./index105'],·(function(keys)·{ |
2 | ····//·Generate·a·unique·integer·id·(unique·within·the·entire·client·session). | ||
3 | ····//·Useful·for·temporary·DOM·ids. | ||
4 | ····var·idCounter·=·0; | ||
5 | ····function·uniqueId(prefix)·{ | ||
6 | ········var·id·=·++idCounter·+·''; | ||
7 | ····· | 2 | ····//·Retrieve·the·values·of·an·object's·properties. |
3 | ····function·values(obj)·{ | ||
4 | ········var·_keys·=·keys(obj); | ||
5 | ········var·length·=·_keys.length; | ||
6 | ········var·values·=·Array(length); | ||
7 | ········for·(var·i·=·0;·i·<·length;·i++)·{ | ||
8 | ············values[i]·=·obj[_keys[i]]; | ||
9 | ········} | ||
10 | ········return·values; | ||
8 | ····} | 11 | ····} |
9 | ····return· | 12 | ····return·values; |
10 | })); | 13 | })); |
Offset 1, 17 lines modified | Offset 1, 11 lines modified | ||
1 | define(['./index | 1 | define(['./index57',·'./index109'],·(function(filter,·matcher)·{ |
2 | ····//·Convenience·version·of·a·common·use·case·of·`_.filter`:·selecting·only | ||
3 | ····//·objects·containing·specific·`key:value`·pairs. | ||
4 | ····function·where(obj,·attrs)·{ | ||
5 | ········return·filter(obj,·matcher(attrs)); | ||
2 | ····//·Complement·of·zip.·Unzip·accepts·an·array·of·arrays·and·groups | ||
3 | ····//·each·array's·elements·on·shared·indices. | ||
4 | ····function·unzip(array)·{ | ||
5 | ········var·length·=·(array·&&·max(array,·_getLength).length)·||·0; | ||
6 | ········var·result·=·Array(length); | ||
7 | ········for·(var·index·=·0;·index·<·length;·index++)·{ | ||
8 | ············result[index]·=·pluck(array,·index); | ||
9 | ········} | ||
10 | ········return·result; | ||
11 | ····} | 6 | ····} |
12 | ····return· | 7 | ····return·where; |
13 | })); | 8 | })); |
Offset 1, 16 lines modified | Offset 1, 10 lines modified | ||
1 | define(['./index1 | 1 | define(['./index134',·'./index51'],·(function(restArguments,·difference)·{ |
2 | ····//·Return·a·version·of·the·array·that·does·not·contain·the·specified·value(s). | ||
3 | ····var·without·=·restArguments(function(array,·otherArrays)·{ | ||
4 | ········return·difference(array,·otherArrays); | ||
2 | ····//·Retrieve·the·values·of·an·object's·properties. | ||
3 | ····function·values(obj)·{ | ||
4 | ········var·_keys·=·keys(obj); | ||
5 | ········var·length·=·_keys.length; | ||
6 | ········var·values·=·Array(length); | ||
7 | ········for·(var·i·=·0;·i·<·length;·i++)·{ | ||
8 | ············values[i]·=·obj[_keys[i]]; | ||
9 | ········} | ||
10 | ········return·values; | ||
11 | ····} | 5 | ····}); |
12 | ····return· | 6 | ····return·without; |
13 | })); | 7 | })); |
Offset 1, 11 lines modified | Offset 1, 12 lines modified | ||
1 | define(['./index | 1 | define(['./index123'],·(function(partial)·{ |
2 | ····//·Convenience·version·of·a·common·use·case·of·`_.filter`:·selecting·only | ||
3 | ····//·objects·containing·specific·`key:value`·pairs. | ||
4 | ····function·where(obj,·attrs)·{ | ||
5 | ···· | 2 | ····//·Returns·the·first·function·passed·as·an·argument·to·the·second, |
3 | ····//·allowing·you·to·adjust·arguments,·run·code·before·and·after,·and | ||
4 | ····//·conditionally·execute·the·original·function. | ||
5 | ····function·wrap(func,·wrapper)·{ | ||
6 | ········return·partial(wrapper,·func); | ||
6 | ····} | 7 | ····} |
7 | ····return·w | 8 | ····return·wrap; |
8 | })); | 9 | })); |
Offset 1, 10 lines modified | Offset 1, 9 lines modified | ||
1 | define(['./index134',·'./index5 | 1 | define(['./index134',·'./index153'],·(function(restArguments,·unzip)·{ |
2 | ····//·Zip·together·multiple·lists·into·a·single·array·--·elements·that·share | ||
3 | ····//·an·index·go·together. | ||
4 | ····var·zip·=·restArguments(unzip); | ||
2 | ····//·Return·a·version·of·the·array·that·does·not·contain·the·specified·value(s). | ||
3 | ····var·without·=·restArguments(function(array,·otherArrays)·{ | ||
4 | ········return·difference(array,·otherArrays); | ||
5 | ····}); | ||
6 | ····return· | 5 | ····return·zip; |
7 | })); | 6 | })); |
Offset 1, 9 lines modified | Offset 1, 51 lines modified | ||
1 | define(['./index1 | 1 | define(['./index117'],·(function(now)·{ |
2 | ····//·Zip·together·multiple·lists·into·a·single·array·--·elements·that·share | ||
3 | ····//·an·index·go·together. | ||
4 | ····v | 2 | ····//·Returns·a·function,·that,·when·invoked,·will·only·be·triggered·at·most·once |
3 | ····//·during·a·given·window·of·time.·Normally,·the·throttled·function·will·run | ||
4 | ····//·as·much·as·it·can,·without·ever·going·more·than·once·per·`wait`·duration; | ||
5 | ····//·but·if·you'd·like·to·disable·the·execution·on·the·leading·edge,·pass | ||
6 | ····//·`{leading:·false}`.·To·disable·execution·on·the·trailing·edge,·ditto. | ||
7 | ····function·throttle(func,·wait,·options)·{ | ||
8 | ········var·timeout,·context,·args,·result; | ||
9 | ········var·previous·=·0; | ||
10 | ········if·(!options)·options·=·{}; | ||
5 | ····r | 11 | ········var·later·=·function()·{ |
12 | ············previous·=·options.leading·===·false·?·0·:·now(); | ||
13 | ············timeout·=·null; | ||
14 | ············result·=·func.apply(context,·args); | ||
15 | ············if·(!timeout)·context·=·args·=·null; | ||
16 | ········}; | ||
17 | ········var·throttled·=·function()·{ | ||
18 | ············var·_now·=·now(); | ||
19 | ············if·(!previous·&&·options.leading·===·false)·previous·=·_now; | ||
20 | ············var·remaining·=·wait·-·(_now·-·previous); | ||
21 | ············context·=·this; | ||
22 | ············args·=·arguments; | ||
23 | ············if·(remaining·<=·0·||·remaining·>·wait)·{ | ||
24 | ················if·(timeout)·{ | ||
25 | ····················clearTimeout(timeout); | ||
26 | ····················timeout·=·null; | ||
27 | ················} | ||
28 | ················previous·=·_now; | ||
29 | ················result·=·func.apply(context,·args); | ||
30 | ················if·(!timeout)·context·=·args·=·null; | ||
31 | ············}·else·if·(!timeout·&&·options.trailing·!==·false)·{ | ||
32 | ················timeout·=·setTimeout(later,·remaining); | ||
33 | ············} | ||
34 | ············return·result; | ||
35 | ········}; | ||
36 | ········throttled.cancel·=·function()·{ | ||
37 | ············clearTimeout(timeout); | ||
38 | ············previous·=·0; | ||
39 | ············timeout·=·context·=·args·=·null; | ||
40 | ········}; | ||
41 | ········return·throttled; | ||
42 | ····} | ||
43 | ····return·throttle; | ||
6 | })); | 44 | })); |
Offset 1, 12 lines modified | Offset 1, 13 lines modified | ||
1 | define(['./index | 1 | define(['./index25'],·(function(_optimizeCb)·{ |
2 | ····//·Returns·the·first·function·passed·as·an·argument·to·the·second, | ||
3 | ····//·allowing·you·to·adjust·arguments,·run·code·before·and·after,·and | ||
4 | ····//·conditionally·execute·the·original·function. | ||
5 | ····function·wrap(func,·wrapper)·{ | ||
6 | ···· | 2 | ····//·Run·a·function·**n**·times. |
3 | ····function·times(n,·iteratee,·context)·{ | ||
4 | ········var·accum·=·Array(Math.max(0,·n)); | ||
5 | ········iteratee·=·_optimizeCb(iteratee,·context,·1); | ||
6 | ········for·(var·i·=·0;·i·<·n;·i++)·accum[i]·=·iteratee(i); | ||
7 | ········return·accum; | ||
7 | ····} | 8 | ····} |
8 | ····return· | 9 | ····return·times; |
9 | })); | 10 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index52'],·(function(_cb,·each)·{ |
2 | ····//·An·internal·function·used·for·aggregate·"group·by"·operations. | 2 | ····//·An·internal·function·used·for·aggregate·"group·by"·operations. |
3 | ····function·group(behavior,·partition)·{ | 3 | ····function·group(behavior,·partition)·{ |
4 | ········return·function(obj,·iteratee,·context)·{ | 4 | ········return·function(obj,·iteratee,·context)·{ |
5 | ············var·result·=·partition·?·[ | 5 | ············var·result·=·partition·?·[ |
6 | ················[], | 6 | ················[], |
7 | ················[] | 7 | ················[] |
Offset 1, 10 lines modified | Offset 1, 15 lines modified | ||
1 | define(['./index1 | 1 | define(['./index69',·'./index89',·'./index94',·'./index80',·'./index109',·'./index126',·'./index25'],·(function(identity,·isFunction,·isObject,·isArray,·matcher,·property,·_optimizeCb)·{ |
2 | ····//·Helper·function·to·continue·chaining·intermediate·results. | ||
3 | ····function·chainResult(instance,·obj)·{ | ||
4 | ····· | 2 | ····//·An·internal·function·to·generate·callbacks·that·can·be·applied·to·each |
3 | ····//·element·in·a·collection,·returning·the·desired·result·—·either·`_.identity`, | ||
4 | ····//·an·arbitrary·callback,·a·property·matcher,·or·a·property·accessor. | ||
5 | ····function·baseIteratee(value,·context,·argCount)·{ | ||
6 | ········if·(value·==·null)·return·identity; | ||
7 | ········if·(isFunction(value))·return·_optimizeCb(value,·context,·argCount); | ||
8 | ········if·(isObject(value)·&&·!isArray(value))·return·matcher(value); | ||
9 | ········return·property(value); | ||
5 | ····} | 10 | ····} |
6 | ····return· | 11 | ····return·baseIteratee; |
7 | })); | 12 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index11',·'./index17'],·(function(_createSizePropertyCheck,·_getLength)·{ |
2 | ····//·Internal·helper·for·collection·methods·to·determine·whether·a·collection | 2 | ····//·Internal·helper·for·collection·methods·to·determine·whether·a·collection |
3 | ····//·should·be·iterated·as·an·array·or·as·an·object. | 3 | ····//·should·be·iterated·as·an·array·or·as·an·object. |
4 | ····//·Related:·https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength | 4 | ····//·Related:·https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength |
5 | ····//·Avoids·a·very·nasty·iOS·8·JIT·bug·on·ARM-64.·#2094 | 5 | ····//·Avoids·a·very·nasty·iOS·8·JIT·bug·on·ARM-64.·#2094 |
6 | ····var·isArrayLike·=·_createSizePropertyCheck(_getLength); | 6 | ····var·isArrayLike·=·_createSizePropertyCheck(_getLength); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index11',·'./index16'],·(function(_createSizePropertyCheck,·_getByteLength)·{ |
2 | ····//·Internal·helper·to·determine·whether·we·should·spend·extensive·checks·against | 2 | ····//·Internal·helper·to·determine·whether·we·should·spend·extensive·checks·against |
3 | ····//·`ArrayBuffer`·et·al. | 3 | ····//·`ArrayBuffer`·et·al. |
4 | ····var·isBufferLike·=·_createSizePropertyCheck(_getByteLength); | 4 | ····var·isBufferLike·=·_createSizePropertyCheck(_getByteLength); |
5 | ····return·isBufferLike; | 5 | ····return·isBufferLike; |
Offset 1, 15 lines modified | Offset 1, 12 lines modified | ||
1 | define(['./index | 1 | define(['./index148',·'./index2',·'./index104'],·(function(underscore,·_baseIteratee,·iteratee)·{ |
2 | ····//·The·function·we·call·internally·to·generate·a·callback.·It·invokes | ||
3 | ····//·`_.iteratee`·if·overridden,·otherwise·`baseIteratee`. | ||
2 | ····//·An·internal·function·to·generate·callbacks·that·can·be·applied·to·each | ||
3 | ····//·element·in·a·collection,·returning·the·desired·result·—·either·`_.identity`, | ||
4 | ····//·an·arbitrary·callback,·a·property·matcher,·or·a·property·accessor. | ||
5 | ····function· | 4 | ····function·cb(value,·context,·argCount)·{ |
5 | ········if·(underscore.iteratee·!==·iteratee)·return·underscore.iteratee(value,·context); | ||
6 | ········return·_baseIteratee(value,·context,·argCount); | ||
6 | ········if·(value·==·null)·return·identity; | ||
7 | ········if·(isFunction(value))·return·_optimizeCb(value,·context,·argCount); | ||
8 | ········if·(isObject(value)·&&·!isArray(value))·return·matcher(value); | ||
9 | ········return·property(value); | ||
10 | ····} | 7 | ····} |
11 | ····return· | 8 | ····return·cb; |
12 | })); | 9 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index148',·'./index146'],·(function(underscore,·toPath$1)·{ |
2 | ····//·Internal·wrapper·for·`_.toPath`·to·enable·minification. | 2 | ····//·Internal·wrapper·for·`_.toPath`·to·enable·minification. |
3 | ····//·Similar·to·`cb`·for·`_.iteratee`. | 3 | ····//·Similar·to·`cb`·for·`_.iteratee`. |
4 | ····function·toPath(path)·{ | 4 | ····function·toPath(path)·{ |
5 | ········return·underscore.toPath(path); | 5 | ········return·underscore.toPath(path); |
6 | ····} | 6 | ····} |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index76',·'./index1 | 1 | define(['./index76',·'./index13'],·(function(invert,·_escapeMap)·{ |
2 | ····//·Internal·list·of·HTML·entities·for·unescaping. | 2 | ····//·Internal·list·of·HTML·entities·for·unescaping. |
3 | ····var·unescapeMap·=·invert(_escapeMap); | 3 | ····var·unescapeMap·=·invert(_escapeMap); |
4 | ····return·unescapeMap; | 4 | ····return·unescapeMap; |
5 | })); | 5 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index9 | 1 | define(['./index94',·'./index26',·'./index5'],·(function(isObject,·_setup,·_collectNonEnumProps)·{ |
2 | ····//·Retrieve·all·the·enumerable·property·names·of·an·object. | 2 | ····//·Retrieve·all·the·enumerable·property·names·of·an·object. |
3 | ····function·allKeys(obj)·{ | 3 | ····function·allKeys(obj)·{ |
4 | ········if·(!isObject(obj))·return·[]; | 4 | ········if·(!isObject(obj))·return·[]; |
5 | ········var·keys·=·[]; | 5 | ········var·keys·=·[]; |
6 | ········for·(var·key·in·obj)·keys.push(key); | 6 | ········for·(var·key·in·obj)·keys.push(key); |
7 | ········//·Ahem,·IE·<·9. | 7 | ········//·Ahem,·IE·<·9. |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index148'],·(function(underscore)·{ |
2 | ····//·Start·chaining·a·wrapped·Underscore·object. | 2 | ····//·Start·chaining·a·wrapped·Underscore·object. |
3 | ····function·chain(obj)·{ | 3 | ····function·chain(obj)·{ |
4 | ········var·instance·=·underscore(obj); | 4 | ········var·instance·=·underscore(obj); |
5 | ········instance._chain·=·true; | 5 | ········instance._chain·=·true; |
6 | ········return·instance; | 6 | ········return·instance; |
7 | ····} | 7 | ····} |
Offset 1, 44 lines modified | Offset 1, 10 lines modified | ||
1 | define(['./index | 1 | define(['./index148'],·(function(underscore)·{ |
2 | ····//·Helper·function·to·continue·chaining·intermediate·results. | ||
3 | ····function·chainResult(instance,·obj)·{ | ||
4 | ········return·instance._chain·?·underscore(obj).chain()·:·obj; | ||
2 | ····//·Internal·helper·to·create·a·simple·lookup·structure. | ||
3 | ····//·`collectNonEnumProps`·used·to·depend·on·`_.contains`,·but·this·led·to | ||
4 | ····//·circular·imports.·`emulatedSet`·is·a·one-off·solution·that·only·works·for | ||
5 | ····//·arrays·of·strings. | ||
6 | ····function·emulatedSet(keys)·{ | ||
7 | ········var·hash·=·{}; | ||
8 | ········for·(var·l·=·keys.length,·i·=·0;·i·<·l;·++i)·hash[keys[i]]·=·true; | ||
9 | ········return·{ | ||
10 | ············contains:·function(key)·{ | ||
11 | ················return·hash[key]·===·true; | ||
12 | ············}, | ||
13 | ············push:·function(key)·{ | ||
14 | ················hash[key]·=·true; | ||
15 | ················return·keys.push(key); | ||
16 | ············} | ||
17 | ········}; | ||
18 | ····} | 5 | ····} |
6 | ····return·chainResult; | ||
19 | ····//·Internal·helper.·Checks·`keys`·for·the·presence·of·keys·in·IE·<·9·that·won't | ||
20 | ····//·be·iterated·by·`for·key·in·...`·and·thus·missed.·Extends·`keys`·in·place·if | ||
21 | ····//·needed. | ||
22 | ····function·collectNonEnumProps(obj,·keys)·{ | ||
23 | ········keys·=·emulatedSet(keys); | ||
24 | ········var·nonEnumIdx·=·_setup.nonEnumerableProps.length; | ||
25 | ········var·constructor·=·obj.constructor; | ||
26 | ········var·proto·=·(isFunction(constructor)·&&·constructor.prototype)·||·_setup.ObjProto; | ||
27 | ········//·Constructor·is·a·special·case. | ||
28 | ········var·prop·=·'constructor'; | ||
29 | ········if·(_has(obj,·prop)·&&·!keys.contains(prop))·keys.push(prop); | ||
30 | ········while·(nonEnumIdx--)·{ | ||
31 | ············prop·=·_setup.nonEnumerableProps[nonEnumIdx]; | ||
32 | ············if·(prop·in·obj·&&·obj[prop]·!==·proto[prop]·&&·!keys.contains(prop))·{ | ||
33 | ················keys.push(prop); | ||
34 | ············} | ||
35 | ········} | ||
36 | ····} | ||
37 | ····return·collectNonEnumProps; | ||
38 | })); | 7 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index9 | 1 | define(['./index94',·'./index80',·'./index55'],·(function(isObject,·isArray,·extend)·{ |
2 | ····//·Create·a·(shallow-cloned)·duplicate·of·an·object. | 2 | ····//·Create·a·(shallow-cloned)·duplicate·of·an·object. |
3 | ····function·clone(obj)·{ | 3 | ····function·clone(obj)·{ |
4 | ········if·(!isObject(obj))·return·obj; | 4 | ········if·(!isObject(obj))·return·obj; |
5 | ········return·isArray(obj)·?·obj.slice()·:·extend({},·obj); | 5 | ········return·isArray(obj)·?·obj.slice()·:·extend({},·obj); |
6 | ····} | 6 | ····} |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index21',·'./index15 | 1 | define(['./index21',·'./index154',·'./index73'],·(function(_isArrayLike,·values,·indexOf)·{ |
2 | ····//·Determine·if·the·array·or·object·contains·a·given·item·(using·`===`). | 2 | ····//·Determine·if·the·array·or·object·contains·a·given·item·(using·`===`). |
3 | ····function·contains(obj,·item,·fromIndex,·guard)·{ | 3 | ····function·contains(obj,·item,·fromIndex,·guard)·{ |
4 | ········if·(!_isArrayLike(obj))·obj·=·values(obj); | 4 | ········if·(!_isArrayLike(obj))·obj·=·values(obj); |
5 | ········if·(typeof·fromIndex·!=·'number'·||·guard)·fromIndex·=·0; | 5 | ········if·(typeof·fromIndex·!=·'number'·||·guard)·fromIndex·=·0; |
6 | ········return·indexOf(obj,·item,·fromIndex)·>=·0; | 6 | ········return·indexOf(obj,·item,·fromIndex)·>=·0; |
7 | ····} | 7 | ····} |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index',·'./index5 | 1 | define(['./index',·'./index56'],·(function(_baseCreate,·extendOwn)·{ |
2 | ····//·Creates·an·object·that·inherits·from·the·given·prototype·object. | 2 | ····//·Creates·an·object·that·inherits·from·the·given·prototype·object. |
3 | ····//·If·additional·properties·are·provided·then·they·will·be·added·to·the | 3 | ····//·If·additional·properties·are·provided·then·they·will·be·added·to·the |
4 | ····//·created·object. | 4 | ····//·created·object. |
5 | ····function·create(prototype,·props)·{ | 5 | ····function·create(prototype,·props)·{ |
6 | ········var·result·=·_baseCreate(prototype); | 6 | ········var·result·=·_baseCreate(prototype); |
7 | ········if·(props)·extendOwn(result,·props); | 7 | ········if·(props)·extendOwn(result,·props); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index12 | 1 | define(['./index123',·'./index50',·'./index148'],·(function(partial,·delay,·underscore)·{ |
2 | ····//·Defers·a·function,·scheduling·it·to·run·after·the·current·call·stack·has | 2 | ····//·Defers·a·function,·scheduling·it·to·run·after·the·current·call·stack·has |
3 | ····//·cleared. | 3 | ····//·cleared. |
4 | ····var·defer·=·partial(delay,·underscore,·1); | 4 | ····var·defer·=·partial(delay,·underscore,·1); |
5 | ····return·defer; | 5 | ····return·defer; |
Offset 1, 12 lines modified | Offset 1, 44 lines modified | ||
1 | define(['./index | 1 | define(['./index26',·'./index89',·'./index19'],·(function(_setup,·isFunction,·_has)·{ |
2 | ····//·The·function·we·call·internally·to·generate·a·callback.·It·invokes | ||
3 | ····//·`_.iteratee`·if·overridden,·otherwise·`baseIteratee`. | ||
4 | ····function·cb(value,·context,·argCount)·{ | ||
5 | ········if·(underscore.iteratee·!==·iteratee)·return·underscore.iteratee(value,·context); | ||
6 | ···· | 2 | ····//·Internal·helper·to·create·a·simple·lookup·structure. |
3 | ····//·`collectNonEnumProps`·used·to·depend·on·`_.contains`,·but·this·led·to | ||
4 | ····//·circular·imports.·`emulatedSet`·is·a·one-off·solution·that·only·works·for | ||
5 | ····//·arrays·of·strings. | ||
6 | ····function·emulatedSet(keys)·{ | ||
7 | ········var·hash·=·{}; | ||
8 | ········for·(var·l·=·keys.length,·i·=·0;·i·<·l;·++i)·hash[keys[i]]·=·true; | ||
9 | ········return·{ | ||
10 | ············contains:·function(key)·{ | ||
11 | ················return·hash[key]·===·true; | ||
12 | ············}, | ||
13 | ············push:·function(key)·{ | ||
14 | ················hash[key]·=·true; | ||
15 | ················return·keys.push(key); | ||
16 | ············} | ||
17 | ········}; | ||
7 | ····} | 18 | ····} |
8 | ····ret | 19 | ····//·Internal·helper.·Checks·`keys`·for·the·presence·of·keys·in·IE·<·9·that·won't |
20 | ····//·be·iterated·by·`for·key·in·...`·and·thus·missed.·Extends·`keys`·in·place·if | ||
21 | ····//·needed. | ||
22 | ····function·collectNonEnumProps(obj,·keys)·{ | ||
23 | ········keys·=·emulatedSet(keys); | ||
24 | ········var·nonEnumIdx·=·_setup.nonEnumerableProps.length; | ||
25 | ········var·constructor·=·obj.constructor; | ||
26 | ········var·proto·=·(isFunction(constructor)·&&·constructor.prototype)·||·_setup.ObjProto; | ||
27 | ········//·Constructor·is·a·special·case. | ||
28 | ········var·prop·=·'constructor'; | ||
29 | ········if·(_has(obj,·prop)·&&·!keys.contains(prop))·keys.push(prop); | ||
30 | ········while·(nonEnumIdx--)·{ | ||
31 | ············prop·=·_setup.nonEnumerableProps[nonEnumIdx]; | ||
32 | ············if·(prop·in·obj·&&·obj[prop]·!==·proto[prop]·&&·!keys.contains(prop))·{ | ||
33 | ················keys.push(prop); | ||
34 | ············} | ||
35 | ········} | ||
36 | ····} | ||
37 | ····return·collectNonEnumProps; | ||
9 | })); | 38 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index7',·'./index1 | 1 | define(['./index7',·'./index13'],·(function(_createEscaper,·_escapeMap)·{ |
2 | ····//·Function·for·escaping·strings·to·HTML·interpolation. | 2 | ····//·Function·for·escaping·strings·to·HTML·interpolation. |
3 | ····var·escape·=·_createEscaper(_escapeMap); | 3 | ····var·escape·=·_createEscaper(_escapeMap); |
4 | ····return·escape; | 4 | ····return·escape; |
5 | })); | 5 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index21',·'./index105'],·(function(_cb,·_isArrayLike,·keys)·{ |
2 | ····//·Determine·whether·all·of·the·elements·pass·a·truth·test. | 2 | ····//·Determine·whether·all·of·the·elements·pass·a·truth·test. |
3 | ····function·every(obj,·predicate,·context)·{ | 3 | ····function·every(obj,·predicate,·context)·{ |
4 | ········predicate·=·_cb(predicate,·context); | 4 | ········predicate·=·_cb(predicate,·context); |
5 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | 5 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), |
6 | ············length·=·(_keys·||·obj).length; | 6 | ············length·=·(_keys·||·obj).length; |
7 | ········for·(var·index·=·0;·index·<·length;·index++)·{ | 7 | ········for·(var·index·=·0;·index·<·length;·index++)·{ |
Offset 1, 10 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index6',·'./index | 1 | define(['./index6',·'./index34'],·(function(_createAssigner,·allKeys)·{ |
2 | ····//· | 2 | ····//·Extend·a·given·object·with·all·the·properties·in·passed-in·object(s). |
3 | ····//·object(s). | ||
4 | ····//·(https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) | ||
5 | ····var·extend | 3 | ····var·extend·=·_createAssigner(allKeys); |
6 | ····return·extend | 4 | ····return·extend; |
7 | })); | 5 | })); |
Offset 1, 8 lines modified | Offset 1, 10 lines modified | ||
1 | define(['./index6',·'./index | 1 | define(['./index6',·'./index105'],·(function(_createAssigner,·keys)·{ |
2 | ····//· | 2 | ····//·Assigns·a·given·object·with·all·the·own·properties·in·the·passed-in |
3 | ····//·object(s). | ||
4 | ····//·(https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) | ||
3 | ····var·extend·=·_createAssigner( | 5 | ····var·extendOwn·=·_createAssigner(keys); |
4 | ····return·extend; | 6 | ····return·extendOwn; |
5 | })); | 7 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index52'],·(function(_cb,·each)·{ |
2 | ····//·Return·all·the·elements·that·pass·a·truth·test. | 2 | ····//·Return·all·the·elements·that·pass·a·truth·test. |
3 | ····function·filter(obj,·predicate,·context)·{ | 3 | ····function·filter(obj,·predicate,·context)·{ |
4 | ········var·results·=·[]; | 4 | ········var·results·=·[]; |
5 | ········predicate·=·_cb(predicate,·context); | 5 | ········predicate·=·_cb(predicate,·context); |
6 | ········each(obj,·function(value,·index,·list)·{ | 6 | ········each(obj,·function(value,·index,·list)·{ |
7 | ············if·(predicate(value,·index,·list))·results.push(value); | 7 | ············if·(predicate(value,·index,·list))·results.push(value); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index9'],·(function(_createPredicateIndexFinder)·{ |
2 | ····//·Returns·the·first·index·on·an·array-like·that·passes·a·truth·test. | 2 | ····//·Returns·the·first·index·on·an·array-like·that·passes·a·truth·test. |
3 | ····var·findIndex·=·_createPredicateIndexFinder(1); | 3 | ····var·findIndex·=·_createPredicateIndexFinder(1); |
4 | ····return·findIndex; | 4 | ····return·findIndex; |
5 | })); | 5 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index105'],·(function(_cb,·keys)·{ |
2 | ····//·Returns·the·first·key·on·an·object·that·passes·a·truth·test. | 2 | ····//·Returns·the·first·key·on·an·object·that·passes·a·truth·test. |
3 | ····function·findKey(obj,·predicate,·context)·{ | 3 | ····function·findKey(obj,·predicate,·context)·{ |
4 | ········predicate·=·_cb(predicate,·context); | 4 | ········predicate·=·_cb(predicate,·context); |
5 | ········var·_keys·=·keys(obj), | 5 | ········var·_keys·=·keys(obj), |
6 | ············key; | 6 | ············key; |
7 | ········for·(var·i·=·0,·length·=·_keys.length;·i·<·length;·i++)·{ | 7 | ········for·(var·i·=·0,·length·=·_keys.length;·i·<·length;·i++)·{ |
Offset 1, 8 lines modified | Offset 1, 11 lines modified | ||
1 | define(['./index8' | 1 | define(['./index58',·'./index109'],·(function(find,·matcher)·{ |
2 | ····//·Returns·the·last·index·on·an·array-like·that·passes·a·truth·test. | ||
3 | ···· | 2 | ····//·Convenience·version·of·a·common·use·case·of·`_.find`:·getting·the·first |
3 | ····//·object·containing·specific·`key:value`·pairs. | ||
4 | ····function·findWhere(obj,·attrs)·{ | ||
5 | ········return·find(obj,·matcher(attrs)); | ||
6 | ····} | ||
4 | ····return·find | 7 | ····return·findWhere; |
5 | })); | 8 | })); |
Offset 1, 11 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index | 1 | define(['./index9'],·(function(_createPredicateIndexFinder)·{ |
2 | ····//·Returns·the·last·index·on·an·array-like·that·passes·a·truth·test. | ||
3 | ····var·findLastIndex·=·_createPredicateIndexFinder(-1); | ||
2 | ····//·Convenience·version·of·a·common·use·case·of·`_.find`:·getting·the·first | ||
3 | ····//·object·containing·specific·`key:value`·pairs. | ||
4 | ····function·findWhere(obj,·attrs)·{ | ||
5 | ········return·find(obj,·matcher(attrs)); | ||
6 | ····} | ||
7 | ····return·find | 4 | ····return·findLastIndex; |
8 | })); | 5 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index31',·'./index1 | 1 | define(['./index31',·'./index12',·'./index101'],·(function(_toPath,·_deepGet,·isUndefined)·{ |
2 | ····//·Get·the·value·of·the·(deep)·property·on·`path`·from·`object`. | 2 | ····//·Get·the·value·of·the·(deep)·property·on·`path`·from·`object`. |
3 | ····//·If·any·property·in·`path`·does·not·exist·or·if·the·value·is | 3 | ····//·If·any·property·in·`path`·does·not·exist·or·if·the·value·is |
4 | ····//·`undefined`,·return·`defaultValue`·instead. | 4 | ····//·`undefined`,·return·`defaultValue`·instead. |
5 | ····//·The·`path`·is·normalized·through·`_.toPath`. | 5 | ····//·The·`path`·is·normalized·through·`_.toPath`. |
6 | ····function·get(object,·path,·defaultValue)·{ | 6 | ····function·get(object,·path,·defaultValue)·{ |
7 | ········var·value·=·_deepGet(object,·_toPath(path)); | 7 | ········var·value·=·_deepGet(object,·_toPath(path)); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['exports',·'./index26',·'./index134',·'./index9 | 1 | define(['exports',·'./index26',·'./index134',·'./index94',·'./index93',·'./index101',·'./index81',·'./index84',·'./index98',·'./index95',·'./index83',·'./index96',·'./index87',·'./index99',·'./index79',·'./index82',·'./index80',·'./index89',·'./index78',·'./index88',·'./index92',·'./index100',·'./index85',·'./[·...·truncated·by·diffoscope;·len:·1417,·SHA:·74c45b1503bc317003c2a02d04b682d34a5ad639caf43b62fbef1354042bbc8b·...·]'],·(function(exports,·_setup,·restArguments,·isObject,·isNull,·isUndefined,·isBoolean,·isElement,·isString,·isNumber,·isDate,·isRegExp,·isError,·isSymbol,·isArrayBuffer,·isDataView,·isArray,·isFunction,·isArguments,·isFinite,·isNaN,·isTypedArray,·isEmpty,·isMatch,·isEqual,·isMap,·isWeakMap,·isSet,·isWeakSet,·keys,·allKeys,·values,·pairs,·invert,·functions,·extend,·extendOwn,·defaults,·create,·clone,·tap,·get,·has,·mapObject,·identity,·constant,·noop,·toPath,·property,·propertyOf,·matcher,·times,·random,·now,·escape,·unescape,·templateSettings,·template,·result,·uniqueId,·chain,·iteratee,·partial,·bind,·bindAll,·memoize,·delay,·defer,·throttle,·debounce,·wrap,·negate,·compose,·after,·before,·once,·findKey,·findIndex,·findLastIndex,·sortedIndex,·indexOf,·lastIndexOf,·find,·findWhere,·each,·map,·reduce,·reduceRight,·filter,·reject,·every,·some,·contains,·invoke,·pluck,·where,·max,·min,·shuffle,·sample,·sortBy,·groupBy,·indexBy,·countBy,·partition,·toArray,·size,·pick,·omit,·first,·initial,·last,·rest,·compact,·flatten,·without,·uniq,·union,·intersection,·difference,·unzip,·zip,·object,·range,·chunk,·mixin,·underscoreArrayMethods,·underscore)·{ |
2 | ····//·Named·Exports | 2 | ····//·Named·Exports |
3 | ····//·============= | 3 | ····//·============= |
4 | ····exports.VERSION·=·_setup.VERSION; | 4 | ····exports.VERSION·=·_setup.VERSION; |
5 | ····exports.restArguments·=·restArguments; | 5 | ····exports.restArguments·=·restArguments; |
6 | ····exports.isObject·=·isObject; | 6 | ····exports.isObject·=·isObject; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index14 | 1 | define(['./index141',·'./index59',·'./index8'],·(function(sortedIndex,·findIndex,·_createIndexFinder)·{ |
2 | ····//·Return·the·position·of·the·first·occurrence·of·an·item·in·an·array, | 2 | ····//·Return·the·position·of·the·first·occurrence·of·an·item·in·an·array, |
3 | ····//·or·-1·if·the·item·is·not·included·in·the·array. | 3 | ····//·or·-1·if·the·item·is·not·included·in·the·array. |
4 | ····//·If·the·array·is·large·and·already·in·sort·order,·pass·`true` | 4 | ····//·If·the·array·is·large·and·already·in·sort·order,·pass·`true` |
5 | ····//·for·**isSorted**·to·use·binary·search. | 5 | ····//·for·**isSorted**·to·use·binary·search. |
6 | ····var·indexOf·=·_createIndexFinder(1,·findIndex,·sortedIndex); | 6 | ····var·indexOf·=·_createIndexFinder(1,·findIndex,·sortedIndex); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index134',·'./index89',·'./index108',·'./index1 | 1 | define(['./index134',·'./index89',·'./index108',·'./index12',·'./index31'],·(function(restArguments,·isFunction,·map,·_deepGet,·_toPath)·{ |
2 | ····//·Invoke·a·method·(with·arguments)·on·every·item·in·a·collection. | 2 | ····//·Invoke·a·method·(with·arguments)·on·every·item·in·a·collection. |
3 | ····var·invoke·=·restArguments(function(obj,·path,·args)·{ | 3 | ····var·invoke·=·restArguments(function(obj,·path,·args)·{ |
4 | ········var·contextPath,·func; | 4 | ········var·contextPath,·func; |
5 | ········if·(isFunction(path))·{ | 5 | ········if·(isFunction(path))·{ |
6 | ············func·=·path; | 6 | ············func·=·path; |
7 | ········}·else·{ | 7 | ········}·else·{ |
Offset 1, 18 lines modified | Offset 1, 31 lines modified | ||
1 | define(['./index | 1 | define(['./index17',·'./index26',·'./index92'],·(function(_getLength,·_setup,·isNaN)·{ |
2 | ····//·Internal·function·to·generate·`_. | 2 | ····//·Internal·function·to·generate·the·`_.indexOf`·and·`_.lastIndexOf`·functions. |
3 | ····function·create | 3 | ····function·createIndexFinder(dir,·predicateFind,·sortedIndex)·{ |
4 | ········return·function(array,· | 4 | ········return·function(array,·item,·idx)·{ |
5 | ············ | 5 | ············var·i·=·0, |
6 | ············ | 6 | ················length·=·_getLength(array); |
7 | ············ | 7 | ············if·(typeof·idx·==·'number')·{ |
8 | ················if·(dir·>·0)·{ | ||
9 | ····················i·=·idx·>=·0·?·idx·:·Math.max(idx·+·length,·i); | ||
10 | ················}·else·{ | ||
11 | ····················length·=·idx·>=·0·?·Math.min(idx·+·1,·length)·:·idx·+·length·+·1; | ||
12 | ················} | ||
13 | ············}·else·if·(sortedIndex·&&·idx·&&·length)·{ | ||
14 | ················idx·=·sortedIndex(array,·item); | ||
15 | ················return·array[idx]·===·item·?·idx·:·-1; | ||
16 | ············} | ||
17 | ············if·(item·!==·item)·{ | ||
18 | ················idx·=·predicateFind(_setup.slice.call(array,·i,·length),·isNaN); | ||
19 | ················return·idx·>=·0·?·idx·+·i·:·-1; | ||
20 | ············} | ||
8 | ············for·( | 21 | ············for·(idx·=·dir·>·0·?·i·:·length·-·1;·idx·>=·0·&&·idx·<·length;·idx·+=·dir)·{ |
9 | ················if·( | 22 | ················if·(array[idx]·===·item)·return·idx; |
10 | ············} | 23 | ············} |
11 | ············return·-1; | 24 | ············return·-1; |
12 | ········}; | 25 | ········}; |
13 | ····} | 26 | ····} |
14 | ····return·create | 27 | ····return·createIndexFinder; |
15 | })); | 28 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index1 | 1 | define(['./index148',·'./index26',·'./index16',·'./index100',·'./index89',·'./index28',·'./index82',·'./index105',·'./index19',·'./index30'],·(function(underscore,·_setup,·_getByteLength,·isTypedArray,·isFunction,·_stringTagBug,·isDataView,·keys,·_has,·_toBufferView)·{ |
2 | ····//·We·use·this·string·twice,·so·give·it·a·name·for·minification. | 2 | ····//·We·use·this·string·twice,·so·give·it·a·name·for·minification. |
3 | ····var·tagDataView·=·'[object·DataView]'; | 3 | ····var·tagDataView·=·'[object·DataView]'; |
4 | ····//·Internal·recursive·comparison·function·for·`_.isEqual`. | 4 | ····//·Internal·recursive·comparison·function·for·`_.isEqual`. |
5 | ····function·eq(a,·b,·aStack,·bStack)·{ | 5 | ····function·eq(a,·b,·aStack,·bStack)·{ |
6 | ········//·Identical·objects·are·equal.·`0·===·-0`,·but·they·aren't·identical. | 6 | ········//·Identical·objects·are·equal.·`0·===·-0`,·but·they·aren't·identical. |
Offset 1, 10 lines modified | Offset 1, 7 lines modified | ||
1 | define(['./index2 | 1 | define(['./index29'],·(function(_tagTester)·{ |
2 | ····var·isError·=·_tagTester('Error'); | ||
2 | ····//·Is·a·given·object·a·finite·number? | ||
3 | ····function·isFinite(obj)·{ | ||
4 | ········return·!isSymbol(obj)·&&·_setup._isFinite(obj)·&&·!isNaN(parseFloat(obj)); | ||
5 | ····} | ||
6 | ····return·is | 3 | ····return·isError; |
7 | })); | 4 | })); |
Offset 1, 7 lines modified | Offset 1, 10 lines modified | ||
1 | define(['./index29'],·(function(_t | 1 | define(['./index26',·'./index99'],·(function(_setup,·isSymbol)·{ |
2 | ···· | 2 | ····//·Is·a·given·object·a·finite·number? |
3 | ····function·isFinite(obj)·{ | ||
4 | ········return·!isSymbol(obj)·&&·_setup._isFinite(obj)·&&·!isNaN(parseFloat(obj)); | ||
5 | ····} | ||
3 | ····return·is | 6 | ····return·isFinite; |
4 | })); | 7 | })); |
Offset 1, 31 lines modified | Offset 1, 18 lines modified | ||
1 | define(['./index | 1 | define(['./index3',·'./index17'],·(function(_cb,·_getLength)·{ |
2 | ····//·Internal·function·to·generate· | 2 | ····//·Internal·function·to·generate·`_.findIndex`·and·`_.findLastIndex`. |
3 | ····function·create | 3 | ····function·createPredicateIndexFinder(dir)·{ |
4 | ········return·function(array,·ite | 4 | ········return·function(array,·predicate,·context)·{ |
5 | ············ | 5 | ············predicate·=·_cb(predicate,·context); |
6 | ············ | 6 | ············var·length·=·_getLength(array); |
7 | ············var·index·=·dir·>·0·?·0·:·length·-·1; | ||
7 | ············if·(typeof·idx·==·'number')·{ | ||
8 | ················if·(dir·>·0)·{ | ||
9 | ····················i·=·idx·>=·0·?·idx·:·Math.max(idx·+·length,·i); | ||
10 | ················}·else·{ | ||
11 | ····················length·=·idx·>=·0·?·Math.min(idx·+·1,·length)·:·idx·+·length·+·1; | ||
12 | ················} | ||
13 | ············}·else·if·(sortedIndex·&&·idx·&&·length)·{ | ||
14 | ················idx·=·sortedIndex(array,·item); | ||
15 | ················return·array[idx]·===·item·?·idx·:·-1; | ||
16 | ············} | ||
17 | ············if·(item·!==·item)·{ | ||
18 | ················idx·=·predicateFind(_setup.slice.call(array,·i,·length),·isNaN); | ||
19 | ················return·idx·>=·0·?·idx·+·i·:·-1; | ||
20 | ············} | ||
21 | ············for·( | 8 | ············for·(;·index·>=·0·&&·index·<·length;·index·+=·dir)·{ |
22 | ················if·(array[idx]· | 9 | ················if·(predicate(array[index],·index,·array))·return·index; |
23 | ············} | 10 | ············} |
24 | ············return·-1; | 11 | ············return·-1; |
25 | ········}; | 12 | ········}; |
26 | ····} | 13 | ····} |
27 | ····return·createIndexFinder; | 14 | ····return·createPredicateIndexFinder; |
28 | })); | 15 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | define(['./index26',·'./index9 | 1 | define(['./index26',·'./index95'],·(function(_setup,·isNumber)·{ |
2 | ····//·Is·the·given·value·`NaN`? | 2 | ····//·Is·the·given·value·`NaN`? |
3 | ····function·isNaN(obj)·{ | 3 | ····function·isNaN(obj)·{ |
4 | ········return·isNumber(obj)·&&·_setup._isNaN(obj); | 4 | ········return·isNumber(obj)·&&·_setup._isNaN(obj); |
5 | ····} | 5 | ····} |
6 | ····return·isNaN; | 6 | ····return·isNaN; |
Offset 1, 7 lines modified | Offset 1, 10 lines modified | ||
1 | define( | 1 | define((function()·{ |
2 | ···· | 2 | ····//·Is·a·given·value·equal·to·null? |
3 | ····function·isNull(obj)·{ | ||
4 | ········return·obj·===·null; | ||
5 | ····} | ||
3 | ····return·isNu | 6 | ····return·isNull; |
4 | })); | 7 | })); |
Offset 1, 10 lines modified | Offset 1, 11 lines modified | ||
1 | define((function()·{ | 1 | define((function()·{ |
2 | ····//·Is·a·given·va | 2 | ····//·Is·a·given·variable·an·object? |
3 | ····function·is | 3 | ····function·isObject(obj)·{ |
4 | ········r | 4 | ········var·type·=·typeof·obj; |
5 | ········return·type·===·'function'·||·(type·===·'object'·&&·!!obj); | ||
5 | ····} | 6 | ····} |
6 | ····return·is | 7 | ····return·isObject; |
7 | })); | 8 | })); |
Offset 1, 11 lines modified | Offset 1, 7 lines modified | ||
1 | define((function()·{ | 1 | define(['./index29'],·(function(_tagTester)·{ |
2 | ····var·isNumber·=·_tagTester('Number'); | ||
2 | ····//·Is·a·given·variable·an·object? | ||
3 | ····function·isObject(obj)·{ | ||
4 | ········var·type·=·typeof·obj; | ||
5 | ········return·type·===·'function'·||·(type·===·'object'·&&·!!obj); | ||
6 | ····} | ||
7 | ····return·is | 3 | ····return·isNumber; |
8 | })); | 4 | })); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·isObject·=·require('./index9 | 1 | var·isObject·=·require('./index94.js'); |
2 | var·_setup·=·require('./index26.js'); | 2 | var·_setup·=·require('./index26.js'); |
3 | //·Create·a·naked·function·reference·for·surrogate-prototype-swapping. | 3 | //·Create·a·naked·function·reference·for·surrogate-prototype-swapping. |
4 | function·ctor()·{ | 4 | function·ctor()·{ |
5 | ····return·function()·{}; | 5 | ····return·function()·{}; |
6 | } | 6 | } |
Offset 1, 11 lines modified | Offset 1, 30 lines modified | ||
1 | var·_s | 1 | var·_isArrayLike·=·require('./index21.js'); |
2 | var·keys·=·require('./index105.js'); | ||
3 | var·_optimizeCb·=·require('./index25.js'); | ||
2 | //·Common·internal·logic·for·`isArrayLike`·and·`isBufferLike`. | ||
3 | function·createSizePropertyCheck(getSizeProperty)·{ | ||
4 | ····return·function(collection)·{ | ||
5 | ········var·sizeProperty·=·getSizeProperty(collection); | ||
6 | 4 | //·Internal·helper·to·create·a·reducing·function,·iterating·left·or·right. | |
5 | function·createReduce(dir)·{ | ||
6 | ····//·Wrap·code·that·reassigns·argument·variables·in·a·separate·function·than | ||
7 | ····//·the·one·that·accesses·`arguments.length`·to·avoid·a·perf·hit.·(#1991) | ||
8 | ····var·reducer·=·function(obj,·iteratee,·memo,·initial)·{ | ||
9 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | ||
10 | ············length·=·(_keys·||·obj).length, | ||
11 | ············index·=·dir·>·0·?·0·:·length·-·1; | ||
12 | ········if·(!initial)·{ | ||
13 | ············memo·=·obj[_keys·?·_keys[index]·:·index]; | ||
14 | ············index·+=·dir; | ||
15 | ········} | ||
16 | ········for·(;·index·>=·0·&&·index·<·length;·index·+=·dir)·{ | ||
17 | ············var·currentKey·=·_keys·?·_keys[index]·:·index; | ||
18 | ············memo·=·iteratee(memo,·obj[currentKey],·currentKey,·obj); | ||
19 | ········} | ||
20 | ········return·memo; | ||
7 | ····} | 21 | ····}; |
22 | ····return·function(obj,·iteratee,·memo,·context)·{ | ||
23 | ········var·initial·=·arguments.length·>=·3; | ||
24 | ········return·reducer(obj,·_optimizeCb(iteratee,·context,·4),·memo,·initial); | ||
25 | ····}; | ||
8 | } | 26 | } |
9 | module.exports·=·create | 27 | module.exports·=·createReduce; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·underscore·=·require('./index1 | 1 | var·underscore·=·require('./index148.js'); |
2 | var·_baseIteratee·=·require('./index | 2 | var·_baseIteratee·=·require('./index2.js'); |
3 | //·External·wrapper·for·our·callback·generator.·Users·may·customize | 3 | //·External·wrapper·for·our·callback·generator.·Users·may·customize |
4 | //·`_.iteratee`·if·they·want·additional·predicate/iteratee·shorthand·styles. | 4 | //·`_.iteratee`·if·they·want·additional·predicate/iteratee·shorthand·styles. |
5 | //·This·abstraction·hides·the·internal-only·`argCount`·argument. | 5 | //·This·abstraction·hides·the·internal-only·`argCount`·argument. |
6 | function·iteratee(value,·context)·{ | 6 | function·iteratee(value,·context)·{ |
7 | ····return·_baseIteratee(value,·context,·Infinity); | 7 | ····return·_baseIteratee(value,·context,·Infinity); |
8 | } | 8 | } |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | var·isObject·=·require('./index9 | 1 | var·isObject·=·require('./index94.js'); |
2 | var·_setup·=·require('./index26.js'); | 2 | var·_setup·=·require('./index26.js'); |
3 | var·_has·=·require('./index19.js'); | 3 | var·_has·=·require('./index19.js'); |
4 | var·_collectNonEnumProps·=·require('./index | 4 | var·_collectNonEnumProps·=·require('./index5.js'); |
5 | //·Retrieve·the·names·of·an·object's·own·properties. | 5 | //·Retrieve·the·names·of·an·object's·own·properties. |
6 | //·Delegates·to·**ECMAScript·5**'s·native·`Object.keys`. | 6 | //·Delegates·to·**ECMAScript·5**'s·native·`Object.keys`. |
7 | function·keys(obj)·{ | 7 | function·keys(obj)·{ |
8 | ····if·(!isObject(obj))·return·[]; | 8 | ····if·(!isObject(obj))·return·[]; |
9 | ····if·(_setup.nativeKeys)·return·_setup.nativeKeys(obj); | 9 | ····if·(_setup.nativeKeys)·return·_setup.nativeKeys(obj); |
10 | ····var·keys·=·[]; | 10 | ····var·keys·=·[]; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·rest·=·require('./index13 | 1 | var·rest·=·require('./index133.js'); |
2 | //·Get·the·last·element·of·an·array.·Passing·**n**·will·return·the·last·N | 2 | //·Get·the·last·element·of·an·array.·Passing·**n**·will·return·the·last·N |
3 | //·values·in·the·array. | 3 | //·values·in·the·array. |
4 | function·last(array,·n,·guard)·{ | 4 | function·last(array,·n,·guard)·{ |
5 | ····if·(array·==·null·||·array.length·<·1)·return·n·==·null·||·guard·?·void·0·:·[]; | 5 | ····if·(array·==·null·||·array.length·<·1)·return·n·==·null·||·guard·?·void·0·:·[]; |
6 | ····if·(n·==·null·||·guard)·return·array[array.length·-·1]; | 6 | ····if·(n·==·null·||·guard)·return·array[array.length·-·1]; |
7 | ····return·rest(array,·Math.max(0,·array.length·-·n)); | 7 | ····return·rest(array,·Math.max(0,·array.length·-·n)); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·findLastIndex·=·require('./index6 | 1 | var·findLastIndex·=·require('./index62.js'); |
2 | var·_createIndexFinder·=·require('./index | 2 | var·_createIndexFinder·=·require('./index8.js'); |
3 | //·Return·the·position·of·the·last·occurrence·of·an·item·in·an·array, | 3 | //·Return·the·position·of·the·last·occurrence·of·an·item·in·an·array, |
4 | //·or·-1·if·the·item·is·not·included·in·the·array. | 4 | //·or·-1·if·the·item·is·not·included·in·the·array. |
5 | var·lastIndexOf·=·_createIndexFinder(-1,·findLastIndex); | 5 | var·lastIndexOf·=·_createIndexFinder(-1,·findLastIndex); |
6 | module.exports·=·lastIndexOf; | 6 | module.exports·=·lastIndexOf; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·_isArrayLike·=·require('./index21.js'); | 2 | var·_isArrayLike·=·require('./index21.js'); |
3 | var·keys·=·require('./index105.js'); | 3 | var·keys·=·require('./index105.js'); |
4 | //·Return·the·results·of·applying·the·iteratee·to·each·element. | 4 | //·Return·the·results·of·applying·the·iteratee·to·each·element. |
5 | function·map(obj,·iteratee,·context)·{ | 5 | function·map(obj,·iteratee,·context)·{ |
6 | ····iteratee·=·_cb(iteratee,·context); | 6 | ····iteratee·=·_cb(iteratee,·context); |
7 | ····var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | 7 | ····var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), |
Offset 1, 18 lines modified | Offset 1, 13 lines modified | ||
1 | var·extendOwn·=·require('./index56.js'); | ||
1 | var· | 2 | var·isMatch·=·require('./index91.js'); |
2 | var·keys·=·require('./index105.js'); | ||
3 | //·Returns·a·predicate·for·checking·whether·an·object·has·a·given·set·of | ||
4 | //·`key:value`·pairs. | ||
5 | function·matcher(attrs)·{ | ||
6 | ····attrs·=·extendOwn({},·attrs); | ||
7 | ····return·function(obj)·{ | ||
8 | ········return·isMatch(obj,·attrs); | ||
3 | //·Returns·the·results·of·applying·the·`iteratee`·to·each·element·of·`obj`. | ||
4 | //·In·contrast·to·`_.map`·it·returns·an·object. | ||
5 | function·mapObject(obj,·iteratee,·context)·{ | ||
6 | ····iteratee·=·_cb(iteratee,·context); | ||
7 | ····var·_keys·=·keys(obj), | ||
8 | ········length·=·_keys.length, | ||
9 | ········results·=·{}; | ||
10 | ····for·(var·index·=·0;·index·<·length;·index++)·{ | ||
11 | ········var·currentKey·=·_keys[index]; | ||
12 | ········results[currentKey]·=·iteratee(obj[currentKey],·currentKey,·obj); | ||
13 | ····} | 9 | ····}; |
14 | ····return·results; | ||
15 | } | 10 | } |
16 | module.exports·=·ma | 11 | module.exports·=·matcher; |
Offset 1, 30 lines modified | Offset 1, 11 lines modified | ||
1 | var·_ | 1 | var·_setup·=·require('./index26.js'); |
2 | var·keys·=·require('./index105.js'); | ||
3 | var·_optimizeCb·=·require('./index25.js'); | ||
2 | //·Common·internal·logic·for·`isArrayLike`·and·`isBufferLike`. | ||
3 | function·createSizePropertyCheck(getSizeProperty)·{ | ||
4 | ····return·function(collection)·{ | ||
5 | ········var·sizeProperty·=·getSizeProperty(collection); | ||
6 | ········return·typeof·sizeProperty·==·'number'·&&·sizeProperty·>=·0·&&·sizeProperty·<=·_setup.MAX_ARRAY_INDEX; | ||
4 | //·Internal·helper·to·create·a·reducing·function,·iterating·left·or·right. | ||
5 | function·createReduce(dir)·{ | ||
6 | ····//·Wrap·code·that·reassigns·argument·variables·in·a·separate·function·than | ||
7 | ····//·the·one·that·accesses·`arguments.length`·to·avoid·a·perf·hit.·(#1991) | ||
8 | ····var·reducer·=·function(obj,·iteratee,·memo,·initial)·{ | ||
9 | ········var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | ||
10 | ············length·=·(_keys·||·obj).length, | ||
11 | ············index·=·dir·>·0·?·0·:·length·-·1; | ||
12 | ········if·(!initial)·{ | ||
13 | ············memo·=·obj[_keys·?·_keys[index]·:·index]; | ||
14 | ············index·+=·dir; | ||
15 | ········} | ||
16 | ········for·(;·index·>=·0·&&·index·<·length;·index·+=·dir)·{ | ||
17 | ············var·currentKey·=·_keys·?·_keys[index]·:·index; | ||
18 | ············memo·=·iteratee(memo,·obj[currentKey],·currentKey,·obj); | ||
19 | ········} | ||
20 | ········return·memo; | ||
21 | ····} | 7 | ····} |
22 | ····return·function(obj,·iteratee,·memo,·context)·{ | ||
23 | ········var·initial·=·arguments.length·>=·3; | ||
24 | ········return·reducer(obj,·_optimizeCb(iteratee,·context,·4),·memo,·initial); | ||
25 | ····}; | ||
26 | } | 8 | } |
27 | module.exports·=·create | 9 | module.exports·=·createSizePropertyCheck; |
Offset 1, 13 lines modified | Offset 1, 18 lines modified | ||
1 | var·extendOwn·=·require('./index55.js'); | ||
2 | var· | 1 | var·_cb·=·require('./index3.js'); |
2 | var·keys·=·require('./index105.js'); | ||
3 | //·Returns·a·predicate·for·checking·whether·an·object·has·a·given·set·of | ||
4 | //·`key:value`·pairs. | ||
5 | function·matcher(attrs)·{ | ||
6 | ····attrs·=·extendOwn({},·attrs); | ||
7 | ····return·function(obj)·{ | ||
8 | · | 3 | //·Returns·the·results·of·applying·the·`iteratee`·to·each·element·of·`obj`. |
4 | //·In·contrast·to·`_.map`·it·returns·an·object. | ||
5 | function·mapObject(obj,·iteratee,·context)·{ | ||
6 | ····iteratee·=·_cb(iteratee,·context); | ||
7 | ····var·_keys·=·keys(obj), | ||
8 | ········length·=·_keys.length, | ||
9 | ········results·=·{}; | ||
10 | ····for·(var·index·=·0;·index·<·length;·index++)·{ | ||
11 | ········var·currentKey·=·_keys[index]; | ||
12 | ········results[currentKey]·=·iteratee(obj[currentKey],·currentKey,·obj); | ||
9 | ····} | 13 | ····} |
14 | ····return·results; | ||
10 | } | 15 | } |
11 | module.exports·=·ma | 16 | module.exports·=·mapObject; |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·_isArrayLike·=·require('./index21.js'); | 1 | var·_isArrayLike·=·require('./index21.js'); |
2 | var·values·=·require('./index15 | 2 | var·values·=·require('./index154.js'); |
3 | var·_cb·=·require('./index | 3 | var·_cb·=·require('./index3.js'); |
4 | var·each·=·require('./index52.js'); | 4 | var·each·=·require('./index52.js'); |
5 | //·Return·the·maximum·element·(or·element-based·computation). | 5 | //·Return·the·maximum·element·(or·element-based·computation). |
6 | function·max(obj,·iteratee,·context)·{ | 6 | function·max(obj,·iteratee,·context)·{ |
7 | ····var·result·=·-Infinity, | 7 | ····var·result·=·-Infinity, |
8 | ········lastComputed·=·-Infinity, | 8 | ········lastComputed·=·-Infinity, |
9 | ········value,·computed; | 9 | ········value,·computed; |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·_isArrayLike·=·require('./index21.js'); | 1 | var·_isArrayLike·=·require('./index21.js'); |
2 | var·values·=·require('./index15 | 2 | var·values·=·require('./index154.js'); |
3 | var·_cb·=·require('./index | 3 | var·_cb·=·require('./index3.js'); |
4 | var·each·=·require('./index52.js'); | 4 | var·each·=·require('./index52.js'); |
5 | //·Return·the·minimum·element·(or·element-based·computation). | 5 | //·Return·the·minimum·element·(or·element-based·computation). |
6 | function·min(obj,·iteratee,·context)·{ | 6 | function·min(obj,·iteratee,·context)·{ |
7 | ····var·result·=·Infinity, | 7 | ····var·result·=·Infinity, |
8 | ········lastComputed·=·Infinity, | 8 | ········lastComputed·=·Infinity, |
9 | ········value,·computed; | 9 | ········value,·computed; |
Offset 1, 12 lines modified | Offset 1, 12 lines modified | ||
1 | var·underscore·=·require('./index1 | 1 | var·underscore·=·require('./index148.js'); |
2 | var·each·=·require('./index52.js'); | 2 | var·each·=·require('./index52.js'); |
3 | var·functions·=·require('./index65.js'); | 3 | var·functions·=·require('./index65.js'); |
4 | var·_setup·=·require('./index26.js'); | 4 | var·_setup·=·require('./index26.js'); |
5 | var·_chainResult·=·require('./index | 5 | var·_chainResult·=·require('./index4.js'); |
6 | //·Add·your·own·custom·functions·to·the·Underscore·object. | 6 | //·Add·your·own·custom·functions·to·the·Underscore·object. |
7 | function·mixin(obj)·{ | 7 | function·mixin(obj)·{ |
8 | ····each(functions(obj),·function(name)·{ | 8 | ····each(functions(obj),·function(name)·{ |
9 | ········var·func·=·underscore[name]·=·obj[name]; | 9 | ········var·func·=·underscore[name]·=·obj[name]; |
10 | ········underscore.prototype[name]·=·function()·{ | 10 | ········underscore.prototype[name]·=·function()·{ |
11 | ············var·args·=·[this._wrapped]; | 11 | ············var·args·=·[this._wrapped]; |
Offset 1, 14 lines modified | Offset 1, 14 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | 1 | var·restArguments·=·require('./index134.js'); |
2 | var·isFunction·=·require('./index89.js'); | 2 | var·isFunction·=·require('./index89.js'); |
3 | var·negate·=·require('./index115.js'); | 3 | var·negate·=·require('./index115.js'); |
4 | var·map·=·require('./index108.js'); | 4 | var·map·=·require('./index108.js'); |
5 | var·_flatten·=·require('./index15.js'); | 5 | var·_flatten·=·require('./index15.js'); |
6 | var·contains·=·require('./index44.js'); | 6 | var·contains·=·require('./index44.js'); |
7 | var·pick·=·require('./index12 | 7 | var·pick·=·require('./index124.js'); |
8 | //·Return·a·copy·of·the·object·without·the·disallowed·properties. | 8 | //·Return·a·copy·of·the·object·without·the·disallowed·properties. |
9 | var·omit·=·restArguments(function(obj,·keys)·{ | 9 | var·omit·=·restArguments(function(obj,·keys)·{ |
10 | ····var·iteratee·=·keys[0], | 10 | ····var·iteratee·=·keys[0], |
11 | ········context; | 11 | ········context; |
12 | ····if·(isFunction(iteratee))·{ | 12 | ····if·(isFunction(iteratee))·{ |
13 | ········iteratee·=·negate(iteratee); | 13 | ········iteratee·=·negate(iteratee); |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | //·Internal·list·of·HTML·entities·for·escaping. | ||
2 | var·escapeMap·=·{ | ||
3 | ····'&':·'&', | ||
4 | ····'<':·'<', | ||
5 | ····'>':·'>', | ||
6 | ····'"':·'"', | ||
7 | ····"'":·''', | ||
8 | ····'`':·'`' | ||
9 | 1 | //·Internal·function·to·obtain·a·nested·property·in·`obj`·along·`path`. | |
2 | function·deepGet(obj,·path)·{ | ||
3 | ····var·length·=·path.length; | ||
4 | ····for·(var·i·=·0;·i·<·length;·i++)·{ | ||
5 | ········if·(obj·==·null)·return·void·0; | ||
6 | ········obj·=·obj[path[i]]; | ||
7 | ····} | ||
8 | ····return·length·?·obj·:·void·0; | ||
9 | } | ||
10 | module.exports·=· | 10 | module.exports·=·deepGet; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·partial·=·require('./index12 | 1 | var·partial·=·require('./index123.js'); |
2 | var·before·=·require('./index35.js'); | 2 | var·before·=·require('./index35.js'); |
3 | //·Returns·a·function·that·will·be·executed·at·most·one·time,·no·matter·how | 3 | //·Returns·a·function·that·will·be·executed·at·most·one·time,·no·matter·how |
4 | //·often·you·call·it.·Useful·for·lazy·initialization. | 4 | //·often·you·call·it.·Useful·for·lazy·initialization. |
5 | var·once·=·partial(before,·2); | 5 | var·once·=·partial(before,·2); |
6 | module.exports·=·once; | 6 | module.exports·=·once; |
Offset 1, 26 lines modified | Offset 1, 9 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | ||
2 | var·_ | 1 | var·_group·=·require('./index18.js'); |
3 | var·underscore·=·require('./index150.js'); | ||
2 | //·Split·a·collection·into·two·arrays:·one·whose·elements·all·pass·the·given | ||
3 | //·truth·test,·and·one·whose·elements·all·do·not·pass·the·truth·test. | ||
4 | var·partition·=·_group(function(result,·value,·pass)·{ | ||
5 | ····result[pass·?·0·:·1].push(value); | ||
6 | },·true); | ||
4 | //·Partially·apply·a·function·by·creating·a·version·that·has·had·some·of·its | ||
5 | //·arguments·pre-filled,·without·changing·its·dynamic·`this`·context.·`_`·acts | ||
6 | //·as·a·placeholder·by·default,·allowing·any·combination·of·arguments·to·be | ||
7 | //·pre-filled.·Set·`_.partial.placeholder`·for·a·custom·placeholder·argument. | ||
8 | var·partial·=·restArguments(function(func,·boundArgs)·{ | ||
9 | ····var·placeholder·=·partial.placeholder; | ||
10 | ····var·bound·=·function()·{ | ||
11 | ········var·position·=·0, | ||
12 | ············length·=·boundArgs.length; | ||
13 | ········var·args·=·Array(length); | ||
14 | ········for·(var·i·=·0;·i·<·length;·i++)·{ | ||
15 | ············args[i]·=·boundArgs[i]·===·placeholder·?·arguments[position++]·:·boundArgs[i]; | ||
16 | ········} | ||
17 | ········while·(position·<·arguments.length)·args.push(arguments[position++]); | ||
18 | ········return·_executeBound(func,·bound,·this,·this,·args); | ||
19 | ····}; | ||
20 | ····return·bound; | ||
21 | }); | ||
22 | partial.placeholder·=·underscore; | ||
23 | module.exports·=·parti | 7 | module.exports·=·partition; |
Offset 1, 29 lines modified | Offset 1, 26 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | 1 | var·restArguments·=·require('./index134.js'); |
2 | var·isFunction·=·require('./index89.js'); | ||
3 | var·_optimizeCb·=·require('./index25.js'); | ||
4 | var·allKeys·=·require('./index34.js'); | ||
5 | var·_keyInObj·=·require('./index23.js'); | ||
6 | var·_ | 2 | var·_executeBound·=·require('./index14.js'); |
3 | var·underscore·=·require('./index148.js'); | ||
7 | //· | 4 | //·Partially·apply·a·function·by·creating·a·version·that·has·had·some·of·its |
5 | //·arguments·pre-filled,·without·changing·its·dynamic·`this`·context.·`_`·acts | ||
6 | //·as·a·placeholder·by·default,·allowing·any·combination·of·arguments·to·be | ||
7 | //·pre-filled.·Set·`_.partial.placeholder`·for·a·custom·placeholder·argument. | ||
8 | var·pi | 8 | var·partial·=·restArguments(function(func,·boundArgs)·{ |
9 | ····var·result·=·{}, | ||
10 | ········iteratee·=·keys[0]; | ||
11 | ····if·(obj·==·null)·return·result; | ||
12 | ····if·(isFunction(iteratee))·{ | ||
13 | ········if·(keys.length·>·1)·iteratee·=·_optimizeCb(iteratee,·keys[1]); | ||
14 | ········keys·=·allKeys(obj); | ||
15 | ····}·else·{ | ||
16 | ········iteratee·=·_keyInObj; | ||
17 | ········keys·=·_flatten(keys,·false,·false); | ||
18 | ····· | 9 | ····var·placeholder·=·partial.placeholder; |
10 | ····var·bound·=·function()·{ | ||
11 | ········var·position·=·0, | ||
12 | ············length·=·boundArgs.length; | ||
13 | ········var·args·=·Array(length); | ||
14 | ········for·(var·i·=·0;·i·<·length;·i++)·{ | ||
15 | ············args[i]·=·boundArgs[i]·===·placeholder·?·arguments[position++]·:·boundArgs[i]; | ||
16 | ········} | ||
17 | ········while·(position·<·arguments.length)·args.push(arguments[position++]); | ||
18 | ········return·_executeBound(func,·bound,·this,·this,·args); | ||
19 | ····} | 19 | ····}; |
20 | ····return·bound; | ||
20 | ····for·(var·i·=·0,·length·=·keys.length;·i·<·length;·i++)·{ | ||
21 | ········var·key·=·keys[i]; | ||
22 | ········var·value·=·obj[key]; | ||
23 | ········if·(iteratee(value,·key,·obj))·result[key]·=·value; | ||
24 | ····} | ||
25 | ····return·result; | ||
26 | }); | 21 | }); |
22 | partial.placeholder·=·underscore; | ||
27 | module.exports·=·pi | 23 | module.exports·=·partial; |
Offset 1, 9 lines modified | Offset 1, 29 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | ||
2 | var·isFunction·=·require('./index89.js'); | ||
3 | var·_optimizeCb·=·require('./index25.js'); | ||
4 | var·allKeys·=·require('./index34.js'); | ||
5 | var·_keyInObj·=·require('./index23.js'); | ||
1 | var· | 6 | var·_flatten·=·require('./index15.js'); |
2 | var·property·=·require('./index126.js'); | ||
3 | //·Convenience·version·of·a·common·use·case·of·`_.map`:·fetching·a·property. | ||
4 | function·pluck(obj,·key)·{ | ||
5 | ····return·map(obj,·property(key)); | ||
6 | 7 | //·Return·a·copy·of·the·object·only·containing·the·allowed·properties. | |
8 | var·pick·=·restArguments(function(obj,·keys)·{ | ||
9 | ····var·result·=·{}, | ||
10 | ········iteratee·=·keys[0]; | ||
11 | ····if·(obj·==·null)·return·result; | ||
12 | ····if·(isFunction(iteratee))·{ | ||
13 | ········if·(keys.length·>·1)·iteratee·=·_optimizeCb(iteratee,·keys[1]); | ||
14 | ········keys·=·allKeys(obj); | ||
15 | ····}·else·{ | ||
16 | ········iteratee·=·_keyInObj; | ||
17 | ········keys·=·_flatten(keys,·false,·false); | ||
18 | ········obj·=·Object(obj); | ||
19 | ····} | ||
20 | ····for·(var·i·=·0,·length·=·keys.length;·i·<·length;·i++)·{ | ||
21 | ········var·key·=·keys[i]; | ||
22 | ········var·value·=·obj[key]; | ||
23 | ········if·(iteratee(value,·key,·obj))·result[key]·=·value; | ||
24 | ····} | ||
25 | ····return·result; | ||
26 | }); | ||
7 | module.exports·=·p | 27 | module.exports·=·pick; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var· | 1 | var·map·=·require('./index108.js'); |
2 | var·property·=·require('./index126.js'); | ||
3 | //·Convenience·version·of·a·common·use·case·of·`_.map`:·fetching·a·property. | ||
4 | function·pluck(obj,·key)·{ | ||
5 | ····return·map(obj,·property(key)); | ||
6 | } | ||
2 | //·Split·a·collection·into·two·arrays:·one·whose·elements·all·pass·the·given | ||
3 | //·truth·test,·and·one·whose·elements·all·do·not·pass·the·truth·test. | ||
4 | var·partition·=·_group(function(result,·value,·pass)·{ | ||
5 | ····result[pass·?·0·:·1].push(value); | ||
6 | },·true); | ||
7 | module.exports·=·p | 7 | module.exports·=·pluck; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_deepGet·=·require('./index1 | 1 | var·_deepGet·=·require('./index12.js'); |
2 | var·_toPath·=·require('./index31.js'); | 2 | var·_toPath·=·require('./index31.js'); |
3 | //·Creates·a·function·that,·when·passed·an·object,·will·traverse·that·object’s | 3 | //·Creates·a·function·that,·when·passed·an·object,·will·traverse·that·object’s |
4 | //·properties·down·the·given·`path`,·specified·as·an·array·of·keys·or·indices. | 4 | //·properties·down·the·given·`path`,·specified·as·an·array·of·keys·or·indices. |
5 | function·property(path)·{ | 5 | function·property(path)·{ |
6 | ····path·=·_toPath(path); | 6 | ····path·=·_toPath(path); |
7 | ····return·function(obj)·{ | 7 | ····return·function(obj)·{ |
Offset 1, 6 lines modified | Offset 1, 10 lines modified | ||
1 | 1 | //·Return·a·random·integer·between·`min`·and·`max`·(inclusive). | |
2 | function·random(min,·max)·{ | ||
3 | ····if·(max·==·null)·{ | ||
4 | ········max·=·min; | ||
5 | ········min·=·0; | ||
6 | ····} | ||
7 | ····return·min·+·Math.floor(Math.random()·*·(max·-·min·+·1)); | ||
8 | } | ||
2 | //·The·right-associative·version·of·reduce,·also·known·as·`foldr`. | ||
3 | var·reduceRight·=·_createReduce(-1); | ||
4 | module.exports·=·r | 9 | module.exports·=·random; |
Offset 1, 10 lines modified | Offset 1, 23 lines modified | ||
1 | //·Return·a·random·integer·between·`min`·and·`max`·(inclusive). | ||
2 | 1 | //·Generate·an·integer·Array·containing·an·arithmetic·progression.·A·port·of | |
2 | //·the·native·Python·`range()`·function.·See | ||
3 | //·[the·Python·documentation](https://docs.python.org/library/functions.html#range). | ||
4 | function·range(start,·stop,·step)·{ | ||
3 | ····if·( | 5 | ····if·(stop·==·null)·{ |
4 | ········ | 6 | ········stop·=·start·||·0; |
5 | ········ | 7 | ········start·=·0; |
6 | ····} | 8 | ····} |
7 | ···· | 9 | ····if·(!step)·{ |
10 | ········step·=·stop·<·start·?·-1·:·1; | ||
11 | ····} | ||
12 | ····var·length·=·Math.max(Math.ceil((stop·-·start)·/·step),·0); | ||
13 | ····var·range·=·Array(length); | ||
14 | ····for·(var·idx·=·0;·idx·<·length;·idx++,·start·+=·step)·{ | ||
15 | ········range[idx]·=·start; | ||
16 | ····} | ||
17 | ····return·range; | ||
8 | } | 18 | } |
9 | module.exports·=·ran | 19 | module.exports·=·range; |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | //·Internal·function·to·obtain·a·nested·property·in·`obj`·along·`path`. | ||
2 | function·deepGet(obj,·path)·{ | ||
3 | ····var·length·=·path.length; | ||
4 | ····for·(var·i·=·0;·i·<·length;·i++)·{ | ||
5 | ········if·(obj·==·null)·return·void·0; | ||
6 | ········obj·=·obj[path[i]]; | ||
7 | ····} | ||
8 | ····return·length·?·obj·:·void·0; | ||
9 | 1 | //·Internal·list·of·HTML·entities·for·escaping. | |
2 | var·escapeMap·=·{ | ||
3 | ····'&':·'&', | ||
4 | ····'<':·'<', | ||
5 | ····'>':·'>', | ||
6 | ····'"':·'"', | ||
7 | ····"'":·''', | ||
8 | ····'`':·'`' | ||
9 | }; | ||
10 | module.exports·=· | 10 | module.exports·=·escapeMap; |
Offset 1, 10 lines modified | Offset 1, 7 lines modified | ||
1 | var·filter·=·require('./index57.js'); | ||
2 | var· | 1 | var·_createReduce·=·require('./index10.js'); |
3 | var·_cb·=·require('./index5.js'); | ||
2 | //·**Reduce**·builds·up·a·single·result·from·a·list·of·values,·aka·`inject`, | ||
3 | //·or·`foldl`. | ||
4 | var·reduce·=·_createReduce(1); | ||
4 | //·Return·all·the·elements·for·which·a·truth·test·fails. | ||
5 | function·reject(obj,·predicate,·context)·{ | ||
6 | ····return·filter(obj,·negate(_cb(predicate)),·context); | ||
7 | } | ||
8 | module.exports·=·re | 5 | module.exports·=·reduce; |
Offset 1, 7 lines modified | Offset 1, 6 lines modified | ||
1 | var·_createReduce·=·require('./index1 | 1 | var·_createReduce·=·require('./index10.js'); |
2 | //·The·right-associative·version·of·reduce,·also·known·as·`foldr`. | ||
2 | //·**Reduce**·builds·up·a·single·result·from·a·list·of·values,·aka·`inject`, | ||
3 | //·or·`foldl`. | ||
4 | var·reduce·=·_createReduce(1); | 3 | var·reduceRight·=·_createReduce(-1); |
5 | module.exports·=·reduce; | 4 | module.exports·=·reduceRight; |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·filter·=·require('./index57.js'); | ||
2 | var·negate·=·require('./index115.js'); | ||
1 | var·_ | 3 | var·_cb·=·require('./index3.js'); |
4 | //·Return·all·the·elements·for·which·a·truth·test·fails. | ||
5 | function·reject(obj,·predicate,·context)·{ | ||
6 | ····return·filter(obj,·negate(_cb(predicate)),·context); | ||
2 | //·Returns·everything·but·the·first·entry·of·the·`array`.·Especially·useful·on | ||
3 | //·the·`arguments`·object.·Passing·an·**n**·will·return·the·rest·N·values·in·the | ||
4 | //·`array`. | ||
5 | function·rest(array,·n,·guard)·{ | ||
6 | ····return·_setup.slice.call(array,·n·==·null·||·guard·?·1·:·n); | ||
7 | } | 7 | } |
8 | module.exports·=·re | 8 | module.exports·=·reject; |
Offset 1, 23 lines modified | Offset 1, 10 lines modified | ||
1 | var·_setup·=·require('./index26.js'); | ||
1 | //·Generate·an·integer·Array·containing·an·arithmetic·progression.·A·port·of | ||
2 | //·the·native·Python·`range()`·function.·See | ||
3 | //·[the·Python·documentation](https://docs.python.org/library/functions.html#range). | ||
4 | function·range(start,·stop,·step)·{ | ||
5 | ····if·(stop·==·null)·{ | ||
6 | ········stop·=·start·||·0; | ||
7 | ········start·=·0; | ||
8 | ····} | ||
9 | ····if·(!step)·{ | ||
10 | ········step·=·stop·<·start·?·-1·:·1; | ||
11 | ····} | ||
2 | //·Returns·everything·but·the·first·entry·of·the·`array`.·Especially·useful·on | ||
3 | //·the·`arguments`·object.·Passing·an·**n**·will·return·the·rest·N·values·in·the | ||
4 | //·`array`. | ||
5 | function·rest(array,·n,·guard)·{ | ||
6 | ····return·_setup.slice.call(array,·n·==·null·||·guard·?·1·:·n); | ||
12 | ····var·length·=·Math.max(Math.ceil((stop·-·start)·/·step),·0); | ||
13 | ····var·range·=·Array(length); | ||
14 | ····for·(var·idx·=·0;·idx·<·length;·idx++,·start·+=·step)·{ | ||
15 | ········range[idx]·=·start; | ||
16 | ····} | ||
17 | ····return·range; | ||
18 | } | 7 | } |
19 | module.exports·=·r | 8 | module.exports·=·rest; |
Offset 1, 24 lines modified | Offset 1, 29 lines modified | ||
1 | var·is | 1 | var·_isArrayLike·=·require('./index21.js'); |
2 | var·values·=·require('./index154.js'); | ||
2 | var·_t | 3 | var·_getLength·=·require('./index17.js'); |
4 | var·random·=·require('./index128.js'); | ||
5 | var·toArray·=·require('./index145.js'); | ||
3 | //·Traverses·the·children·of·`obj`·along·`path`.·If·a·child·is·a·function,·it | ||
4 | //·is·invoked·with·its·parent·as·context.·Returns·the·value·of·the·final | ||
5 | //·child,·or·`fallback`·if·any·child·is·undefined. | ||
6 | function·result(obj,·path,·fallback)·{ | ||
7 | ····path·=·_toPath(path); | ||
8 | ····var·length·=·path.length; | ||
9 | ····if·(!length)·{ | ||
10 | ·· | 6 | //·Sample·**n**·random·values·from·a·collection·using·the·modern·version·of·the |
7 | //·[Fisher-Yates·shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). | ||
8 | //·If·**n**·is·not·specified,·returns·a·single·random·element. | ||
9 | //·The·internal·`guard`·argument·allows·it·to·work·with·`_.map`. | ||
10 | function·sample(obj,·n,·guard)·{ | ||
11 | ····if·(n·==·null·||·guard)·{ | ||
12 | ········if·(!_isArrayLike(obj))·obj·=·values(obj); | ||
13 | ········return·obj[random(obj.length·-·1)]; | ||
11 | ····} | 14 | ····} |
15 | ····var·sample·=·toArray(obj); | ||
16 | ····var·length·=·_getLength(sample); | ||
17 | ····n·=·Math.max(Math.min(n,·length),·0); | ||
18 | ····var·last·=·length·-·1; | ||
12 | ····for·(var·i·=·0;·i·<· | 19 | ····for·(var·index·=·0;·index·<·n;·index++)·{ |
20 | ········var·rand·=·random(index,·last); | ||
21 | ········var·temp·=·sample[index]; | ||
22 | ········sample[index]·=·sample[rand]; | ||
23 | ········sample[rand]·=·temp; | ||
13 | ········var·prop·=·obj·==·null·?·void·0·:·obj[path[i]]; | ||
14 | ········if·(prop·===·void·0)·{ | ||
15 | ············prop·=·fallback; | ||
16 | ············i·=·length;·//·Ensure·we·don't·continue·iterating. | ||
17 | ········} | ||
18 | ········obj·=·isFunction(prop)·?·prop.call(obj)·:·prop; | ||
19 | ····} | 24 | ····} |
20 | ····return· | 25 | ····return·sample.slice(0,·n); |
21 | } | 26 | } |
22 | module.exports·=· | 27 | module.exports·=·sample; |
Offset 1, 29 lines modified | Offset 1, 24 lines modified | ||
1 | var· | 1 | var·isFunction·=·require('./index89.js'); |
2 | var·values·=·require('./index156.js'); | ||
3 | var·_ | 2 | var·_toPath·=·require('./index31.js'); |
4 | var·random·=·require('./index129.js'); | ||
5 | var·toArray·=·require('./index147.js'); | ||
6 | //·Sample·**n**·random·values·from·a·collection·using·the·modern·version·of·the | ||
7 | //·[Fisher-Yates·shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). | ||
8 | //·If·**n**·is·not·specified,·returns·a·single·random·element. | ||
9 | //·The·internal·`guard`·argument·allows·it·to·work·with·`_.map`. | ||
10 | function·sample(obj,·n,·guard)·{ | ||
11 | ····if·(n·==·null·||·guard)·{ | ||
12 | ········if·(!_isArrayLike(obj))·obj·=·values(obj); | ||
13 | 3 | //·Traverses·the·children·of·`obj`·along·`path`.·If·a·child·is·a·function,·it | |
4 | //·is·invoked·with·its·parent·as·context.·Returns·the·value·of·the·final | ||
5 | //·child,·or·`fallback`·if·any·child·is·undefined. | ||
6 | function·result(obj,·path,·fallback)·{ | ||
7 | ····path·=·_toPath(path); | ||
8 | ····var·length·=·path.length; | ||
9 | ····if·(!length)·{ | ||
10 | ········return·isFunction(fallback)·?·fallback.call(obj)·:·fallback; | ||
14 | ····} | 11 | ····} |
15 | ····var·sample·=·toArray(obj); | ||
16 | ····var·length·=·_getLength(sample); | ||
17 | ····n·=·Math.max(Math.min(n,·length),·0); | ||
18 | ····var·last·=·length·-·1; | ||
19 | ····for·(var·i | 12 | ····for·(var·i·=·0;·i·<·length;·i++)·{ |
20 | ········var·rand·=·random(index,·last); | ||
21 | ········var·temp·=·sample[index]; | ||
22 | ········sample[index]·=·sample[rand]; | ||
23 | ········ | 13 | ········var·prop·=·obj·==·null·?·void·0·:·obj[path[i]]; |
14 | ········if·(prop·===·void·0)·{ | ||
15 | ············prop·=·fallback; | ||
16 | ············i·=·length;·//·Ensure·we·don't·continue·iterating. | ||
17 | ········} | ||
18 | ········obj·=·isFunction(prop)·?·prop.call(obj)·:·prop; | ||
24 | ····} | 19 | ····} |
25 | ····return· | 20 | ····return·obj; |
26 | } | 21 | } |
27 | module.exports·=· | 22 | module.exports·=·result; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·sample·=·require('./index13 | 1 | var·sample·=·require('./index135.js'); |
2 | //·Shuffle·a·collection. | 2 | //·Shuffle·a·collection. |
3 | function·shuffle(obj)·{ | 3 | function·shuffle(obj)·{ |
4 | ····return·sample(obj,·Infinity); | 4 | ····return·sample(obj,·Infinity); |
5 | } | 5 | } |
6 | module.exports·=·shuffle; | 6 | module.exports·=·shuffle; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·_isArrayLike·=·require('./index21.js'); | 2 | var·_isArrayLike·=·require('./index21.js'); |
3 | var·keys·=·require('./index105.js'); | 3 | var·keys·=·require('./index105.js'); |
4 | //·Determine·if·at·least·one·element·in·the·object·passes·a·truth·test. | 4 | //·Determine·if·at·least·one·element·in·the·object·passes·a·truth·test. |
5 | function·some(obj,·predicate,·context)·{ | 5 | function·some(obj,·predicate,·context)·{ |
6 | ····predicate·=·_cb(predicate,·context); | 6 | ····predicate·=·_cb(predicate,·context); |
7 | ····var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | 7 | ····var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·_baseCreate·=·require('./index.js'); | 1 | var·_baseCreate·=·require('./index.js'); |
2 | var·isObject·=·require('./index9 | 2 | var·isObject·=·require('./index94.js'); |
3 | //·Internal·function·to·execute·`sourceFunc`·bound·to·`context`·with·optional | 3 | //·Internal·function·to·execute·`sourceFunc`·bound·to·`context`·with·optional |
4 | //·`args`.·Determines·whether·to·execute·a·function·as·a·constructor·or·as·a | 4 | //·`args`.·Determines·whether·to·execute·a·function·as·a·constructor·or·as·a |
5 | //·normal·function. | 5 | //·normal·function. |
6 | function·executeBound(sourceFunc,·boundFunc,·context,·callingContext,·args)·{ | 6 | function·executeBound(sourceFunc,·boundFunc,·context,·callingContext,·args)·{ |
7 | ····if·(!(callingContext·instanceof·boundFunc))·return·sourceFunc.apply(context,·args); | 7 | ····if·(!(callingContext·instanceof·boundFunc))·return·sourceFunc.apply(context,·args); |
8 | ····var·self·=·_baseCreate(sourceFunc.prototype); | 8 | ····var·self·=·_baseCreate(sourceFunc.prototype); |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·pluck·=·require('./index12 | 2 | var·pluck·=·require('./index125.js'); |
3 | var·map·=·require('./index108.js'); | 3 | var·map·=·require('./index108.js'); |
4 | //·Sort·the·object's·values·by·a·criterion·produced·by·an·iteratee. | 4 | //·Sort·the·object's·values·by·a·criterion·produced·by·an·iteratee. |
5 | function·sortBy(obj,·iteratee,·context)·{ | 5 | function·sortBy(obj,·iteratee,·context)·{ |
6 | ····var·index·=·0; | 6 | ····var·index·=·0; |
7 | ····iteratee·=·_cb(iteratee,·context); | 7 | ····iteratee·=·_cb(iteratee,·context); |
8 | ····return·pluck(map(obj,·function(value,·key,·list)·{ | 8 | ····return·pluck(map(obj,·function(value,·key,·list)·{ |
Offset 1, 9 lines modified | Offset 1, 19 lines modified | ||
1 | //·Invokes·`interceptor`·with·the·`obj`·and·then·returns·`obj`. | ||
2 | //·The·primary·purpose·of·this·method·is·to·"tap·into"·a·method·chain,·in | ||
3 | //·order·to·perform·operations·on·intermediate·results·within·the·chain. | ||
4 | function·tap(obj,·interceptor)·{ | ||
5 | ··· | 1 | var·_cb·=·require('./index3.js'); |
2 | var·_getLength·=·require('./index17.js'); | ||
3 | //·Use·a·comparator·function·to·figure·out·the·smallest·index·at·which | ||
4 | //·an·object·should·be·inserted·so·as·to·maintain·order.·Uses·binary·search. | ||
5 | function·sortedIndex(array,·obj,·iteratee,·context)·{ | ||
6 | ····iteratee·=·_cb(iteratee,·context,·1); | ||
7 | ····var·value·=·iteratee(obj); | ||
8 | ····var·low·=·0, | ||
9 | ········high·=·_getLength(array); | ||
10 | ····while·(low·<·high)·{ | ||
11 | ········var·mid·=·Math.floor((low·+·high)·/·2); | ||
12 | ········if·(iteratee(array[mid])·<·value)·low·=·mid·+·1; | ||
13 | ········else·high·=·mid; | ||
14 | ····} | ||
6 | ····return· | 15 | ····return·low; |
7 | } | 16 | } |
8 | module.exports·=·t | 17 | module.exports·=·sortedIndex; |
Offset 1, 19 lines modified | Offset 1, 9 lines modified | ||
1 | //·Invokes·`interceptor`·with·the·`obj`·and·then·returns·`obj`. | ||
2 | //·The·primary·purpose·of·this·method·is·to·"tap·into"·a·method·chain,·in | ||
3 | //·order·to·perform·operations·on·intermediate·results·within·the·chain. | ||
4 | function·tap(obj,·interceptor)·{ | ||
5 | ····interceptor(obj); | ||
1 | var·_cb·=·require('./index5.js'); | ||
2 | var·_getLength·=·require('./index17.js'); | ||
3 | //·Use·a·comparator·function·to·figure·out·the·smallest·index·at·which | ||
4 | //·an·object·should·be·inserted·so·as·to·maintain·order.·Uses·binary·search. | ||
5 | function·sortedIndex(array,·obj,·iteratee,·context)·{ | ||
6 | ····iteratee·=·_cb(iteratee,·context,·1); | ||
7 | ····var·value·=·iteratee(obj); | ||
8 | ····var·low·=·0, | ||
9 | ········high·=·_getLength(array); | ||
10 | ····while·(low·<·high)·{ | ||
11 | ········var·mid·=·Math.floor((low·+·high)·/·2); | ||
12 | ········if·(iteratee(array[mid])·<·value)·low·=·mid·+·1; | ||
13 | ········else·high·=·mid; | ||
14 | ····} | ||
15 | ····return· | 6 | ····return·obj; |
16 | } | 7 | } |
17 | module.exports·=· | 8 | module.exports·=·tap; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·defaults·=·require('./index48.js'); | 1 | var·defaults·=·require('./index48.js'); |
2 | var·underscore·=·require('./index1 | 2 | var·underscore·=·require('./index148.js'); |
3 | require('./index144.js'); | 3 | require('./index144.js'); |
4 | //·When·customizing·`_.templateSettings`,·if·you·don't·want·to·define·an | 4 | //·When·customizing·`_.templateSettings`,·if·you·don't·want·to·define·an |
5 | //·interpolation,·evaluation·or·escaping·regex,·we·need·one·that·is | 5 | //·interpolation,·evaluation·or·escaping·regex,·we·need·one·that·is |
6 | //·guaranteed·not·to·match. | 6 | //·guaranteed·not·to·match. |
7 | var·noMatch·=·/(.)^/; | 7 | var·noMatch·=·/(.)^/; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·underscore·=·require('./index1 | 1 | var·underscore·=·require('./index148.js'); |
2 | //·By·default,·Underscore·uses·ERB-style·template·delimiters.·Change·the | 2 | //·By·default,·Underscore·uses·ERB-style·template·delimiters.·Change·the |
3 | //·following·template·settings·to·use·alternative·delimiters. | 3 | //·following·template·settings·to·use·alternative·delimiters. |
4 | var·templateSettings·=·underscore.templateSettings·=·{ | 4 | var·templateSettings·=·underscore.templateSettings·=·{ |
5 | ····evaluate:·/<%([\s\S]+?)%>/g, | 5 | ····evaluate:·/<%([\s\S]+?)%>/g, |
6 | ····interpolate:·/<%=([\s\S]+?)%>/g, | 6 | ····interpolate:·/<%=([\s\S]+?)%>/g, |
7 | ····escape:·/<%-([\s\S]+?)%>/g | 7 | ····escape:·/<%-([\s\S]+?)%>/g |
Offset 1, 49 lines modified | Offset 1, 23 lines modified | ||
1 | var·isArray·=·require('./index80.js'); | ||
2 | var·_setup·=·require('./index26.js'); | ||
3 | var·isString·=·require('./index98.js'); | ||
4 | var·_isArrayLike·=·require('./index21.js'); | ||
1 | var· | 5 | var·map·=·require('./index108.js'); |
6 | var·identity·=·require('./index69.js'); | ||
7 | var·values·=·require('./index154.js'); | ||
8 | //·Safely·create·a·real,·live·array·from·anything·iterable. | ||
9 | var·reStrSymbol·=·/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; | ||
2 | //·Returns·a·function,·that,·when·invoked,·will·only·be·triggered·at·most·once | ||
3 | //·during·a·given·window·of·time.·Normally,·the·throttled·function·will·run | ||
4 | //·as·much·as·it·can,·without·ever·going·more·than·once·per·`wait`·duration; | ||
5 | //·but·if·you'd·like·to·disable·the·execution·on·the·leading·edge,·pass | ||
6 | //·`{leading:·false}`.·To·disable·execution·on·the·trailing·edge,·ditto. | ||
7 | function·throttle(func,·wait,·options)·{ | ||
8 | ····var·timeout,·context,·args,·result; | ||
9 | ····var·previous·=·0; | ||
10 | ····if·(!options)·options·=·{}; | ||
11 | ····var·later·=·function()·{ | ||
12 | ········previous·=·options.leading·===·false·?·0·:·now(); | ||
13 | ········timeout·=·null; | ||
14 | ········result·=·func.apply(context,·args); | ||
15 | 10 | function·toArray(obj)·{ | |
11 | ····if·(!obj)·return·[]; | ||
12 | ····if·(isArray(obj))·return·_setup.slice.call(obj); | ||
13 | ····if·(isString(obj))·{ | ||
14 | ········//·Keep·surrogate·pair·characters·together. | ||
15 | ········return·obj.match(reStrSymbol); | ||
16 | ····} | 16 | ····} |
17 | ····if·(_isArrayLike(obj))·return·map(obj,·identity); | ||
18 | ····return·values(obj); | ||
17 | ····var·throttled·=·function()·{ | ||
18 | ········var·_now·=·now(); | ||
19 | ········if·(!previous·&&·options.leading·===·false)·previous·=·_now; | ||
20 | ········var·remaining·=·wait·-·(_now·-·previous); | ||
21 | ········context·=·this; | ||
22 | ········args·=·arguments; | ||
23 | ········if·(remaining·<=·0·||·remaining·>·wait)·{ | ||
24 | ············if·(timeout)·{ | ||
25 | ················clearTimeout(timeout); | ||
26 | ················timeout·=·null; | ||
27 | ············} | ||
28 | ············previous·=·_now; | ||
29 | ············result·=·func.apply(context,·args); | ||
30 | ············if·(!timeout)·context·=·args·=·null; | ||
31 | ········}·else·if·(!timeout·&&·options.trailing·!==·false)·{ | ||
32 | ············timeout·=·setTimeout(later,·remaining); | ||
33 | ········} | ||
34 | ········return·result; | ||
35 | ····}; | ||
36 | ····throttled.cancel·=·function()·{ | ||
37 | ········clearTimeout(timeout); | ||
38 | ········previous·=·0; | ||
39 | ········timeout·=·context·=·args·=·null; | ||
40 | ····}; | ||
41 | ····return·throttled; | ||
42 | } | 19 | } |
43 | module.exports·=·t | 20 | module.exports·=·toArray; |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | var·underscore·=·require('./index148.js'); | ||
1 | var· | 2 | var·isArray·=·require('./index80.js'); |
3 | //·Normalize·a·(deep)·property·`path`·to·array. | ||
4 | //·Like·`_.iteratee`,·this·function·can·be·customized. | ||
5 | function·toPath(path)·{ | ||
6 | ····return·isArray(path)·?·path·:·[path]; | ||
2 | //·Run·a·function·**n**·times. | ||
3 | function·times(n,·iteratee,·context)·{ | ||
4 | ····var·accum·=·Array(Math.max(0,·n)); | ||
5 | ····iteratee·=·_optimizeCb(iteratee,·context,·1); | ||
6 | ····for·(var·i·=·0;·i·<·n;·i++)·accum[i]·=·iteratee(i); | ||
7 | ····return·accum; | ||
8 | } | 7 | } |
8 | underscore.toPath·=·toPath; | ||
9 | module.exports·=·t | 9 | module.exports·=·toPath; |
Offset 1, 23 lines modified | Offset 1, 31 lines modified | ||
1 | var·underscore·=·require('./index148.js'); | ||
1 | var· | 2 | var·each·=·require('./index52.js'); |
2 | var·_setup·=·require('./index26.js'); | 3 | var·_setup·=·require('./index26.js'); |
3 | var·isString·=·require('./index98.js'); | ||
4 | var·_isArrayLike·=·require('./index21.js'); | ||
5 | var·map·=·require('./index108.js'); | ||
6 | var·identity·=·require('./index69.js'); | ||
7 | var· | 4 | var·_chainResult·=·require('./index4.js'); |
8 | //·Safely·create·a·real,·live·array·from·anything·iterable. | ||
9 | 5 | //·Add·all·mutator·`Array`·functions·to·the·wrapper. | |
6 | each(['pop',·'push',·'reverse',·'shift',·'sort',·'splice',·'unshift'],·function(name)·{ | ||
7 | ····var·method·=·_setup.ArrayProto[name]; | ||
8 | ····underscore.prototype[name]·=·function()·{ | ||
9 | ········var·obj·=·this._wrapped; | ||
10 | ········if·(obj·!=·null)·{ | ||
11 | ············method.apply(obj,·arguments); | ||
12 | ············if·((name·===·'shift'·||·name·===·'splice')·&&·obj.length·===·0)·{ | ||
13 | ················delete·obj[0]; | ||
14 | ············} | ||
15 | ········} | ||
16 | ········return·_chainResult(this,·obj); | ||
17 | ····}; | ||
18 | }); | ||
10 | function·toArray(obj)·{ | ||
11 | ····if·(!obj)·return·[]; | ||
12 | ····if·(isArray(obj))·return·_setup.slice.call(obj); | ||
13 | ····if·(isString(obj))·{ | ||
14 | ········//·Keep·surrogate·pair·characters·together. | ||
15 | ··· | 19 | //·Add·all·accessor·`Array`·functions·to·the·wrapper. |
20 | each(['concat',·'join',·'slice'],·function(name)·{ | ||
21 | ····var·method·=·_setup.ArrayProto[name]; | ||
22 | ····underscore.prototype[name]·=·function()·{ | ||
23 | ········var·obj·=·this._wrapped; | ||
24 | ········if·(obj·!=·null)·obj·=·method.apply(obj,·arguments); | ||
25 | ········return·_chainResult(this,·obj); | ||
16 | ····} | 26 | ····}; |
27 | }); | ||
17 | ····if·(_isArrayLike(obj))·return·map(obj,·identity); | ||
18 | ····return·values(obj); | ||
19 | } | ||
20 | module.exports·=· | 28 | module.exports·=·underscore; |
Offset 1, 11 lines modified | Offset 1, 27 lines modified | ||
1 | var·underscore·=·require('./index150.js'); | ||
2 | var· | 1 | var·_setup·=·require('./index26.js'); |
3 | //·Normalize·a·(deep)·property·`path`·to·array. | ||
4 | //·Like·`_.iteratee`,·this·function·can·be·customized. | ||
5 | function·toPath(path)·{ | ||
6 | ·· | 2 | //·If·Underscore·is·called·as·a·function,·it·returns·a·wrapped·object·that·can |
3 | //·be·used·OO-style.·This·wrapper·holds·altered·versions·of·all·functions·added | ||
4 | //·through·`_.mixin`.·Wrapped·objects·may·be·chained. | ||
5 | function·_(obj)·{ | ||
6 | ····if·(obj·instanceof·_)·return·obj; | ||
7 | ····if·(!(this·instanceof·_))·return·new·_(obj); | ||
8 | ····this._wrapped·=·obj; | ||
7 | } | 9 | } |
8 | underscore.toPath·=·toPath; | ||
10 | _.VERSION·=·_setup.VERSION; | ||
11 | //·Extracts·the·result·from·a·wrapped·and·chained·object. | ||
12 | _.prototype.value·=·function()·{ | ||
13 | ····return·this._wrapped; | ||
14 | }; | ||
15 | //·Provide·unwrapping·proxies·for·some·methods·used·in·engine·operations | ||
16 | //·such·as·arithmetic·and·JSON·stringification. | ||
17 | _.prototype.valueOf·=·_.prototype.toJSON·=·_.prototype.value; | ||
18 | _.prototype.toString·=·function()·{ | ||
19 | ····return·String(this._wrapped); | ||
20 | }; | ||
9 | module.exports·=· | 21 | module.exports·=·_; |
Offset 1, 31 lines modified | Offset 1, 7 lines modified | ||
1 | var·underscore·=·require('./index150.js'); | ||
2 | var·eac | 1 | var·_createEscaper·=·require('./index7.js'); |
3 | var·_se | 2 | var·_unescapeMap·=·require('./index32.js'); |
4 | var·_chainResult·=·require('./index2.js'); | ||
3 | //·Function·for·unescaping·strings·from·HTML·interpolation. | ||
4 | var·unescape·=·_createEscaper(_unescapeMap); | ||
5 | //·Add·all·mutator·`Array`·functions·to·the·wrapper. | ||
6 | each(['pop',·'push',·'reverse',·'shift',·'sort',·'splice',·'unshift'],·function(name)·{ | ||
7 | ····var·method·=·_setup.ArrayProto[name]; | ||
8 | ····underscore.prototype[name]·=·function()·{ | ||
9 | ········var·obj·=·this._wrapped; | ||
10 | ········if·(obj·!=·null)·{ | ||
11 | ············method.apply(obj,·arguments); | ||
12 | ············if·((name·===·'shift'·||·name·===·'splice')·&&·obj.length·===·0)·{ | ||
13 | ················delete·obj[0]; | ||
14 | ············} | ||
15 | ········} | ||
16 | ········return·_chainResult(this,·obj); | ||
17 | ····}; | ||
18 | }); | ||
19 | //·Add·all·accessor·`Array`·functions·to·the·wrapper. | ||
20 | each(['concat',·'join',·'slice'],·function(name)·{ | ||
21 | ····var·method·=·_setup.ArrayProto[name]; | ||
22 | ····underscore.prototype[name]·=·function()·{ | ||
23 | ········var·obj·=·this._wrapped; | ||
24 | ········if·(obj·!=·null)·obj·=·method.apply(obj,·arguments); | ||
25 | ········return·_chainResult(this,·obj); | ||
26 | ····}; | ||
27 | }); | ||
28 | module.exports·=·un | 5 | module.exports·=·unescape; |
Offset 1, 27 lines modified | Offset 1, 11 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | ||
1 | var· | 2 | var·uniq·=·require('./index151.js'); |
3 | var·_flatten·=·require('./index15.js'); | ||
4 | //·Produce·an·array·that·contains·the·union:·each·distinct·element·from·all·of | ||
5 | //·the·passed-in·arrays. | ||
6 | var·union·=·restArguments(function(arrays)·{ | ||
7 | ····return·uniq(_flatten(arrays,·true,·true)); | ||
8 | }); | ||
2 | //·If·Underscore·is·called·as·a·function,·it·returns·a·wrapped·object·that·can | ||
3 | //·be·used·OO-style.·This·wrapper·holds·altered·versions·of·all·functions·added | ||
4 | //·through·`_.mixin`.·Wrapped·objects·may·be·chained. | ||
5 | function·_(obj)·{ | ||
6 | ····if·(obj·instanceof·_)·return·obj; | ||
7 | ····if·(!(this·instanceof·_))·return·new·_(obj); | ||
8 | ····this._wrapped·=·obj; | ||
9 | } | ||
10 | _.VERSION·=·_setup.VERSION; | ||
11 | //·Extracts·the·result·from·a·wrapped·and·chained·object. | ||
12 | _.prototype.value·=·function()·{ | ||
13 | ····return·this._wrapped; | ||
14 | }; | ||
15 | //·Provide·unwrapping·proxies·for·some·methods·used·in·engine·operations | ||
16 | //·such·as·arithmetic·and·JSON·stringification. | ||
17 | _.prototype.valueOf·=·_.prototype.toJSON·=·_.prototype.value; | ||
18 | _.prototype.toString·=·function()·{ | ||
19 | ····return·String(this._wrapped); | ||
20 | }; | ||
21 | module.exports·=· | 9 | module.exports·=·union; |
Offset 1, 7 lines modified | Offset 1, 38 lines modified | ||
1 | var· | 1 | var·isBoolean·=·require('./index81.js'); |
2 | var·_ | 2 | var·_cb·=·require('./index3.js'); |
3 | var·_getLength·=·require('./index17.js'); | ||
4 | var·contains·=·require('./index44.js'); | ||
3 | //·Function·for·unescaping·strings·from·HTML·interpolation. | ||
4 | 5 | //·Produce·a·duplicate-free·version·of·the·array.·If·the·array·has·already | |
6 | //·been·sorted,·you·have·the·option·of·using·a·faster·algorithm. | ||
7 | //·The·faster·algorithm·will·not·work·with·an·iteratee·if·the·iteratee | ||
8 | //·is·not·a·one-to-one·function,·so·providing·an·iteratee·will·disable | ||
9 | //·the·faster·algorithm. | ||
10 | function·uniq(array,·isSorted,·iteratee,·context)·{ | ||
11 | ····if·(!isBoolean(isSorted))·{ | ||
12 | ········context·=·iteratee; | ||
13 | ········iteratee·=·isSorted; | ||
14 | ········isSorted·=·false; | ||
15 | ····} | ||
16 | ····if·(iteratee·!=·null)·iteratee·=·_cb(iteratee,·context); | ||
17 | ····var·result·=·[]; | ||
18 | ····var·seen·=·[]; | ||
19 | ····for·(var·i·=·0,·length·=·_getLength(array);·i·<·length;·i++)·{ | ||
20 | ········var·value·=·array[i], | ||
21 | ············computed·=·iteratee·?·iteratee(value,·i,·array)·:·value; | ||
22 | ········if·(isSorted·&&·!iteratee)·{ | ||
23 | ············if·(!i·||·seen·!==·computed)·result.push(value); | ||
24 | ············seen·=·computed; | ||
25 | ········}·else·if·(iteratee)·{ | ||
26 | ············if·(!contains(seen,·computed))·{ | ||
27 | ················seen.push(computed); | ||
28 | ················result.push(value); | ||
29 | ············} | ||
30 | ········}·else·if·(!contains(result,·value))·{ | ||
31 | ············result.push(value); | ||
32 | ········} | ||
33 | ····} | ||
34 | ····return·result; | ||
35 | } | ||
5 | module.exports·=·un | 36 | module.exports·=·uniq; |
Offset 1, 11 lines modified | Offset 1, 10 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | ||
2 | var·uniq·=·require('./index153.js'); | ||
3 | 1 | //·Generate·a·unique·integer·id·(unique·within·the·entire·client·session). | |
2 | //·Useful·for·temporary·DOM·ids. | ||
3 | var·idCounter·=·0; | ||
4 | function·uniqueId(prefix)·{ | ||
5 | ····var·id·=·++idCounter·+·''; | ||
6 | ····return·prefix·?·prefix·+·id·:·id; | ||
7 | } | ||
4 | //·Produce·an·array·that·contains·the·union:·each·distinct·element·from·all·of | ||
5 | //·the·passed-in·arrays. | ||
6 | var·union·=·restArguments(function(arrays)·{ | ||
7 | ····return·uniq(_flatten(arrays,·true,·true)); | ||
8 | }); | ||
9 | module.exports·=·uni | 8 | module.exports·=·uniqueId; |
Offset 1, 38 lines modified | Offset 1, 17 lines modified | ||
1 | var·isBoolean·=·require('./index81.js'); | ||
2 | var· | 1 | var·max·=·require('./index111.js'); |
3 | var·_getLength·=·require('./index17.js'); | 2 | var·_getLength·=·require('./index17.js'); |
4 | var· | 3 | var·pluck·=·require('./index125.js'); |
4 | //·Complement·of·zip.·Unzip·accepts·an·array·of·arrays·and·groups | ||
5 | //·each·array's·elements·on·shared·indices. | ||
6 | function·unzip(array)·{ | ||
7 | ····var·length·=·(array·&&·max(array,·_getLength).length)·||·0; | ||
8 | ····var·result·=·Array(length); | ||
9 | ····for·(var·index·=·0;·index·<·length;·index++)·{ | ||
10 | ········result[index]·=·pluck(array,·index); | ||
5 | //·Produce·a·duplicate-free·version·of·the·array.·If·the·array·has·already | ||
6 | //·been·sorted,·you·have·the·option·of·using·a·faster·algorithm. | ||
7 | //·The·faster·algorithm·will·not·work·with·an·iteratee·if·the·iteratee | ||
8 | //·is·not·a·one-to-one·function,·so·providing·an·iteratee·will·disable | ||
9 | //·the·faster·algorithm. | ||
10 | function·uniq(array,·isSorted,·iteratee,·context)·{ | ||
11 | ····if·(!isBoolean(isSorted))·{ | ||
12 | ········context·=·iteratee; | ||
13 | ········iteratee·=·isSorted; | ||
14 | ········isSorted·=·false; | ||
15 | ····} | ||
16 | ····if·(iteratee·!=·null)·iteratee·=·_cb(iteratee,·context); | ||
17 | ····var·result·=·[]; | ||
18 | ····var·seen·=·[]; | ||
19 | ····for·(var·i·=·0,·length·=·_getLength(array);·i·<·length;·i++)·{ | ||
20 | ········var·value·=·array[i], | ||
21 | ············computed·=·iteratee·?·iteratee(value,·i,·array)·:·value; | ||
22 | ········if·(isSorted·&&·!iteratee)·{ | ||
23 | ············if·(!i·||·seen·!==·computed)·result.push(value); | ||
24 | ············seen·=·computed; | ||
25 | ········}·else·if·(iteratee)·{ | ||
26 | ············if·(!contains(seen,·computed))·{ | ||
27 | ················seen.push(computed); | ||
28 | ················result.push(value); | ||
29 | ············} | ||
30 | ········}·else·if·(!contains(result,·value))·{ | ||
31 | ············result.push(value); | ||
32 | ········} | ||
33 | ····} | 11 | ····} |
34 | ····return·result; | 12 | ····return·result; |
35 | } | 13 | } |
36 | module.exports·=·uni | 14 | module.exports·=·unzip; |
Offset 1, 10 lines modified | Offset 1, 14 lines modified | ||
1 | var·keys·=·require('./index105.js'); | ||
1 | //·Generate·a·unique·integer·id·(unique·within·the·entire·client·session). | ||
2 | //·Useful·for·temporary·DOM·ids. | ||
3 | var·idCounter·=·0; | ||
4 | function·uniqueId(prefix)·{ | ||
5 | ····var·id·=·++idCounter·+·''; | ||
6 | · | 2 | //·Retrieve·the·values·of·an·object's·properties. |
3 | function·values(obj)·{ | ||
4 | ····var·_keys·=·keys(obj); | ||
5 | ····var·length·=·_keys.length; | ||
6 | ····var·values·=·Array(length); | ||
7 | ····for·(var·i·=·0;·i·<·length;·i++)·{ | ||
8 | ········values[i]·=·obj[_keys[i]]; | ||
9 | ····} | ||
10 | ····return·values; | ||
7 | } | 11 | } |
8 | module.exports·=· | 12 | module.exports·=·values; |
Offset 1, 17 lines modified | Offset 1, 10 lines modified | ||
1 | var·filter·=·require('./index57.js'); | ||
1 | var·ma | 2 | var·matcher·=·require('./index109.js'); |
2 | var·_getLength·=·require('./index17.js'); | ||
3 | var·pluck·=·require('./index124.js'); | ||
3 | //·Convenience·version·of·a·common·use·case·of·`_.filter`:·selecting·only | ||
4 | //·objects·containing·specific·`key:value`·pairs. | ||
5 | function·where(obj,·attrs)·{ | ||
6 | ····return·filter(obj,·matcher(attrs)); | ||
4 | //·Complement·of·zip.·Unzip·accepts·an·array·of·arrays·and·groups | ||
5 | //·each·array's·elements·on·shared·indices. | ||
6 | function·unzip(array)·{ | ||
7 | ····var·length·=·(array·&&·max(array,·_getLength).length)·||·0; | ||
8 | ····var·result·=·Array(length); | ||
9 | ····for·(var·index·=·0;·index·<·length;·index++)·{ | ||
10 | ········result[index]·=·pluck(array,·index); | ||
11 | ····} | ||
12 | ····return·result; | ||
13 | } | 7 | } |
14 | module.exports·=· | 8 | module.exports·=·where; |
Offset 1, 14 lines modified | Offset 1, 9 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | ||
1 | var· | 2 | var·difference·=·require('./index51.js'); |
3 | //·Return·a·version·of·the·array·that·does·not·contain·the·specified·value(s). | ||
4 | var·without·=·restArguments(function(array,·otherArrays)·{ | ||
5 | ····return·difference(array,·otherArrays); | ||
6 | }); | ||
2 | //·Retrieve·the·values·of·an·object's·properties. | ||
3 | function·values(obj)·{ | ||
4 | ····var·_keys·=·keys(obj); | ||
5 | ····var·length·=·_keys.length; | ||
6 | ····var·values·=·Array(length); | ||
7 | ····for·(var·i·=·0;·i·<·length;·i++)·{ | ||
8 | ········values[i]·=·obj[_keys[i]]; | ||
9 | ····} | ||
10 | ····return·values; | ||
11 | } | ||
12 | module.exports·=· | 7 | module.exports·=·without; |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·filter·=·require('./index57.js'); | ||
2 | var· | 1 | var·partial·=·require('./index123.js'); |
3 | //·Convenience·version·of·a·common·use·case·of·`_.filter`:·selecting·only | ||
4 | //·objects·containing·specific·`key:value`·pairs. | ||
5 | function·where(obj,·attrs)·{ | ||
6 | 2 | //·Returns·the·first·function·passed·as·an·argument·to·the·second, | |
3 | //·allowing·you·to·adjust·arguments,·run·code·before·and·after,·and | ||
4 | //·conditionally·execute·the·original·function. | ||
5 | function·wrap(func,·wrapper)·{ | ||
6 | ····return·partial(wrapper,·func); | ||
7 | } | 7 | } |
8 | module.exports·=·w | 8 | module.exports·=·wrap; |
Offset 1, 9 lines modified | Offset 1, 8 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | 1 | var·restArguments·=·require('./index134.js'); |
2 | var· | 2 | var·unzip·=·require('./index153.js'); |
3 | //·Zip·together·multiple·lists·into·a·single·array·--·elements·that·share | ||
4 | //·an·index·go·together. | ||
5 | var·zip·=·restArguments(unzip); | ||
3 | //·Return·a·version·of·the·array·that·does·not·contain·the·specified·value(s). | ||
4 | var·without·=·restArguments(function(array,·otherArrays)·{ | ||
5 | ····return·difference(array,·otherArrays); | ||
6 | }); | ||
7 | module.exports·=· | 6 | module.exports·=·zip; |
Offset 1, 8 lines modified | Offset 1, 49 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | ||
2 | var· | 1 | var·now·=·require('./index117.js'); |
3 | //·Zip·together·multiple·lists·into·a·single·array·--·elements·that·share | ||
4 | //·an·index·go·together. | ||
5 | v | 2 | //·Returns·a·function,·that,·when·invoked,·will·only·be·triggered·at·most·once |
3 | //·during·a·given·window·of·time.·Normally,·the·throttled·function·will·run | ||
4 | //·as·much·as·it·can,·without·ever·going·more·than·once·per·`wait`·duration; | ||
5 | //·but·if·you'd·like·to·disable·the·execution·on·the·leading·edge,·pass | ||
6 | //·`{leading:·false}`.·To·disable·execution·on·the·trailing·edge,·ditto. | ||
7 | function·throttle(func,·wait,·options)·{ | ||
8 | ····var·timeout,·context,·args,·result; | ||
9 | ····var·previous·=·0; | ||
10 | ····if·(!options)·options·=·{}; | ||
11 | ····var·later·=·function()·{ | ||
12 | ········previous·=·options.leading·===·false·?·0·:·now(); | ||
13 | ········timeout·=·null; | ||
14 | ········result·=·func.apply(context,·args); | ||
15 | ········if·(!timeout)·context·=·args·=·null; | ||
16 | ····}; | ||
17 | ····var·throttled·=·function()·{ | ||
18 | ········var·_now·=·now(); | ||
19 | ········if·(!previous·&&·options.leading·===·false)·previous·=·_now; | ||
20 | ········var·remaining·=·wait·-·(_now·-·previous); | ||
21 | ········context·=·this; | ||
22 | ········args·=·arguments; | ||
23 | ········if·(remaining·<=·0·||·remaining·>·wait)·{ | ||
24 | ············if·(timeout)·{ | ||
25 | ················clearTimeout(timeout); | ||
26 | ················timeout·=·null; | ||
27 | ············} | ||
28 | ············previous·=·_now; | ||
29 | ············result·=·func.apply(context,·args); | ||
30 | ············if·(!timeout)·context·=·args·=·null; | ||
31 | ········}·else·if·(!timeout·&&·options.trailing·!==·false)·{ | ||
32 | ············timeout·=·setTimeout(later,·remaining); | ||
33 | ········} | ||
34 | ········return·result; | ||
35 | ····}; | ||
36 | ····throttled.cancel·=·function()·{ | ||
37 | ········clearTimeout(timeout); | ||
38 | ········previous·=·0; | ||
39 | ········timeout·=·context·=·args·=·null; | ||
40 | ····}; | ||
41 | ····return·throttled; | ||
42 | } | ||
6 | module.exports·=· | 43 | module.exports·=·throttle; |
Offset 1, 10 lines modified | Offset 1, 11 lines modified | ||
1 | var·p | 1 | var·_optimizeCb·=·require('./index25.js'); |
2 | //·Returns·the·first·function·passed·as·an·argument·to·the·second, | ||
3 | //·allowing·you·to·adjust·arguments,·run·code·before·and·after,·and | ||
4 | //·conditionally·execute·the·original·function. | ||
5 | function·wrap(func,·wrapper)·{ | ||
6 | 2 | //·Run·a·function·**n**·times. | |
3 | function·times(n,·iteratee,·context)·{ | ||
4 | ····var·accum·=·Array(Math.max(0,·n)); | ||
5 | ····iteratee·=·_optimizeCb(iteratee,·context,·1); | ||
6 | ····for·(var·i·=·0;·i·<·n;·i++)·accum[i]·=·iteratee(i); | ||
7 | ····return·accum; | ||
7 | } | 8 | } |
8 | module.exports·=· | 9 | module.exports·=·times; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·each·=·require('./index52.js'); | 2 | var·each·=·require('./index52.js'); |
3 | //·An·internal·function·used·for·aggregate·"group·by"·operations. | 3 | //·An·internal·function·used·for·aggregate·"group·by"·operations. |
4 | function·group(behavior,·partition)·{ | 4 | function·group(behavior,·partition)·{ |
5 | ····return·function(obj,·iteratee,·context)·{ | 5 | ····return·function(obj,·iteratee,·context)·{ |
6 | ········var·result·=·partition·?·[ | 6 | ········var·result·=·partition·?·[ |
7 | ············[], | 7 | ············[], |
Offset 1, 8 lines modified | Offset 1, 19 lines modified | ||
1 | var·identity·=·require('./index69.js'); | ||
2 | var·isFunction·=·require('./index89.js'); | ||
3 | var·isObject·=·require('./index94.js'); | ||
4 | var·isArray·=·require('./index80.js'); | ||
1 | var· | 5 | var·matcher·=·require('./index109.js'); |
6 | var·property·=·require('./index126.js'); | ||
7 | var·_optimizeCb·=·require('./index25.js'); | ||
2 | //·Helper·function·to·continue·chaining·intermediate·results. | ||
3 | function·chainResult(instance,·obj)·{ | ||
4 | · | 8 | //·An·internal·function·to·generate·callbacks·that·can·be·applied·to·each |
9 | //·element·in·a·collection,·returning·the·desired·result·—·either·`_.identity`, | ||
10 | //·an·arbitrary·callback,·a·property·matcher,·or·a·property·accessor. | ||
11 | function·baseIteratee(value,·context,·argCount)·{ | ||
12 | ····if·(value·==·null)·return·identity; | ||
13 | ····if·(isFunction(value))·return·_optimizeCb(value,·context,·argCount); | ||
14 | ····if·(isObject(value)·&&·!isArray(value))·return·matcher(value); | ||
15 | ····return·property(value); | ||
5 | } | 16 | } |
6 | module.exports·=· | 17 | module.exports·=·baseIteratee; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_createSizePropertyCheck·=·require('./index1 | 1 | var·_createSizePropertyCheck·=·require('./index11.js'); |
2 | var·_getLength·=·require('./index17.js'); | 2 | var·_getLength·=·require('./index17.js'); |
3 | //·Internal·helper·for·collection·methods·to·determine·whether·a·collection | 3 | //·Internal·helper·for·collection·methods·to·determine·whether·a·collection |
4 | //·should·be·iterated·as·an·array·or·as·an·object. | 4 | //·should·be·iterated·as·an·array·or·as·an·object. |
5 | //·Related:·https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength | 5 | //·Related:·https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength |
6 | //·Avoids·a·very·nasty·iOS·8·JIT·bug·on·ARM-64.·#2094 | 6 | //·Avoids·a·very·nasty·iOS·8·JIT·bug·on·ARM-64.·#2094 |
7 | var·isArrayLike·=·_createSizePropertyCheck(_getLength); | 7 | var·isArrayLike·=·_createSizePropertyCheck(_getLength); |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_createSizePropertyCheck·=·require('./index1 | 1 | var·_createSizePropertyCheck·=·require('./index11.js'); |
2 | var·_getByteLength·=·require('./index16.js'); | 2 | var·_getByteLength·=·require('./index16.js'); |
3 | //·Internal·helper·to·determine·whether·we·should·spend·extensive·checks·against | 3 | //·Internal·helper·to·determine·whether·we·should·spend·extensive·checks·against |
4 | //·`ArrayBuffer`·et·al. | 4 | //·`ArrayBuffer`·et·al. |
5 | var·isBufferLike·=·_createSizePropertyCheck(_getByteLength); | 5 | var·isBufferLike·=·_createSizePropertyCheck(_getByteLength); |
6 | module.exports·=·isBufferLike; | 6 | module.exports·=·isBufferLike; |
Offset 1, 19 lines modified | Offset 1, 12 lines modified | ||
1 | var·identity·=·require('./index69.js'); | ||
2 | var· | 1 | var·underscore·=·require('./index148.js'); |
3 | var·isObject·=·require('./index95.js'); | ||
4 | var· | 2 | var·_baseIteratee·=·require('./index2.js'); |
5 | var· | 3 | var·iteratee·=·require('./index104.js'); |
6 | var·property·=·require('./index126.js'); | ||
7 | var·_optimizeCb·=·require('./index25.js'); | ||
4 | //·The·function·we·call·internally·to·generate·a·callback.·It·invokes | ||
5 | //·`_.iteratee`·if·overridden,·otherwise·`baseIteratee`. | ||
8 | //·An·internal·function·to·generate·callbacks·that·can·be·applied·to·each | ||
9 | //·element·in·a·collection,·returning·the·desired·result·—·either·`_.identity`, | ||
10 | //·an·arbitrary·callback,·a·property·matcher,·or·a·property·accessor. | ||
11 | function· | 6 | function·cb(value,·context,·argCount)·{ |
7 | ····if·(underscore.iteratee·!==·iteratee)·return·underscore.iteratee(value,·context); | ||
8 | ····return·_baseIteratee(value,·context,·argCount); | ||
12 | ····if·(value·==·null)·return·identity; | ||
13 | ····if·(isFunction(value))·return·_optimizeCb(value,·context,·argCount); | ||
14 | ····if·(isObject(value)·&&·!isArray(value))·return·matcher(value); | ||
15 | ····return·property(value); | ||
16 | } | 9 | } |
17 | module.exports·=· | 10 | module.exports·=·cb; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·underscore·=·require('./index1 | 1 | var·underscore·=·require('./index148.js'); |
2 | require('./index14 | 2 | require('./index146.js'); |
3 | //·Internal·wrapper·for·`_.toPath`·to·enable·minification. | 3 | //·Internal·wrapper·for·`_.toPath`·to·enable·minification. |
4 | //·Similar·to·`cb`·for·`_.iteratee`. | 4 | //·Similar·to·`cb`·for·`_.iteratee`. |
5 | function·toPath(path)·{ | 5 | function·toPath(path)·{ |
6 | ····return·underscore.toPath(path); | 6 | ····return·underscore.toPath(path); |
7 | } | 7 | } |
Offset 1, 7 lines modified | Offset 1, 7 lines modified | ||
1 | var·invert·=·require('./index76.js'); | 1 | var·invert·=·require('./index76.js'); |
2 | var·_escapeMap·=·require('./index1 | 2 | var·_escapeMap·=·require('./index13.js'); |
3 | //·Internal·list·of·HTML·entities·for·unescaping. | 3 | //·Internal·list·of·HTML·entities·for·unescaping. |
4 | var·unescapeMap·=·invert(_escapeMap); | 4 | var·unescapeMap·=·invert(_escapeMap); |
5 | module.exports·=·unescapeMap; | 5 | module.exports·=·unescapeMap; |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·isObject·=·require('./index9 | 1 | var·isObject·=·require('./index94.js'); |
2 | var·_setup·=·require('./index26.js'); | 2 | var·_setup·=·require('./index26.js'); |
3 | var·_collectNonEnumProps·=·require('./index | 3 | var·_collectNonEnumProps·=·require('./index5.js'); |
4 | //·Retrieve·all·the·enumerable·property·names·of·an·object. | 4 | //·Retrieve·all·the·enumerable·property·names·of·an·object. |
5 | function·allKeys(obj)·{ | 5 | function·allKeys(obj)·{ |
6 | ····if·(!isObject(obj))·return·[]; | 6 | ····if·(!isObject(obj))·return·[]; |
7 | ····var·keys·=·[]; | 7 | ····var·keys·=·[]; |
8 | ····for·(var·key·in·obj)·keys.push(key); | 8 | ····for·(var·key·in·obj)·keys.push(key); |
9 | ····//·Ahem,·IE·<·9. | 9 | ····//·Ahem,·IE·<·9. |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·underscore·=·require('./index1 | 1 | var·underscore·=·require('./index148.js'); |
2 | //·Start·chaining·a·wrapped·Underscore·object. | 2 | //·Start·chaining·a·wrapped·Underscore·object. |
3 | function·chain(obj)·{ | 3 | function·chain(obj)·{ |
4 | ····var·instance·=·underscore(obj); | 4 | ····var·instance·=·underscore(obj); |
5 | ····instance._chain·=·true; | 5 | ····instance._chain·=·true; |
6 | ····return·instance; | 6 | ····return·instance; |
7 | } | 7 | } |
Offset 1, 44 lines modified | Offset 1, 8 lines modified | ||
1 | var·_setup·=·require('./index26.js'); | ||
2 | var· | 1 | var·underscore·=·require('./index148.js'); |
3 | var·_has·=·require('./index19.js'); | ||
2 | //·Helper·function·to·continue·chaining·intermediate·results. | ||
3 | function·chainResult(instance,·obj)·{ | ||
4 | ····return·instance._chain·?·underscore(obj).chain()·:·obj; | ||
4 | //·Internal·helper·to·create·a·simple·lookup·structure. | ||
5 | //·`collectNonEnumProps`·used·to·depend·on·`_.contains`,·but·this·led·to | ||
6 | //·circular·imports.·`emulatedSet`·is·a·one-off·solution·that·only·works·for | ||
7 | //·arrays·of·strings. | ||
8 | function·emulatedSet(keys)·{ | ||
9 | ····var·hash·=·{}; | ||
10 | ····for·(var·l·=·keys.length,·i·=·0;·i·<·l;·++i)·hash[keys[i]]·=·true; | ||
11 | ····return·{ | ||
12 | ········contains:·function(key)·{ | ||
13 | ············return·hash[key]·===·true; | ||
14 | ········}, | ||
15 | ········push:·function(key)·{ | ||
16 | ············hash[key]·=·true; | ||
17 | ············return·keys.push(key); | ||
18 | ········} | ||
19 | ····}; | ||
20 | } | 5 | } |
6 | module.exports·=·chainResult; | ||
21 | //·Internal·helper.·Checks·`keys`·for·the·presence·of·keys·in·IE·<·9·that·won't | ||
22 | //·be·iterated·by·`for·key·in·...`·and·thus·missed.·Extends·`keys`·in·place·if | ||
23 | //·needed. | ||
24 | function·collectNonEnumProps(obj,·keys)·{ | ||
25 | ····keys·=·emulatedSet(keys); | ||
26 | ····var·nonEnumIdx·=·_setup.nonEnumerableProps.length; | ||
27 | ····var·constructor·=·obj.constructor; | ||
28 | ····var·proto·=·(isFunction(constructor)·&&·constructor.prototype)·||·_setup.ObjProto; | ||
29 | ····//·Constructor·is·a·special·case. | ||
30 | ····var·prop·=·'constructor'; | ||
31 | ····if·(_has(obj,·prop)·&&·!keys.contains(prop))·keys.push(prop); | ||
32 | ····while·(nonEnumIdx--)·{ | ||
33 | ········prop·=·_setup.nonEnumerableProps[nonEnumIdx]; | ||
34 | ········if·(prop·in·obj·&&·obj[prop]·!==·proto[prop]·&&·!keys.contains(prop))·{ | ||
35 | ············keys.push(prop); | ||
36 | ········} | ||
37 | ····} | ||
38 | } | ||
39 | module.exports·=·collectNonEnumProps; |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·isObject·=·require('./index9 | 1 | var·isObject·=·require('./index94.js'); |
2 | var·isArray·=·require('./index80.js'); | 2 | var·isArray·=·require('./index80.js'); |
3 | var·extend·=·require('./index5 | 3 | var·extend·=·require('./index55.js'); |
4 | //·Create·a·(shallow-cloned)·duplicate·of·an·object. | 4 | //·Create·a·(shallow-cloned)·duplicate·of·an·object. |
5 | function·clone(obj)·{ | 5 | function·clone(obj)·{ |
6 | ····if·(!isObject(obj))·return·obj; | 6 | ····if·(!isObject(obj))·return·obj; |
7 | ····return·isArray(obj)·?·obj.slice()·:·extend({},·obj); | 7 | ····return·isArray(obj)·?·obj.slice()·:·extend({},·obj); |
8 | } | 8 | } |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·_isArrayLike·=·require('./index21.js'); | 1 | var·_isArrayLike·=·require('./index21.js'); |
2 | var·values·=·require('./index15 | 2 | var·values·=·require('./index154.js'); |
3 | var·indexOf·=·require('./index73.js'); | 3 | var·indexOf·=·require('./index73.js'); |
4 | //·Determine·if·the·array·or·object·contains·a·given·item·(using·`===`). | 4 | //·Determine·if·the·array·or·object·contains·a·given·item·(using·`===`). |
5 | function·contains(obj,·item,·fromIndex,·guard)·{ | 5 | function·contains(obj,·item,·fromIndex,·guard)·{ |
6 | ····if·(!_isArrayLike(obj))·obj·=·values(obj); | 6 | ····if·(!_isArrayLike(obj))·obj·=·values(obj); |
7 | ····if·(typeof·fromIndex·!=·'number'·||·guard)·fromIndex·=·0; | 7 | ····if·(typeof·fromIndex·!=·'number'·||·guard)·fromIndex·=·0; |
8 | ····return·indexOf(obj,·item,·fromIndex)·>=·0; | 8 | ····return·indexOf(obj,·item,·fromIndex)·>=·0; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·_baseCreate·=·require('./index.js'); | 1 | var·_baseCreate·=·require('./index.js'); |
2 | var·extendOwn·=·require('./index5 | 2 | var·extendOwn·=·require('./index56.js'); |
3 | //·Creates·an·object·that·inherits·from·the·given·prototype·object. | 3 | //·Creates·an·object·that·inherits·from·the·given·prototype·object. |
4 | //·If·additional·properties·are·provided·then·they·will·be·added·to·the | 4 | //·If·additional·properties·are·provided·then·they·will·be·added·to·the |
5 | //·created·object. | 5 | //·created·object. |
6 | function·create(prototype,·props)·{ | 6 | function·create(prototype,·props)·{ |
7 | ····var·result·=·_baseCreate(prototype); | 7 | ····var·result·=·_baseCreate(prototype); |
8 | ····if·(props)·extendOwn(result,·props); | 8 | ····if·(props)·extendOwn(result,·props); |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·partial·=·require('./index12 | 1 | var·partial·=·require('./index123.js'); |
2 | var·delay·=·require('./index50.js'); | 2 | var·delay·=·require('./index50.js'); |
3 | var·underscore·=·require('./index1 | 3 | var·underscore·=·require('./index148.js'); |
4 | //·Defers·a·function,·scheduling·it·to·run·after·the·current·call·stack·has | 4 | //·Defers·a·function,·scheduling·it·to·run·after·the·current·call·stack·has |
5 | //·cleared. | 5 | //·cleared. |
6 | var·defer·=·partial(delay,·underscore,·1); | 6 | var·defer·=·partial(delay,·underscore,·1); |
7 | module.exports·=·defer; | 7 | module.exports·=·defer; |
Offset 1, 12 lines modified | Offset 1, 44 lines modified | ||
1 | var·underscore·=·require('./index150.js'); | ||
2 | var·_ | 1 | var·_setup·=·require('./index26.js'); |
2 | var·isFunction·=·require('./index89.js'); | ||
3 | var· | 3 | var·_has·=·require('./index19.js'); |
4 | //·The·function·we·call·internally·to·generate·a·callback.·It·invokes | ||
5 | //·`_.iteratee`·if·overridden,·otherwise·`baseIteratee`. | ||
6 | function·cb(value,·context,·argCount)·{ | ||
7 | ····if·(underscore.iteratee·!==·iteratee)·return·underscore.iteratee(value,·context); | ||
8 | 4 | //·Internal·helper·to·create·a·simple·lookup·structure. | |
5 | //·`collectNonEnumProps`·used·to·depend·on·`_.contains`,·but·this·led·to | ||
6 | //·circular·imports.·`emulatedSet`·is·a·one-off·solution·that·only·works·for | ||
7 | //·arrays·of·strings. | ||
8 | function·emulatedSet(keys)·{ | ||
9 | ····var·hash·=·{}; | ||
10 | ····for·(var·l·=·keys.length,·i·=·0;·i·<·l;·++i)·hash[keys[i]]·=·true; | ||
11 | ····return·{ | ||
12 | ········contains:·function(key)·{ | ||
13 | ············return·hash[key]·===·true; | ||
14 | ········}, | ||
15 | ········push:·function(key)·{ | ||
16 | ············hash[key]·=·true; | ||
17 | ············return·keys.push(key); | ||
18 | ········} | ||
19 | ····}; | ||
9 | } | 20 | } |
10 | 21 | //·Internal·helper.·Checks·`keys`·for·the·presence·of·keys·in·IE·<·9·that·won't | |
22 | //·be·iterated·by·`for·key·in·...`·and·thus·missed.·Extends·`keys`·in·place·if | ||
23 | //·needed. | ||
24 | function·collectNonEnumProps(obj,·keys)·{ | ||
25 | ····keys·=·emulatedSet(keys); | ||
26 | ····var·nonEnumIdx·=·_setup.nonEnumerableProps.length; | ||
27 | ····var·constructor·=·obj.constructor; | ||
28 | ····var·proto·=·(isFunction(constructor)·&&·constructor.prototype)·||·_setup.ObjProto; | ||
29 | ····//·Constructor·is·a·special·case. | ||
30 | ····var·prop·=·'constructor'; | ||
31 | ····if·(_has(obj,·prop)·&&·!keys.contains(prop))·keys.push(prop); | ||
32 | ····while·(nonEnumIdx--)·{ | ||
33 | ········prop·=·_setup.nonEnumerableProps[nonEnumIdx]; | ||
34 | ········if·(prop·in·obj·&&·obj[prop]·!==·proto[prop]·&&·!keys.contains(prop))·{ | ||
35 | ············keys.push(prop); | ||
36 | ········} | ||
37 | ····} | ||
38 | } | ||
39 | module.exports·=·collectNonEnumProps; |
Offset 1, 7 lines modified | Offset 1, 7 lines modified | ||
1 | var·_createEscaper·=·require('./index7.js'); | 1 | var·_createEscaper·=·require('./index7.js'); |
2 | var·_escapeMap·=·require('./index1 | 2 | var·_escapeMap·=·require('./index13.js'); |
3 | //·Function·for·escaping·strings·to·HTML·interpolation. | 3 | //·Function·for·escaping·strings·to·HTML·interpolation. |
4 | var·escape·=·_createEscaper(_escapeMap); | 4 | var·escape·=·_createEscaper(_escapeMap); |
5 | module.exports·=·escape; | 5 | module.exports·=·escape; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·_isArrayLike·=·require('./index21.js'); | 2 | var·_isArrayLike·=·require('./index21.js'); |
3 | var·keys·=·require('./index105.js'); | 3 | var·keys·=·require('./index105.js'); |
4 | //·Determine·whether·all·of·the·elements·pass·a·truth·test. | 4 | //·Determine·whether·all·of·the·elements·pass·a·truth·test. |
5 | function·every(obj,·predicate,·context)·{ | 5 | function·every(obj,·predicate,·context)·{ |
6 | ····predicate·=·_cb(predicate,·context); | 6 | ····predicate·=·_cb(predicate,·context); |
7 | ····var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), | 7 | ····var·_keys·=·!_isArrayLike(obj)·&&·keys(obj), |
Offset 1, 9 lines modified | Offset 1, 7 lines modified | ||
1 | var·_createAssigner·=·require('./index6.js'); | 1 | var·_createAssigner·=·require('./index6.js'); |
2 | var· | 2 | var·allKeys·=·require('./index34.js'); |
3 | //· | 3 | //·Extend·a·given·object·with·all·the·properties·in·passed-in·object(s). |
4 | //·object(s). | ||
5 | //·(https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) | ||
6 | var·extend | 4 | var·extend·=·_createAssigner(allKeys); |
7 | module.exports·=·extend | 5 | module.exports·=·extend; |
Offset 1, 7 lines modified | Offset 1, 9 lines modified | ||
1 | var·_createAssigner·=·require('./index6.js'); | 1 | var·_createAssigner·=·require('./index6.js'); |
2 | var· | 2 | var·keys·=·require('./index105.js'); |
3 | //· | 3 | //·Assigns·a·given·object·with·all·the·own·properties·in·the·passed-in |
4 | //·object(s). | ||
5 | //·(https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) | ||
4 | var·extend·=·_createAssigner( | 6 | var·extendOwn·=·_createAssigner(keys); |
5 | module.exports·=·extend; | 7 | module.exports·=·extendOwn; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·each·=·require('./index52.js'); | 2 | var·each·=·require('./index52.js'); |
3 | //·Return·all·the·elements·that·pass·a·truth·test. | 3 | //·Return·all·the·elements·that·pass·a·truth·test. |
4 | function·filter(obj,·predicate,·context)·{ | 4 | function·filter(obj,·predicate,·context)·{ |
5 | ····var·results·=·[]; | 5 | ····var·results·=·[]; |
6 | ····predicate·=·_cb(predicate,·context); | 6 | ····predicate·=·_cb(predicate,·context); |
7 | ····each(obj,·function(value,·index,·list)·{ | 7 | ····each(obj,·function(value,·index,·list)·{ |
Offset 1, 6 lines modified | Offset 1, 6 lines modified | ||
1 | var·_createPredicateIndexFinder·=·require('./index | 1 | var·_createPredicateIndexFinder·=·require('./index9.js'); |
2 | //·Returns·the·first·index·on·an·array-like·that·passes·a·truth·test. | 2 | //·Returns·the·first·index·on·an·array-like·that·passes·a·truth·test. |
3 | var·findIndex·=·_createPredicateIndexFinder(1); | 3 | var·findIndex·=·_createPredicateIndexFinder(1); |
4 | module.exports·=·findIndex; | 4 | module.exports·=·findIndex; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·_cb·=·require('./index | 1 | var·_cb·=·require('./index3.js'); |
2 | var·keys·=·require('./index105.js'); | 2 | var·keys·=·require('./index105.js'); |
3 | //·Returns·the·first·key·on·an·object·that·passes·a·truth·test. | 3 | //·Returns·the·first·key·on·an·object·that·passes·a·truth·test. |
4 | function·findKey(obj,·predicate,·context)·{ | 4 | function·findKey(obj,·predicate,·context)·{ |
5 | ····predicate·=·_cb(predicate,·context); | 5 | ····predicate·=·_cb(predicate,·context); |
6 | ····var·_keys·=·keys(obj), | 6 | ····var·_keys·=·keys(obj), |
7 | ········key; | 7 | ········key; |
Offset 1, 6 lines modified | Offset 1, 10 lines modified | ||
1 | var· | 1 | var·find·=·require('./index58.js'); |
2 | var·matcher·=·require('./index109.js'); | ||
2 | //·Returns·the·last·index·on·an·array-like·that·passes·a·truth·test. | ||
3 | 3 | //·Convenience·version·of·a·common·use·case·of·`_.find`:·getting·the·first | |
4 | //·object·containing·specific·`key:value`·pairs. | ||
5 | function·findWhere(obj,·attrs)·{ | ||
6 | ····return·find(obj,·matcher(attrs)); | ||
7 | } | ||
4 | module.exports·=·find | 8 | module.exports·=·findWhere; |
Offset 1, 10 lines modified | Offset 1, 6 lines modified | ||
1 | var·_createPredicateIndexFinder·=·require('./index9.js'); | ||
1 | var·find·=·require('./index58.js'); | ||
2 | var·matcher·=·require('./index110.js'); | ||
2 | //·Returns·the·last·index·on·an·array-like·that·passes·a·truth·test. | ||
3 | var·findLastIndex·=·_createPredicateIndexFinder(-1); | ||
3 | //·Convenience·version·of·a·common·use·case·of·`_.find`:·getting·the·first | ||
4 | //·object·containing·specific·`key:value`·pairs. | ||
5 | function·findWhere(obj,·attrs)·{ | ||
6 | ····return·find(obj,·matcher(attrs)); | ||
7 | } | ||
8 | module.exports·=·find | 4 | module.exports·=·findLastIndex; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·_toPath·=·require('./index31.js'); | 1 | var·_toPath·=·require('./index31.js'); |
2 | var·_deepGet·=·require('./index1 | 2 | var·_deepGet·=·require('./index12.js'); |
3 | var·isUndefined·=·require('./index101.js'); | 3 | var·isUndefined·=·require('./index101.js'); |
4 | //·Get·the·value·of·the·(deep)·property·on·`path`·from·`object`. | 4 | //·Get·the·value·of·the·(deep)·property·on·`path`·from·`object`. |
5 | //·If·any·property·in·`path`·does·not·exist·or·if·the·value·is | 5 | //·If·any·property·in·`path`·does·not·exist·or·if·the·value·is |
6 | //·`undefined`,·return·`defaultValue`·instead. | 6 | //·`undefined`,·return·`defaultValue`·instead. |
7 | //·The·`path`·is·normalized·through·`_.toPath`. | 7 | //·The·`path`·is·normalized·through·`_.toPath`. |
8 | function·get(object,·path,·defaultValue)·{ | 8 | function·get(object,·path,·defaultValue)·{ |
Offset 1, 138 lines modified | Offset 1, 138 lines modified | ||
1 | Object.defineProperty(exports,·'__esModule',·{ | 1 | Object.defineProperty(exports,·'__esModule',·{ |
2 | ····value:·true | 2 | ····value:·true |
3 | }); | 3 | }); |
4 | var·_setup·=·require('./index26.js'); | 4 | var·_setup·=·require('./index26.js'); |
5 | var·restArguments·=·require('./index134.js'); | 5 | var·restArguments·=·require('./index134.js'); |
6 | var·isObject·=·require('./index9 | 6 | var·isObject·=·require('./index94.js'); |
7 | var·isNull·=·require('./index9 | 7 | var·isNull·=·require('./index93.js'); |
8 | var·isUndefined·=·require('./index101.js'); | 8 | var·isUndefined·=·require('./index101.js'); |
9 | var·isBoolean·=·require('./index81.js'); | 9 | var·isBoolean·=·require('./index81.js'); |
10 | var·isElement·=·require('./index84.js'); | 10 | var·isElement·=·require('./index84.js'); |
11 | var·isString·=·require('./index98.js'); | 11 | var·isString·=·require('./index98.js'); |
12 | var·isNumber·=·require('./index9 | 12 | var·isNumber·=·require('./index95.js'); |
13 | var·isDate·=·require('./index83.js'); | 13 | var·isDate·=·require('./index83.js'); |
14 | var·isRegExp·=·require('./index96.js'); | 14 | var·isRegExp·=·require('./index96.js'); |
15 | var·isError·=·require('./index8 | 15 | var·isError·=·require('./index87.js'); |
16 | var·isSymbol·=·require('./index99.js'); | 16 | var·isSymbol·=·require('./index99.js'); |
17 | var·isArrayBuffer·=·require('./index79.js'); | 17 | var·isArrayBuffer·=·require('./index79.js'); |
18 | var·isDataView·=·require('./index82.js'); | 18 | var·isDataView·=·require('./index82.js'); |
19 | var·isArray·=·require('./index80.js'); | 19 | var·isArray·=·require('./index80.js'); |
20 | var·isFunction·=·require('./index89.js'); | 20 | var·isFunction·=·require('./index89.js'); |
21 | var·isArguments·=·require('./index78.js'); | 21 | var·isArguments·=·require('./index78.js'); |
22 | var·isFinite·=·require('./index8 | 22 | var·isFinite·=·require('./index88.js'); |
23 | var·isNaN·=·require('./index92.js'); | 23 | var·isNaN·=·require('./index92.js'); |
24 | var·isTypedArray·=·require('./index100.js'); | 24 | var·isTypedArray·=·require('./index100.js'); |
25 | var·isEmpty·=·require('./index85.js'); | 25 | var·isEmpty·=·require('./index85.js'); |
26 | var·isMatch·=·require('./index91.js'); | 26 | var·isMatch·=·require('./index91.js'); |
27 | var·isEqual·=·require('./index86.js'); | 27 | var·isEqual·=·require('./index86.js'); |
28 | var·isMap·=·require('./index90.js'); | 28 | var·isMap·=·require('./index90.js'); |
29 | var·isWeakMap·=·require('./index102.js'); | 29 | var·isWeakMap·=·require('./index102.js'); |
30 | var·isSet·=·require('./index97.js'); | 30 | var·isSet·=·require('./index97.js'); |
31 | var·isWeakSet·=·require('./index103.js'); | 31 | var·isWeakSet·=·require('./index103.js'); |
32 | var·keys·=·require('./index105.js'); | 32 | var·keys·=·require('./index105.js'); |
33 | var·allKeys·=·require('./index34.js'); | 33 | var·allKeys·=·require('./index34.js'); |
34 | var·values·=·require('./index15 | 34 | var·values·=·require('./index154.js'); |
35 | var·pairs·=·require('./index121.js'); | 35 | var·pairs·=·require('./index121.js'); |
36 | var·invert·=·require('./index76.js'); | 36 | var·invert·=·require('./index76.js'); |
37 | var·functions·=·require('./index65.js'); | 37 | var·functions·=·require('./index65.js'); |
38 | var·extend·=·require('./index5 | 38 | var·extend·=·require('./index55.js'); |
39 | var·extendOwn·=·require('./index5 | 39 | var·extendOwn·=·require('./index56.js'); |
40 | var·defaults·=·require('./index48.js'); | 40 | var·defaults·=·require('./index48.js'); |
41 | var·create·=·require('./index46.js'); | 41 | var·create·=·require('./index46.js'); |
42 | var·clone·=·require('./index40.js'); | 42 | var·clone·=·require('./index40.js'); |
43 | var·tap·=·require('./index14 | 43 | var·tap·=·require('./index142.js'); |
44 | var·get·=·require('./index66.js'); | 44 | var·get·=·require('./index66.js'); |
45 | var·has·=·require('./index68.js'); | 45 | var·has·=·require('./index68.js'); |
46 | var·mapObject·=·require('./index1 | 46 | var·mapObject·=·require('./index110.js'); |
47 | var·identity·=·require('./index69.js'); | 47 | var·identity·=·require('./index69.js'); |
48 | var·constant·=·require('./index43.js'); | 48 | var·constant·=·require('./index43.js'); |
49 | var·noop·=·require('./index116.js'); | 49 | var·noop·=·require('./index116.js'); |
50 | var·toPath·=·require('./index14 | 50 | var·toPath·=·require('./index146.js'); |
51 | var·property·=·require('./index126.js'); | 51 | var·property·=·require('./index126.js'); |
52 | var·propertyOf·=·require('./index127.js'); | 52 | var·propertyOf·=·require('./index127.js'); |
53 | var·matcher·=·require('./index1 | 53 | var·matcher·=·require('./index109.js'); |
54 | var·times·=·require('./index1 | 54 | var·times·=·require('./index160.js'); |
55 | var·random·=·require('./index12 | 55 | var·random·=·require('./index128.js'); |
56 | var·now·=·require('./index117.js'); | 56 | var·now·=·require('./index117.js'); |
57 | var·escape·=·require('./index53.js'); | 57 | var·escape·=·require('./index53.js'); |
58 | var·unescape·=·require('./index1 | 58 | var·unescape·=·require('./index149.js'); |
59 | var·templateSettings·=·require('./index144.js'); | 59 | var·templateSettings·=·require('./index144.js'); |
60 | var·template·=·require('./index143.js'); | 60 | var·template·=·require('./index143.js'); |
61 | var·result·=·require('./index13 | 61 | var·result·=·require('./index136.js'); |
62 | var·uniqueId·=·require('./index15 | 62 | var·uniqueId·=·require('./index152.js'); |
63 | var·chain·=·require('./index38.js'); | 63 | var·chain·=·require('./index38.js'); |
64 | var·iteratee·=·require('./index104.js'); | 64 | var·iteratee·=·require('./index104.js'); |
65 | var·partial·=·require('./index12 | 65 | var·partial·=·require('./index123.js'); |
66 | var·bind·=·require('./index36.js'); | 66 | var·bind·=·require('./index36.js'); |
67 | var·bindAll·=·require('./index37.js'); | 67 | var·bindAll·=·require('./index37.js'); |
68 | var·memoize·=·require('./index112.js'); | 68 | var·memoize·=·require('./index112.js'); |
69 | var·delay·=·require('./index50.js'); | 69 | var·delay·=·require('./index50.js'); |
70 | var·defer·=·require('./index49.js'); | 70 | var·defer·=·require('./index49.js'); |
71 | var·throttle·=·require('./index1 | 71 | var·throttle·=·require('./index159.js'); |
72 | var·debounce·=·require('./index47.js'); | 72 | var·debounce·=·require('./index47.js'); |
73 | var·wrap·=·require('./index1 | 73 | var·wrap·=·require('./index157.js'); |
74 | var·negate·=·require('./index115.js'); | 74 | var·negate·=·require('./index115.js'); |
75 | var·compose·=·require('./index42.js'); | 75 | var·compose·=·require('./index42.js'); |
76 | var·after·=·require('./index33.js'); | 76 | var·after·=·require('./index33.js'); |
77 | var·before·=·require('./index35.js'); | 77 | var·before·=·require('./index35.js'); |
78 | var·once·=·require('./index120.js'); | 78 | var·once·=·require('./index120.js'); |
79 | var·findKey·=·require('./index60.js'); | 79 | var·findKey·=·require('./index60.js'); |
80 | var·findIndex·=·require('./index59.js'); | 80 | var·findIndex·=·require('./index59.js'); |
81 | var·findLastIndex·=·require('./index6 | 81 | var·findLastIndex·=·require('./index62.js'); |
82 | var·sortedIndex·=·require('./index14 | 82 | var·sortedIndex·=·require('./index141.js'); |
83 | var·indexOf·=·require('./index73.js'); | 83 | var·indexOf·=·require('./index73.js'); |
84 | var·lastIndexOf·=·require('./index107.js'); | 84 | var·lastIndexOf·=·require('./index107.js'); |
85 | var·find·=·require('./index58.js'); | 85 | var·find·=·require('./index58.js'); |
86 | var·findWhere·=·require('./index6 | 86 | var·findWhere·=·require('./index61.js'); |
87 | var·each·=·require('./index52.js'); | 87 | var·each·=·require('./index52.js'); |
88 | var·map·=·require('./index108.js'); | 88 | var·map·=·require('./index108.js'); |
89 | var·reduce·=·require('./index13 | 89 | var·reduce·=·require('./index130.js'); |
90 | var·reduceRight·=·require('./index1 | 90 | var·reduceRight·=·require('./index131.js'); |
91 | var·filter·=·require('./index57.js'); | 91 | var·filter·=·require('./index57.js'); |
92 | var·reject·=·require('./index13 | 92 | var·reject·=·require('./index132.js'); |
93 | var·every·=·require('./index54.js'); | 93 | var·every·=·require('./index54.js'); |
94 | var·some·=·require('./index139.js'); | 94 | var·some·=·require('./index139.js'); |
95 | var·contains·=·require('./index44.js'); | 95 | var·contains·=·require('./index44.js'); |
96 | var·invoke·=·require('./index77.js'); | 96 | var·invoke·=·require('./index77.js'); |
97 | var·pluck·=·require('./index12 | 97 | var·pluck·=·require('./index125.js'); |
98 | var·where·=·require('./index15 | 98 | var·where·=·require('./index155.js'); |
99 | var·max·=·require('./index111.js'); | 99 | var·max·=·require('./index111.js'); |
100 | var·min·=·require('./index113.js'); | 100 | var·min·=·require('./index113.js'); |
101 | var·shuffle·=·require('./index137.js'); | 101 | var·shuffle·=·require('./index137.js'); |
102 | var·sample·=·require('./index13 | 102 | var·sample·=·require('./index135.js'); |
103 | var·sortBy·=·require('./index140.js'); | 103 | var·sortBy·=·require('./index140.js'); |
104 | var·groupBy·=·require('./index67.js'); | 104 | var·groupBy·=·require('./index67.js'); |
105 | var·indexBy·=·require('./index72.js'); | 105 | var·indexBy·=·require('./index72.js'); |
106 | var·countBy·=·require('./index45.js'); | 106 | var·countBy·=·require('./index45.js'); |
107 | var·partition·=·require('./index12 | 107 | var·partition·=·require('./index122.js'); |
108 | var·toArray·=·require('./index14 | 108 | var·toArray·=·require('./index145.js'); |
109 | var·size·=·require('./index138.js'); | 109 | var·size·=·require('./index138.js'); |
110 | var·pick·=·require('./index12 | 110 | var·pick·=·require('./index124.js'); |
111 | var·omit·=·require('./index119.js'); | 111 | var·omit·=·require('./index119.js'); |
112 | var·first·=·require('./index63.js'); | 112 | var·first·=·require('./index63.js'); |
113 | var·initial·=·require('./index74.js'); | 113 | var·initial·=·require('./index74.js'); |
114 | var·last·=·require('./index106.js'); | 114 | var·last·=·require('./index106.js'); |
115 | var·rest·=·require('./index13 | 115 | var·rest·=·require('./index133.js'); |
116 | var·compact·=·require('./index41.js'); | 116 | var·compact·=·require('./index41.js'); |
117 | var·flatten·=·require('./index64.js'); | 117 | var·flatten·=·require('./index64.js'); |
118 | var·without·=·require('./index15 | 118 | var·without·=·require('./index156.js'); |
119 | var·uniq·=·require('./index15 | 119 | var·uniq·=·require('./index151.js'); |
120 | var·union·=·require('./index15 | 120 | var·union·=·require('./index150.js'); |
121 | var·intersection·=·require('./index75.js'); | 121 | var·intersection·=·require('./index75.js'); |
122 | var·difference·=·require('./index51.js'); | 122 | var·difference·=·require('./index51.js'); |
123 | var·unzip·=·require('./index15 | 123 | var·unzip·=·require('./index153.js'); |
124 | var·zip·=·require('./index15 | 124 | var·zip·=·require('./index158.js'); |
125 | var·object·=·require('./index118.js'); | 125 | var·object·=·require('./index118.js'); |
126 | var·range·=·require('./index1 | 126 | var·range·=·require('./index129.js'); |
Max diff block lines reached; 326/6989 bytes (4.66%) of diff not shown. |
Offset 1, 10 lines modified | Offset 1, 10 lines modified | ||
1 | var·sortedIndex·=·require('./index14 | 1 | var·sortedIndex·=·require('./index141.js'); |
2 | var·findIndex·=·require('./index59.js'); | 2 | var·findIndex·=·require('./index59.js'); |
3 | var·_createIndexFinder·=·require('./index | 3 | var·_createIndexFinder·=·require('./index8.js'); |
4 | //·Return·the·position·of·the·first·occurrence·of·an·item·in·an·array, | 4 | //·Return·the·position·of·the·first·occurrence·of·an·item·in·an·array, |
5 | //·or·-1·if·the·item·is·not·included·in·the·array. | 5 | //·or·-1·if·the·item·is·not·included·in·the·array. |
6 | //·If·the·array·is·large·and·already·in·sort·order,·pass·`true` | 6 | //·If·the·array·is·large·and·already·in·sort·order,·pass·`true` |
7 | //·for·**isSorted**·to·use·binary·search. | 7 | //·for·**isSorted**·to·use·binary·search. |
8 | var·indexOf·=·_createIndexFinder(1,·findIndex,·sortedIndex); | 8 | var·indexOf·=·_createIndexFinder(1,·findIndex,·sortedIndex); |
Offset 1, 11 lines modified | Offset 1, 11 lines modified | ||
1 | var·restArguments·=·require('./index134.js'); | 1 | var·restArguments·=·require('./index134.js'); |
2 | var·isFunction·=·require('./index89.js'); | 2 | var·isFunction·=·require('./index89.js'); |
3 | var·map·=·require('./index108.js'); | 3 | var·map·=·require('./index108.js'); |
4 | var·_deepGet·=·require('./index1 | 4 | var·_deepGet·=·require('./index12.js'); |
5 | var·_toPath·=·require('./index31.js'); | 5 | var·_toPath·=·require('./index31.js'); |
6 | //·Invoke·a·method·(with·arguments)·on·every·item·in·a·collection. | 6 | //·Invoke·a·method·(with·arguments)·on·every·item·in·a·collection. |
7 | var·invoke·=·restArguments(function(obj,·path,·args)·{ | 7 | var·invoke·=·restArguments(function(obj,·path,·args)·{ |
8 | ····var·contextPath,·func; | 8 | ····var·contextPath,·func; |
9 | ····if·(isFunction(path))·{ | 9 | ····if·(isFunction(path))·{ |
10 | ········func·=·path; | 10 | ········func·=·path; |
Offset 1, 17 lines modified | Offset 1, 31 lines modified | ||
1 | var·_cb·=·require('./index5.js'); | ||
2 | var·_getLength·=·require('./index17.js'); | 1 | var·_getLength·=·require('./index17.js'); |
2 | var·_setup·=·require('./index26.js'); | ||
3 | var·isNaN·=·require('./index92.js'); | ||
3 | //·Internal·function·to·generate·`_. | 4 | //·Internal·function·to·generate·the·`_.indexOf`·and·`_.lastIndexOf`·functions. |
4 | function·create | 5 | function·createIndexFinder(dir,·predicateFind,·sortedIndex)·{ |
5 | ····return·function(array,· | 6 | ····return·function(array,·item,·idx)·{ |
6 | ········ | 7 | ········var·i·=·0, |
7 | ········ | 8 | ············length·=·_getLength(array); |
8 | ········ | 9 | ········if·(typeof·idx·==·'number')·{ |
10 | ············if·(dir·>·0)·{ | ||
11 | ················i·=·idx·>=·0·?·idx·:·Math.max(idx·+·length,·i); | ||
12 | ············}·else·{ | ||
13 | ················length·=·idx·>=·0·?·Math.min(idx·+·1,·length)·:·idx·+·length·+·1; | ||
14 | ············} | ||
15 | ········}·else·if·(sortedIndex·&&·idx·&&·length)·{ | ||
16 | ············idx·=·sortedIndex(array,·item); | ||
17 | ············return·array[idx]·===·item·?·idx·:·-1; | ||
18 | ········} | ||
19 | ········if·(item·!==·item)·{ | ||
20 | ············idx·=·predicateFind(_setup.slice.call(array,·i,·length),·isNaN); | ||
21 | ············return·idx·>=·0·?·idx·+·i·:·-1; | ||
22 | ········} | ||
9 | ········for·( | 23 | ········for·(idx·=·dir·>·0·?·i·:·length·-·1;·idx·>=·0·&&·idx·<·length;·idx·+=·dir)·{ |
10 | ············if·( | 24 | ············if·(array[idx]·===·item)·return·idx; |
11 | ········} | 25 | ········} |
12 | ········return·-1; | 26 | ········return·-1; |
13 | ····}; | 27 | ····}; |
14 | } | 28 | } |
15 | module.exports·=·create | 29 | module.exports·=·createIndexFinder; |
Offset 1, 8 lines modified | Offset 1, 8 lines modified | ||
1 | var·underscore·=·require('./index1 | 1 | var·underscore·=·require('./index148.js'); |
2 | var·_setup·=·require('./index26.js'); | 2 | var·_setup·=·require('./index26.js'); |
3 | var·_getByteLength·=·require('./index16.js'); | 3 | var·_getByteLength·=·require('./index16.js'); |
4 | var·isTypedArray·=·require('./index100.js'); | 4 | var·isTypedArray·=·require('./index100.js'); |
5 | var·isFunction·=·require('./index89.js'); | 5 | var·isFunction·=·require('./index89.js'); |
6 | var·_stringTagBug·=·require('./index28.js'); | 6 | var·_stringTagBug·=·require('./index28.js'); |
7 | var·isDataView·=·require('./index82.js'); | 7 | var·isDataView·=·require('./index82.js'); |
8 | var·keys·=·require('./index105.js'); | 8 | var·keys·=·require('./index105.js'); |
Offset 1, 9 lines modified | Offset 1, 5 lines modified | ||
1 | var·_ | 1 | var·_tagTester·=·require('./index29.js'); |
2 | var·isSymbol·=·require('./index99.js'); | ||
2 | var·isError·=·_tagTester('Error'); | ||
3 | //·Is·a·given·object·a·finite·number? | ||
4 | function·isFinite(obj)·{ | ||
5 | ····return·!isSymbol(obj)·&&·_setup._isFinite(obj)·&&·!isNaN(parseFloat(obj)); | ||
6 | } | ||
7 | module.exports·=·is | 3 | module.exports·=·isError; |
Offset 1, 5 lines modified | Offset 1, 9 lines modified | ||
1 | var·_ | 1 | var·_setup·=·require('./index26.js'); |
2 | var·isSymbol·=·require('./index99.js'); | ||
2 | 3 | //·Is·a·given·object·a·finite·number? | |
4 | function·isFinite(obj)·{ | ||
5 | ····return·!isSymbol(obj)·&&·_setup._isFinite(obj)·&&·!isNaN(parseFloat(obj)); | ||
6 | } | ||
3 | module.exports·=·is | 7 | module.exports·=·isFinite; |
Offset 1, 31 lines modified | Offset 1, 17 lines modified | ||
1 | var·_cb·=·require('./index3.js'); | ||
1 | var·_getLength·=·require('./index17.js'); | 2 | var·_getLength·=·require('./index17.js'); |
2 | var·_setup·=·require('./index26.js'); | ||
3 | var·isNaN·=·require('./index92.js'); | ||
4 | //·Internal·function·to·generate· | 3 | //·Internal·function·to·generate·`_.findIndex`·and·`_.findLastIndex`. |
5 | function·create | 4 | function·createPredicateIndexFinder(dir)·{ |
6 | ····return·function(array,·ite | 5 | ····return·function(array,·predicate,·context)·{ |
7 | ········ | 6 | ········predicate·=·_cb(predicate,·context); |
8 | ········ | 7 | ········var·length·=·_getLength(array); |
8 | ········var·index·=·dir·>·0·?·0·:·length·-·1; | ||
9 | ········if·(typeof·idx·==·'number')·{ | ||
10 | ············if·(dir·>·0)·{ | ||
11 | ················i·=·idx·>=·0·?·idx·:·Math.max(idx·+·length,·i); | ||
12 | ············}·else·{ | ||
13 | ················length·=·idx·>=·0·?·Math.min(idx·+·1,·length)·:·idx·+·length·+·1; | ||
14 | ············} | ||
15 | ········}·else·if·(sortedIndex·&&·idx·&&·length)·{ | ||
16 | ············idx·=·sortedIndex(array,·item); | ||
17 | ············return·array[idx]·===·item·?·idx·:·-1; | ||
18 | ········} | ||
19 | ········if·(item·!==·item)·{ | ||
20 | ············idx·=·predicateFind(_setup.slice.call(array,·i,·length),·isNaN); | ||
21 | ············return·idx·>=·0·?·idx·+·i·:·-1; | ||
22 | ········} | ||
23 | ········for·( | 9 | ········for·(;·index·>=·0·&&·index·<·length;·index·+=·dir)·{ |
24 | ············if·(array[idx]· | 10 | ············if·(predicate(array[index],·index,·array))·return·index; |
25 | ········} | 11 | ········} |
26 | ········return·-1; | 12 | ········return·-1; |
27 | ····}; | 13 | ····}; |
28 | } | 14 | } |
29 | module.exports·=·createIndexFinder; | 15 | module.exports·=·createPredicateIndexFinder; |
Offset 1, 9 lines modified | Offset 1, 9 lines modified | ||
1 | var·_setup·=·require('./index26.js'); | 1 | var·_setup·=·require('./index26.js'); |
2 | var·isNumber·=·require('./index9 | 2 | var·isNumber·=·require('./index95.js'); |
3 | //·Is·the·given·value·`NaN`? | 3 | //·Is·the·given·value·`NaN`? |
4 | function·isNaN(obj)·{ | 4 | function·isNaN(obj)·{ |
5 | ····return·isNumber(obj)·&&·_setup._isNaN(obj); | 5 | ····return·isNumber(obj)·&&·_setup._isNaN(obj); |
6 | } | 6 | } |
7 | module.exports·=·isNaN; | 7 | module.exports·=·isNaN; |
Offset 1, 5 lines modified | Offset 1, 6 lines modified | ||
1 | 1 | //·Is·a·given·value·equal·to·null? | |
2 | function·isNull(obj)·{ | ||
3 | ····return·obj·===·null; | ||
4 | } | ||
2 | var·isNumber·=·_tagTester('Number'); | ||
3 | module.exports·=·isNu | 5 | module.exports·=·isNull; |
Offset 1, 6 lines modified | Offset 1, 7 lines modified | ||
1 | //·Is·a·given·va | 1 | //·Is·a·given·variable·an·object? |
2 | function·is | 2 | function·isObject(obj)·{ |
3 | ····r | 3 | ····var·type·=·typeof·obj; |
4 | ····return·type·===·'function'·||·(type·===·'object'·&&·!!obj); | ||
4 | } | 5 | } |
5 | module.exports·=·is | 6 | module.exports·=·isObject; |
Offset 1, 7 lines modified | Offset 1, 5 lines modified | ||
1 | var·_tagTester·=·require('./index29.js'); | ||
1 | //·Is·a·given·variable·an·object? | ||
2 | function·isObject(obj)·{ | ||
3 | ····var·type·=·typeof·obj; | ||
4 | ····return·type·===·'function'·||·(type·===·'object'·&&·!!obj); | ||
5 | } | ||
2 | var·isNumber·=·_tagTester('Number'); | ||
6 | module.exports·=·is | 3 | module.exports·=·isNumber; |