functionList.js 189.3 KB
Newer Older
徐立's avatar
徐立 committed
1
import { 
徐立's avatar
徐立 committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
    isNaN,
    isEqual,
    findIndex,
    chunk,
    drop,
    camelCase,
    endsWith,
    pick,
    words,
    compact,
    concat,
    difference,
    differenceBy,
    differenceWith,
    dropRight,
    dropRightWhile,
    dropWhile,
    fill,
    findLastIndex,
    head,
    flatten,
    flattenDeep,
    flattenDepth,
    fromPairs,
    indexOf,
    initial,
    intersection,
    intersectionBy,
    intersectionWith,
    join,
    last,
    lastIndexOf,
    nth,
    pull,
    pullAll,
    pullAllBy,
    pullAllWith,
    remove,
    reverse,
    slice,
    sortedIndex,
    sortedIndexBy,
    sortedIndexOf,
    sortedLastIndex,
    sortedLastIndexBy,
    sortedLastIndexOf,
    sortedUniq,
    sortedUniqBy,
    tail,
    take,
    takeRight,
    takeRightWhile,
    takeWhile,
    union,
    unionBy,
    unionWith,
    uniq,
    uniqBy,
    uniqWith,
    unzip,
    unzipWith,
    without,
    xor,
    xorBy,
    xorWith,
    zip,
    zipObject,
    zipObjectDeep,
    zipWith,
    countBy,
    forEach,
    forEachRight,
    every,
} from 'lodash';
徐立's avatar
徐立 committed
76
import  moment from 'moment';
徐立's avatar
徐立 committed
77 78
import { openToast } from '../location/Notification';
import { showToast } from '../location/Toast';
徐立's avatar
徐立 committed
79
// 图片引入
徐立's avatar
徐立 committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
import Compatibility from '../assets/Compatibility.png';
import Compatibility2 from '../assets/Compatibility2.png';
import Dimensions from '../assets/Dimensions.png';
import Dimensions2 from '../assets/Dimensions2.png';
import Database from '../assets/Database.png';
import Database2 from '../assets/Database2.png';
import DateImg from '../assets/Date.png';
import DateImg2 from '../assets/Date2.png';
import Finance from '../assets/Finance.png';
import Finance2 from '../assets/Finance2.png';
import MessageImg from '../assets/Message.png';
import MessageImg2 from '../assets/Message2.png';
import Logic from '../assets/Logic.png';
import Logic2 from '../assets/Logic2.png';
import Find from '../assets/Find.png';
import Find2 from '../assets/Find2.png';
import MathImg from '../assets/Math.png';
import MathImg2 from '../assets/Math2.png';
import Statistics from '../assets/Statistics.png';
import Statistics2 from '../assets/Statistics2.png';
import TextImg from '../assets/Text.png';
import TextImg2 from '../assets/Text2.png';
import Project from '../assets/Project.png';
import Project2 from '../assets/Project2.png';
import Column from '../assets/Column.png';
import Column2 from '../assets/Column2.png';
import PieImg from '../assets/Pie.png';
import PieImg2 from '../assets/Pie2.png';
import Radar from '../assets/Radar.png';
import Radar2 from '../assets/Radar2.png';
import Bubble from '../assets/Bubble.png';
import Bubble2 from '../assets/Bubble2.png';
import Splashes from '../assets/Splashes.png';
import Splashes2 from '../assets/Splashes2.png';
import Dendrogram from '../assets/Dendrogram.png';
import Dendrogram2 from '../assets/Dendrogram2.png';
import Box from '../assets/Box.png';
import Box2 from '../assets/Box2.png';
import Rising from '../assets/Rising.png';
import Rising2 from '../assets/Rising2.png';
import Line from '../assets/Line.png';
import Line2 from '../assets/Line2.png';
import Straight from '../assets/Straight.png';
import Straight2 from '../assets/Straight2.png';
import ArrayPng from '../assets/Array.png';
import Array2Png from '../assets/Array2.png';
import NumberPng from '../assets/Number.png';
import Number2Png from '../assets/Number2.png';
import ObjectPng from '../assets/Object.png';
import Object2Png from '../assets/Object2.png';
import StringPng from '../assets/String.png';
import String2Png from '../assets/String2.png';
徐立's avatar
徐立 committed
132 133 134 135 136 137
let isArray = Array.isArray
/**
 * 函数集
 */
const List = [
    {
徐立's avatar
徐立 committed
138 139 140
        name: '数组操作函数',
        images: ArrayPng,
        pitchImages: Array2Png,
徐立's avatar
徐立 committed
141 142
        children:[
            {
徐立's avatar
徐立 committed
143
                name:'数组合并数组', // 函数代表名
徐立's avatar
徐立 committed
144 145
                funcName: '将传入2个数组进行合并,返回一个合并后数组', // 函数名字
                function: MERGEARRAY, // 当前函数
徐立's avatar
徐立 committed
146
                callKey: 'MERGEARRAY',
徐立's avatar
徐立 committed
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入合并数组', // 第一个参数代表含义
                    },
                    {
                        text:'传入合并数组', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[23,98,78],// 传入函数中的值
                        text:'[23,98,78]', // 展示页面所用值
                    },
                    {
                        value:[32,51,79],// 传入函数中的值
                        text:'[32,51,79]', // 展示页面所用值
                    },
                ],
                
            },
            {
徐立's avatar
徐立 committed
168 169 170 171
                name: '筛选非假值数组',// 函数代表名
                funcName: '创建一个新数组,包含原数组中所有的非假值元素。例如false, null, 0, "", undefined, 和 NaN 都是被认为是“假值”。',// 函数名字
                function: ArrayScreenFalse, // 当前函数
                callKey: 'ArrayScreenFalse',
徐立's avatar
徐立 committed
172 173
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
174
                        text:'传入需要筛选数组', // 第一个参数代表含义
徐立's avatar
徐立 committed
175 176 177 178
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
179 180 181
                        value:[23,98,78,false,''],// 传入函数中的值
                        text:'[23,98,78,false,""]', // 展示页面所用值
                    }
徐立's avatar
徐立 committed
182 183 184
                ],
            },
            {
徐立's avatar
徐立 committed
185 186 187 188
                name: '数组链接数组或值',// 函数代表名
                funcName: '创建一个新数组,将array与任何数组 或 值连接在一起。',// 函数名字
                function: ArrayConcatData, // 当前函数
                callKey: 'ArrayConcatData',
徐立's avatar
徐立 committed
189 190
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
191
                        text:'传入需要连接数组', // 第一个参数代表含义
徐立's avatar
徐立 committed
192 193
                    },
                    {
徐立's avatar
徐立 committed
194
                        text: '传入需要连接的数组或值'
徐立's avatar
徐立 committed
195 196 197 198
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
199 200
                        value:[23,98,78],// 传入函数中的值
                        text:'[23,98,78]', // 展示页面所用值
徐立's avatar
徐立 committed
201 202
                    },
                    {
徐立's avatar
徐立 committed
203 204 205
                        value:'8',// 传入函数中的值
                        text:'8', // 展示页面所用值
                    }
徐立's avatar
徐立 committed
206 207 208
                ],
            },
            {
徐立's avatar
徐立 committed
209 210 211 212
                name: '排除数组指定值',// 函数代表名
                funcName: '创建一个新数组,这个数组中的值,为第一个数字(array 参数)排除了给定数组中的值。',// 函数名字
                function: ArrayDifference, // 当前函数
                callKey: 'ArrayDifference',
徐立's avatar
徐立 committed
213 214
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
215
                        text:'要检查的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
216 217
                    },
                    {
徐立's avatar
徐立 committed
218
                        text: '排除的值。'
徐立's avatar
徐立 committed
219 220 221 222
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
223 224
                        value:[3, 2, 1],// 传入函数中的值
                        text:'[3, 2, 1]', // 展示页面所用值
徐立's avatar
徐立 committed
225 226
                    },
                    {
徐立's avatar
徐立 committed
227 228 229
                        value:[4, 2],// 传入函数中的值
                        text:'[4, 2]', // 展示页面所用值
                    }
徐立's avatar
徐立 committed
230 231 232
                ],
            },
            {
徐立's avatar
徐立 committed
233 234 235 236
                name: '排除数组指定值(指定规则)',// 函数代表名
                funcName: '它接受一个 iteratee (注:迭代器), 调用array 和 values 中的每个元素以产生比较的标准。 结果值是从第一数组中选择。',// 函数名字
                function: ArrayDifferenceBy, // 当前函数
                callKey: 'ArrayDifferenceBy',
徐立's avatar
徐立 committed
237 238
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
239
                        text:'要检查的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
240 241
                    },
                    {
徐立's avatar
徐立 committed
242 243 244 245
                        text: '排除的值。'
                    },
                    {
                        text: 'iteratee 调用每个元素。'
徐立's avatar
徐立 committed
246 247 248 249
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
250 251
                        value:[{ x: 2 }, { x: 1 }],// 传入函数中的值
                        text:'[{ x: 2 }, { x: 1 }]', // 展示页面所用值
徐立's avatar
徐立 committed
252 253
                    },
                    {
徐立's avatar
徐立 committed
254 255
                        value:[{ x: 1 }],// 传入函数中的值
                        text:'[{ x: 1 }]', // 展示页面所用值
徐立's avatar
徐立 committed
256
                    },
徐立's avatar
徐立 committed
257 258 259 260
                    {
                        value:'x',
                        text:'x', // 展示页面所用值
                    }
徐立's avatar
徐立 committed
261 262 263
                ],
            },
            {
徐立's avatar
徐立 committed
264 265 266 267
                name: '筛选数组中不相同的值',// 函数代表名
                funcName: '比较array,values中的元素。 结果值是从第一数组中选择。',// 函数名字
                function: ArrayDifferenceWith, // 当前函数
                callKey: 'ArrayDifferenceWith',
徐立's avatar
徐立 committed
268 269
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
270 271 272 273 274
                        text:'要检查的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '排除的值。'
                    },
徐立's avatar
徐立 committed
275 276 277
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
278 279 280 281 282 283 284
                        value:[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],// 传入函数中的值
                        text:"[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]", // 展示页面所用值
                    },
                    {
                        value:[{ 'x': 1, 'y': 2 }],// 传入函数中的值
                        text:"[{ 'x': 1, 'y': 2 }]", // 展示页面所用值
                    },
徐立's avatar
徐立 committed
285 286 287
                ],
            },
            {
徐立's avatar
徐立 committed
288 289 290 291
                name:'数组指定切片', // 函数代表名
                funcName: '将传入数组按照传入长度进行切片,返回一个切片后数组', // 函数名字
                function: REMOVEARRAYDROP, // 当前函数
                callKey: 'REMOVEARRAYDROP',
徐立's avatar
徐立 committed
292 293
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
294
                        text:'传入需要切片数组', // 第一个参数代表含义
徐立's avatar
徐立 committed
295 296
                    },
                    {
徐立's avatar
徐立 committed
297
                        text:'传入切片长度', // 第二个参数代表含义
徐立's avatar
徐立 committed
298 299 300 301
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
302 303
                        value:[23,98,78,65,32,11,12],// 传入函数中的值
                        text:'[23,98,78,65,32,11,12]', // 展示页面所用值
徐立's avatar
徐立 committed
304 305
                    },
                    {
徐立's avatar
徐立 committed
306 307 308
                        value:2,// 传入函数中的值
                        text:'2', // 展示页面所用值
                    },
徐立's avatar
徐立 committed
309 310 311
                ],
            },
            {
徐立's avatar
徐立 committed
312 313 314 315
                name:'数组从尾部指定切片', // 函数代表名
                funcName: '创建一个切片数组,去除array尾部的n个元素。(n默认值为1。)', // 函数名字
                function: ArrayDropRight, // 当前函数
                callKey: 'ArrayDropRight',
徐立's avatar
徐立 committed
316 317
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
318
                        text:'要查询的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
319 320
                    },
                    {
徐立's avatar
徐立 committed
321
                        text:'要去除的元素个数。', // 第二个参数代表含义
徐立's avatar
徐立 committed
322 323 324 325
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
326 327
                        value:[1, 2, 3],// 传入函数中的值
                        text:'[1, 2, 3]', // 展示页面所用值
徐立's avatar
徐立 committed
328 329
                    },
                    {
徐立's avatar
徐立 committed
330 331 332
                        value:2,// 传入函数中的值
                        text:'2', // 展示页面所用值
                    },
徐立's avatar
徐立 committed
333 334 335
                ],
            },
            {
徐立's avatar
徐立 committed
336 337 338 339
                name:'数组从尾部指定规则切片', // 函数代表名
                funcName: '创建一个切片数组,从尾部去除array中从 predicate 返回假值开始到尾部的部分。', // 函数名字
                function: ArrayDropRightWhile, // 当前函数
                callKey: 'ArrayDropRightWhile',
徐立's avatar
徐立 committed
340 341
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
342 343 344 345
                        text:'要查询的数组。', // 第一个参数代表含义
                    },
                    {
                        text:'筛选规则,这个函数会在每一次迭代调用。', // 第二个参数代表含义
徐立's avatar
徐立 committed
346 347 348 349
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
                        value:[
                            { 'user': 'barney',  'active': false },
                            { 'user': 'fred',    'active': true },
                            { 'user': 'pebbles', 'active': false }
                        ],// 传入函数中的值
                        text:`[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                          ]`, // 展示页面所用值
                    },
                    {
                        value:function(o) { return !o.active; },// 传入函数中的值
                        text:`function(o) { return !o.active; }`, // 展示页面所用值
                    },
徐立's avatar
徐立 committed
365 366 367
                ],
            },
            {
徐立's avatar
徐立 committed
368 369 370 371
                name:'数组指定规则切片', // 函数代表名
                funcName: '创建一个切片数组,去除array中从 predicate 返回假值开始到尾部的部分。', // 函数名字
                function: ArrayDropWhile, // 当前函数
                callKey: 'ArrayDropWhile',
徐立's avatar
徐立 committed
372 373
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
374 375 376 377
                        text:'要查询的数组。', // 第一个参数代表含义
                    },
                    {
                        text:'筛选规则,这个函数会在每一次迭代调用。', // 第二个参数代表含义
徐立's avatar
徐立 committed
378 379 380 381
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
                        value:[
                            { 'user': 'barney',  'active': false },
                            { 'user': 'fred',    'active': true },
                            { 'user': 'pebbles', 'active': false }
                        ],// 传入函数中的值
                        text:`[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                          ]`, // 展示页面所用值
                    },
                    {
                        value:function(o) { return !o.active; },// 传入函数中的值
                        text:`function(o) { return !o.active; }`, // 展示页面所用值
                    },
                ],
            },
徐立's avatar
徐立 committed
399
            {
徐立's avatar
徐立 committed
400 401 402 403
                name:'填充数组', // 函数代表名
                funcName: '使用 value 值来填充(替换) array,从start位置开始, 到end位置结束(但不包含end位置)。', // 函数名字
                function: ArrayFill, // 当前函数
                callKey: 'ArrayFill',
徐立's avatar
徐立 committed
404 405
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
406
                        text:'要填充改变的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
407 408
                    },
                    {
徐立's avatar
徐立 committed
409
                        text:'填充(替换)给 array 的值。', // 第二个参数代表含义
徐立's avatar
徐立 committed
410 411
                    },
                    {
徐立's avatar
徐立 committed
412 413 414 415
                        text:'开始位置(默认0) 可不传',
                    },
                    {
                        text: '结束位置(默认全部)  可不传',
徐立's avatar
徐立 committed
416 417 418 419
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
420 421
                        value:[1, 2, 3],// 传入函数中的值
                        text:`[1, 2, 3]`, // 展示页面所用值
徐立's avatar
徐立 committed
422 423
                    },
                    {
徐立's avatar
徐立 committed
424 425
                        value:'a',// 传入函数中的值
                        text:'a', // 展示页面所用值
徐立's avatar
徐立 committed
426 427 428 429
                    },
                ],
            },
            {
徐立's avatar
徐立 committed
430 431 432 433
                name:'数组指定查找,返回下标', // 函数代表名
                funcName: '该方法返回第一个通过 predicate 判断为真值的元素的索引值(index),而不是元素本身。', // 函数名字
                function: ArrayFindIndex, // 当前函数
                callKey: 'ArrayFindIndex',
徐立's avatar
徐立 committed
434 435
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
436 437 438 439 440
                        text:' 要搜索的数组。', // 第一个参数代表含义
                    },
                    {
                        text:'这个函数会在每一次迭代调用。', // 第二个参数代表含义
                    },
徐立's avatar
徐立 committed
441 442 443
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
                        value:[
                            { 'user': 'fred',    'active': false },
                            { 'user': 'barney',  'active': false },
                            { 'user': 'pebbles', 'active': true }
                        ],// 传入函数中的值
                        text:`[
                            { 'user': 'fred',    'active': false },
                            { 'user': 'barney',  'active': false },
                            { 'user': 'pebbles', 'active': true }
                        ]`, // 展示页面所用值
                    },
                    {
                        value:function(o) { return o.user == 'barney'; },// 传入函数中的值
                        text:"function(o) { return o.user == 'barney'; }", // 展示页面所用值
                    },
徐立's avatar
徐立 committed
459 460 461
                ],
            },
            {
徐立's avatar
徐立 committed
462 463 464 465
                name:'数组从末尾指定查找,返回下标', // 函数代表名
                funcName: '该方法从末尾查询返回第一个通过 predicate 判断为真值的元素的索引值(index),而不是元素本身。', // 函数名字
                function: ArrayFindLastIndex, // 当前函数
                callKey: 'ArrayFindLastIndex',
徐立's avatar
徐立 committed
466 467
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
468 469 470 471 472
                        text:' 要搜索的数组。', // 第一个参数代表含义
                    },
                    {
                        text:'这个函数会在每一次迭代调用。', // 第二个参数代表含义
                    },
徐立's avatar
徐立 committed
473 474 475
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
                        value:[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                            ],// 传入函数中的值
                        text:`[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                            ]`, // 展示页面所用值
                    },
                    {
                        value:function(o) { return o.user == 'pebbles'},// 传入函数中的值
                        text:"function(o) { return o.user == 'pebbles'}", // 展示页面所用值
                    },
徐立's avatar
徐立 committed
491 492 493
                ],
            },
            {
徐立's avatar
徐立 committed
494 495 496 497
                name:'数组首数据获取,返回下标', // 函数代表名
                funcName: '获取数组 array 的第一个元素。', // 函数名字
                function: ArrayHead, // 当前函数
                callKey: 'ArrayHead',
徐立's avatar
徐立 committed
498 499
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
500 501
                        text:' 要查询的数组。', // 第一个参数代表含义
                    },
徐立's avatar
徐立 committed
502 503 504
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
505 506 507
                        value:[1, 2, 3],// 传入函数中的值
                        text:`[1, 2, 3]`, // 展示页面所用值
                    },
徐立's avatar
徐立 committed
508 509 510
                ],
            },
            {
徐立's avatar
徐立 committed
511 512 513 514
                name:'数组嵌套深度减少一级', // 函数代表名
                funcName: '减少一级array嵌套深度。', // 函数名字
                function: ArrayFlatten, // 当前函数
                callKey: 'ArrayFlatten',
徐立's avatar
徐立 committed
515 516
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
517 518
                        text:' 需要减少嵌套层级的数组。', // 第一个参数代表含义
                    },
徐立's avatar
徐立 committed
519 520 521
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
522 523 524
                        value:[1, 2, [[3],[4],[5]]],// 传入函数中的值
                        text:`[1, 2, [[3],[4],[5]]]`, // 展示页面所用值
                    },
徐立's avatar
徐立 committed
525 526 527
                ],
            },
            {
徐立's avatar
徐立 committed
528 529 530 531
                name:'数组嵌套深度指定减少', // 函数代表名
                funcName: '减少指定层级array嵌套深度。', // 函数名字
                function: ArrayFlattenDepth, // 当前函数
                callKey: 'ArrayFlattenDepth',
徐立's avatar
徐立 committed
532 533
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
534
                        text:' 需要减少嵌套层级的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
535 536
                    },
                    {
徐立's avatar
徐立 committed
537
                        text: '2'
徐立's avatar
徐立 committed
538 539 540 541
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
542 543
                        value:[1, 2, [[3],[4],[5]]],// 传入函数中的值
                        text:`[1, 2, [[3],[4],[5]]]`, // 展示页面所用值
徐立's avatar
徐立 committed
544 545
                    },
                    {
徐立's avatar
徐立 committed
546 547
                        value: 2,
                        text: 2,
徐立's avatar
徐立 committed
548 549 550 551
                    }
                ],
            },
            {
徐立's avatar
徐立 committed
552 553 554 555
                name:'数组清除嵌套深度', // 函数代表名
                funcName: '将array递归为一维数组。', // 函数名字
                function: ArrayFlattenDeep, // 当前函数
                callKey: 'ArrayFlattenDeep',
徐立's avatar
徐立 committed
556 557
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
558
                        text:' 需要处理嵌套的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
559 560 561 562
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
563 564
                        value:[[1], [2], [[3,6],[4],[5]]],// 传入函数中的值
                        text:`[[1], [2], [[3,6],[4],[5]]]`, // 展示页面所用值
徐立's avatar
徐立 committed
565
                    },
徐立's avatar
徐立 committed
566 567 568 569 570 571 572 573
                ],
            },
            {
                name:'数组pairs格式化为对象', // 函数代表名
                funcName: '将数组pairs格式化为对象', // 函数名字
                function: ArrayFromPairs, // 当前函数
                callKey: 'ArrayFromPairs',
                params: [ // 函数所需要传入值内容 为空为不传值
徐立's avatar
徐立 committed
574
                    {
徐立's avatar
徐立 committed
575 576 577 578 579 580 581
                        text:' 键值对pairs。', // 第一个参数代表含义
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[['fred', 30], ['barney', 40]],// 传入函数中的值
                        text:`[['fred', 30], ['barney', 40]]`, // 展示页面所用值
徐立's avatar
徐立 committed
582 583 584 585
                    },
                ],
            },
            {
徐立's avatar
徐立 committed
586 587 588 589
                name:'数组查找', // 函数代表名
                funcName: '返回首次 value 在数组array中被找到的 索引值, 如果 fromIndex 为负值,将从数组array尾端索引进行匹配。', // 函数名字
                function: ArrayIndexOf, // 当前函数
                callKey: 'ArrayIndexOf',
徐立's avatar
徐立 committed
590 591
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
592 593 594 595 596 597 598
                        text:'  需要查找的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '需要查找的值。',
                    },
                    {
                        text: '开始查询的位置。 可不传'
徐立's avatar
徐立 committed
599 600 601 602
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
603 604 605 606 607 608
                        value:[1, 2, 1, 2],// 传入函数中的值
                        text:`[1, 2, 1, 2]`, // 展示页面所用值
                    },
                    {
                        value:2,
                        text:2,
徐立's avatar
徐立 committed
609
                    }
徐立's avatar
徐立 committed
610
                ],
徐立's avatar
徐立 committed
611 612
            },
            {
徐立's avatar
徐立 committed
613 614 615 616
                name:'数组删除最后一个元素', // 函数代表名
                funcName: '获取数组array中除了最后一个元素之外的所有元素(注:去除数组array中的最后一个元素)。', // 函数名字
                function: ArrayInitial, // 当前函数
                callKey: 'ArrayInitial',
徐立's avatar
徐立 committed
617 618
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
619
                        text:'  需要查找的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
620 621 622 623
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
624 625
                        value:[1, 2, 1, 2],// 传入函数中的值
                        text:`[1, 2, 1, 2]`, // 展示页面所用值
徐立's avatar
徐立 committed
626
                    }
徐立's avatar
徐立 committed
627
                ],
徐立's avatar
徐立 committed
628 629
            },
            {
徐立's avatar
徐立 committed
630 631 632 633
                name:'数组相同对比', // 函数代表名
                funcName: '创建唯一值的数组,这个数组包含所有给定数组都包含的元素,', // 函数名字
                function: ArrayIntersection, // 当前函数
                callKey: 'ArrayIntersection',
徐立's avatar
徐立 committed
634 635
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
636
                        text:'  待检查的数组', // 第一个参数代表含义
徐立's avatar
徐立 committed
637 638 639 640
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
641 642
                        value:[[2, 1], [4, 2], [1, 2]],// 传入函数中的值
                        text:`[[2, 1], [4, 2], [1, 2]]`, // 展示页面所用值
徐立's avatar
徐立 committed
643
                    }
徐立's avatar
徐立 committed
644
                ],
徐立's avatar
徐立 committed
645 646
            },
            {
徐立's avatar
徐立 committed
647 648 649 650
                name:'数组指定规则做相同对比', // 函数代表名
                funcName: '它接受一个 iteratee 调用每一个arrays的每个值以产生一个值,通过产生的值进行了比较。结果值是从第一数组中选择。', // 函数名字
                function: ArrayIntersectionBy, // 当前函数
                callKey: 'ArrayIntersectionBy',
徐立's avatar
徐立 committed
651 652
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
653 654 655 656
                        text:'  待检查的数组', // 第一个参数代表含义
                    },
                    {
                        text: 'iteratee(迭代器)调用每个元素。'
徐立's avatar
徐立 committed
657 658 659 660
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
661 662 663 664 665 666
                        value:[[{ x: 1 }], [{ x: 2 }, { x: 1 }]],// 传入函数中的值
                        text:`[[{ x: 1 }], [{ x: 2 }, { x: 1 }]]`, // 展示页面所用值
                    },
                    {
                        value:'x',
                        text:'x'
徐立's avatar
徐立 committed
667
                    }
徐立's avatar
徐立 committed
668
                ],
徐立's avatar
徐立 committed
669 670
            },
            {
徐立's avatar
徐立 committed
671 672 673 674
                name:'数组按照指定格式转换字符串', // 函数代表名
                funcName: '将 array 中的所有元素转换为由 separator 分隔的字符串。', // 函数名字
                function: ArrayJoin, // 当前函数
                callKey: 'ArrayJoin',
徐立's avatar
徐立 committed
675 676
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
677 678 679 680 681
                        text:'待转换的数组', // 第一个参数代表含义
                    },
                    {
                        text: '分隔元素'
                    },
徐立's avatar
徐立 committed
682 683 684
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
685 686 687 688 689 690
                        value:['a', 'b', 'c'],// 传入函数中的值
                        text:`['a', 'b', 'c']`, // 展示页面所用值
                    },
                    {
                        value: '~',
                        text: '~'
徐立's avatar
徐立 committed
691
                    }
徐立's avatar
徐立 committed
692
                ],
徐立's avatar
徐立 committed
693 694
            },
            {
徐立's avatar
徐立 committed
695 696 697 698
                name:'数组获取最后一个参数', // 函数代表名
                funcName: '获取array中的最后一个元素。', // 函数名字
                function: ArrayLast, // 当前函数
                callKey: 'ArrayLast',
徐立's avatar
徐立 committed
699 700
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
701
                        text:'待检索的数组', // 第一个参数代表含义
徐立's avatar
徐立 committed
702 703 704 705
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
706 707
                        value:['a', 'b', 'c'],// 传入函数中的值
                        text:`['a', 'b', 'c']`, // 展示页面所用值
徐立's avatar
徐立 committed
708
                    }
徐立's avatar
徐立 committed
709
                ],
徐立's avatar
徐立 committed
710 711
            },
            {
徐立's avatar
徐立 committed
712 713 714 715
                name:'数组反向查找', // 函数代表名
                funcName: '它是从右到左遍历array的元素。返回查找到的元素', // 函数名字
                function: ArrayLastIndexOf, // 当前函数
                callKey: 'ArrayLastIndexOf',
徐立's avatar
徐立 committed
716 717
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
718 719 720 721 722 723 724
                        text:'待检索的数组', // 第一个参数代表含义
                    },
                    {
                        text: '要搜索的值。',
                    },
                    {
                        text: '开始搜索的索引值。(默认最后位) 可不传'
徐立's avatar
徐立 committed
725 726 727 728
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
729 730 731 732 733 734
                        value:[1, 2, 1, 2],// 传入函数中的值
                        text:`[1, 2, 1, 2]`, // 展示页面所用值
                    },
                    {
                        value:1,
                        text:1
徐立's avatar
徐立 committed
735
                    }
徐立's avatar
徐立 committed
736
                ],
徐立's avatar
徐立 committed
737 738
            },
            {
徐立's avatar
徐立 committed
739 740 741 742
                name:'数组获取指定参数', // 函数代表名
                funcName: '获取array数组的第n个元素。如果n为负数,则返回从数组结尾开始的第n个元素。', // 函数名字
                function: ArrayNth, // 当前函数
                callKey: 'ArrayNth',
徐立's avatar
徐立 committed
743 744
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
745
                        text:'要查询的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
746 747
                    },
                    {
徐立's avatar
徐立 committed
748
                        text: '要返回元素的索引值。',
徐立's avatar
徐立 committed
749 750 751 752
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
753 754
                        value:[1, 3, 1, 2],// 传入函数中的值
                        text:`[1, 3, 1, 2]`, // 展示页面所用值
徐立's avatar
徐立 committed
755 756
                    },
                    {
徐立's avatar
徐立 committed
757 758
                        value:1,
                        text:1
徐立's avatar
徐立 committed
759
                    }
徐立's avatar
徐立 committed
760
                ],
徐立's avatar
徐立 committed
761 762
            },
            {
徐立's avatar
徐立 committed
763 764 765 766
                name:'数组删除指定元素', // 函数代表名
                funcName: '移除数组array中所有和给定值相等的元素,使用 SameValueZero 进行全等比较。 会修改传入数组', // 函数名字
                function: ArrayPull, // 当前函数
                callKey: 'ArrayPull',
徐立's avatar
徐立 committed
767 768
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
769
                        text:'要修改的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
770 771
                    },
                    {
徐立's avatar
徐立 committed
772
                        text: '需要删除的值 可多个',
徐立's avatar
徐立 committed
773 774 775 776
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
777 778
                        value:[3, 53, 87, 2],// 传入函数中的值
                        text:`[3, 53, 87, 2]`, // 展示页面所用值
徐立's avatar
徐立 committed
779 780
                    },
                    {
徐立's avatar
徐立 committed
781 782
                        value:2,
                        text:2
徐立's avatar
徐立 committed
783
                    }
徐立's avatar
徐立 committed
784
                ],
徐立's avatar
徐立 committed
785 786
            },
            {
徐立's avatar
徐立 committed
787 788 789 790
                name: '数组删除指定元素(删除值为数组包裹)',
                funcName: '移除数组array中所有和给定值相等的元素,使用 SameValueZero 进行全等比较。区别是这个方法接收一个要移除值的数组。 会修改传入数组', // 函数名字
                function: ArrayPullAll, // 当前函数
                callKey: 'ArrayPullAll',
徐立's avatar
徐立 committed
791 792
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
793
                        text:'要修改的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
794 795
                    },
                    {
徐立's avatar
徐立 committed
796
                        text: '需要删除的值数组',
徐立's avatar
徐立 committed
797 798 799 800
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
801 802
                        value:[3, 53, 87, 2],// 传入函数中的值
                        text:`[3, 53, 87, 2]`, // 展示页面所用值
徐立's avatar
徐立 committed
803 804
                    },
                    {
徐立's avatar
徐立 committed
805 806
                        value:[2,53],
                        text:'[2,53]'
徐立's avatar
徐立 committed
807
                    }
徐立's avatar
徐立 committed
808
                ],
徐立's avatar
徐立 committed
809 810
            },
            {
徐立's avatar
徐立 committed
811 812 813 814
                name:'数组删除指定元素(支持对象)', // 函数代表名
                funcName: '这个方法接受一个 iteratee(迭代函数) 调用 array 和 values的每个值以产生一个值,通过产生的值进行了比较。 会修改传入数组', // 函数名字
                function: ArrayPullAllBy, // 当前函数
                callKey: 'ArrayPullAllBy',
徐立's avatar
徐立 committed
815 816
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
817
                        text:' 要修改的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
818 819
                    },
                    {
徐立's avatar
徐立 committed
820
                        text: '要移除值的数组。',
徐立's avatar
徐立 committed
821 822
                    },
                    {
徐立's avatar
徐立 committed
823
                        text: 'iteratee(迭代器)调用每个元素。'
徐立's avatar
徐立 committed
824 825 826 827
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
828 829
                        value:[{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'y': 1 }],// 传入函数中的值
                        text:`[{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'y': 1 }];`, // 展示页面所用值
徐立's avatar
徐立 committed
830 831
                    },
                    {
徐立's avatar
徐立 committed
832 833
                        value:[{'x':3},{'y':1}],
                        text:`[{'x':3},{'y':1}]`
徐立's avatar
徐立 committed
834 835
                    },
                    {
徐立's avatar
徐立 committed
836 837
                        value: 'x',
                        text: 'x'
徐立's avatar
徐立 committed
838
                    }
徐立's avatar
徐立 committed
839
                ],
徐立's avatar
徐立 committed
840 841
            },
            {
徐立's avatar
徐立 committed
842 843 844 845
                name:'数组删除指定元素(支持对象,且不需要迭代器)', // 函数代表名
                funcName: '调用 array 和 values的每个值以产生一个值,通过产生的值进行了比较。 会修改传入数组', // 函数名字
                function: ArrayPullAllWith, // 当前函数
                callKey: 'ArrayPullAllWith',
徐立's avatar
徐立 committed
846 847
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
848
                        text:' 要修改的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
849 850
                    },
                    {
徐立's avatar
徐立 committed
851 852
                        text: '要移除值的数组。',
                    }
徐立's avatar
徐立 committed
853 854 855
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
856 857
                        value:[{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'y': 1 }],// 传入函数中的值
                        text:`[{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'y': 1 }];`, // 展示页面所用值
徐立's avatar
徐立 committed
858 859
                    },
                    {
徐立's avatar
徐立 committed
860 861
                        value:[{'x':3},{'y':1}],
                        text:`[{'x':3},{'y':1}]`
徐立's avatar
徐立 committed
862
                    }
徐立's avatar
徐立 committed
863
                ],
徐立's avatar
徐立 committed
864 865
            },
            {
徐立's avatar
徐立 committed
866 867 868 869
                name:'数组移除指定下标数据', // 函数代表名
                funcName: '根据索引 indexes,移除array中对应的元素,并返回被移除元素的数组。', // 函数名字
                function: ArrayPullAt, // 当前函数
                callKey: 'ArrayPullAt',
徐立's avatar
徐立 committed
870 871
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
872
                        text:' 要修改的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
873 874
                    },
                    {
徐立's avatar
徐立 committed
875
                        text: '要移除元素的索引。',
徐立's avatar
徐立 committed
876 877 878 879
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
880 881
                        value:[5, 10, 15, 20],// 传入函数中的值
                        text:`[5, 10, 15, 20]`, // 展示页面所用值
徐立's avatar
徐立 committed
882 883
                    },
                    {
徐立's avatar
徐立 committed
884 885 886
                        value:1,
                        text:1
                    }
徐立's avatar
徐立 committed
887 888 889
                ],
            },
            {
徐立's avatar
徐立 committed
890 891 892 893
                name:'数组指定规则删除元素', // 函数代表名
                funcName: '移除数组中predicate(断言)返回为真值的所有元素,并返回移除元素组成的数组。', // 函数名字
                function: ArrayRemove, // 当前函数
                callKey: 'ArrayRemove',
徐立's avatar
徐立 committed
894 895
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
896 897 898 899
                        text:' 要修改的数组。', // 第一个参数代表含义
                    },
                    {
                        text: ' 每次迭代调用的函数。',
徐立's avatar
徐立 committed
900 901 902 903
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
904 905 906 907 908 909 910 911 912 913
                        value:[1, 2, 3, 4,5,6],// 传入函数中的值
                        text:`[1, 2, 3, 4,5,6]`, // 展示页面所用值
                    },
                    {
                        value:function(n) {
                            return n % 2 == 0;
                            },
                        text:`function(n) {
                            return n % 2 == 0;
                            }`
徐立's avatar
徐立 committed
914
                    }
徐立's avatar
徐立 committed
915
                ],
徐立's avatar
徐立 committed
916 917
            },
            {
徐立's avatar
徐立 committed
918 919 920 921
                name:'数组反转', // 函数代表名
                funcName: '反转array,使得第一个元素变为最后一个元素,第二个元素变为倒数第二个元素,依次类推。返回新数组', // 函数名字
                function: ArrayReverse, // 当前函数
                callKey: 'ArrayReverse',
徐立's avatar
徐立 committed
922 923
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
924
                        text:' 要修改的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
925 926 927 928
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
929 930
                        value:[1, 2, 3, 4],// 传入函数中的值
                        text:`[1, 2, 3, 4]`, // 展示页面所用值
徐立's avatar
徐立 committed
931
                    }
徐立's avatar
徐立 committed
932
                ],
徐立's avatar
徐立 committed
933 934
            },
            {
徐立's avatar
徐立 committed
935 936 937 938
                name:'数组指定裁剪', // 函数代表名
                funcName: '裁剪数组array,从 start 位置开始到end结束,但不包括 end 本身的位置。', // 函数名字
                function: ArraySlice, // 当前函数
                callKey: 'ArraySlice',
徐立's avatar
徐立 committed
939 940
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
941 942 943 944 945 946 947
                        text:' 要裁剪数组。', // 第一个参数代表含义
                    },
                    {
                        text: '开始位置。(默认为0)'
                    },
                    {
                        text: '结束位置。(默认为最后)'
徐立's avatar
徐立 committed
948 949 950 951
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
952 953 954 955 956 957 958 959 960 961
                        value:[1, 2, 3, 4],// 传入函数中的值
                        text:`[1, 2, 3, 4]`, // 展示页面所用值
                    },
                    {
                        value:0,
                        text:0
                    },
                    {
                        value:2,
                        text:2
徐立's avatar
徐立 committed
962
                    }
徐立's avatar
徐立 committed
963
                ],
徐立's avatar
徐立 committed
964 965
            },
            {
徐立's avatar
徐立 committed
966 967 968 969
                name:'数组插入值判定', // 函数代表名
                funcName: '使用二进制的方式检索来决定 value值 应该插入到数组中 尽可能小的索引位置,以保证array的排序。', // 函数名字
                function: ArraySortedIndex, // 当前函数
                callKey: 'ArraySortedIndex',
徐立's avatar
徐立 committed
970 971
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
972 973 974 975
                        text:' 要检查的排序数组。', // 第一个参数代表含义
                    },
                    {
                        text: '要评估的值'
徐立's avatar
徐立 committed
976 977 978 979
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
980 981 982 983 984 985
                        value:[10, 20, 30, 40],// 传入函数中的值
                        text:`[10, 20, 30, 40]`, // 展示页面所用值
                    },
                    {
                        value:22,
                        text:22
徐立's avatar
徐立 committed
986
                    }
徐立's avatar
徐立 committed
987
                ],
徐立's avatar
徐立 committed
988 989
            },
            {
徐立's avatar
徐立 committed
990 991 992 993
                name:'数组指定迭代器插入值判断', // 函数代表名
                funcName: '它接受一个 iteratee (迭代函数),调用每一个数组(array)元素,返回结果和value 值比较来计算排序', // 函数名字
                function: ArraySortedIndexBy, // 当前函数
                callKey: 'ArraySortedIndexBy',
徐立's avatar
徐立 committed
994 995
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
996
                        text:'要检查的排序数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
997 998
                    },
                    {
徐立's avatar
徐立 committed
999 1000 1001 1002
                        text: '要评估的值。'
                    },
                    {
                        text: '迭代函数,调用每个元素。'
徐立's avatar
徐立 committed
1003 1004 1005 1006
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1007 1008
                        value:[{ 'x': 4 }, { 'x': 6 }],// 传入函数中的值
                        text:`[{ 'x': 4 }, { 'x': 6 }]`, // 展示页面所用值
徐立's avatar
徐立 committed
1009 1010
                    },
                    {
徐立's avatar
徐立 committed
1011 1012 1013 1014 1015 1016
                        value:{ 'x': 5 },
                        text:`{ 'x': 5 }`
                    },
                    {
                        value:function(o) { return o.x; },
                        text:`function(o) { return o.x; }`
徐立's avatar
徐立 committed
1017
                    }
徐立's avatar
徐立 committed
1018
                ],
徐立's avatar
徐立 committed
1019 1020
            },
            {
徐立's avatar
徐立 committed
1021 1022 1023 1024
                name:'排序数组二进制查找', // 函数代表名
                funcName: '这个方法类似 indexOf,除了它是在已经排序的数组array上执行二进制检索。不存在返回-1', // 函数名字
                function: ArraySortedIndexOf, // 当前函数
                callKey: 'ArraySortedIndexOf',
徐立's avatar
徐立 committed
1025 1026
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1027 1028 1029 1030
                        text:' 要搜索的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '搜索的值。'
徐立's avatar
徐立 committed
1031 1032 1033 1034
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1035 1036 1037 1038 1039 1040
                        value:[10, 20, 30, 40],// 传入函数中的值
                        text:`[10, 20, 30, 40]`, // 展示页面所用值
                    },
                    {
                        value:20,
                        text:20
徐立's avatar
徐立 committed
1041
                    }
徐立's avatar
徐立 committed
1042
                ],
徐立's avatar
徐立 committed
1043 1044
            },
            {
徐立's avatar
徐立 committed
1045 1046 1047 1048
                name:'排序数组查找最后一次出现索引',
                funcName: '它返回 value值 在 array 中尽可能大的索引位置(index)。不存在返回-1', // 函数名字
                function: ArraySortedLastIndex, // 当前函数
                callKey: 'ArraySortedLastIndex',
徐立's avatar
徐立 committed
1049 1050
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1051
                        text:' 要搜索的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1052 1053
                    },
                    {
徐立's avatar
徐立 committed
1054
                        text: '搜索的值。'
徐立's avatar
徐立 committed
1055 1056 1057 1058
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1059 1060
                        value:[10, 20, 20, 30, 40],// 传入函数中的值
                        text:`[10, 20, 20, 30, 40]`, // 展示页面所用值
徐立's avatar
徐立 committed
1061 1062
                    },
                    {
徐立's avatar
徐立 committed
1063 1064 1065
                        value:20,
                        text:20
                    }
徐立's avatar
徐立 committed
1066 1067 1068
                ],
            },
            {
徐立's avatar
徐立 committed
1069 1070 1071 1072
                name:'排序数组反向指定规则插入',
                funcName: '它接受一个 iteratee (迭代函数),调用每一个数组(array)元素,返回结果和value 值比较来计算排序。返回因插入的下标', // 函数名字
                function: ArraySortedLastIndexBy, // 当前函数
                callKey: 'ArraySortedLastIndexBy',
徐立's avatar
徐立 committed
1073 1074
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1075 1076 1077 1078 1079 1080 1081
                        text:' 要检查的排序数组。', // 第一个参数代表含义
                    },
                    {
                        text: '要评估的值。'
                    },
                    {
                        text: '迭代函数,调用每个元素'
徐立's avatar
徐立 committed
1082 1083 1084 1085
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095
                        value:[{ 'x': 4 }, { 'x': 5 }],// 传入函数中的值
                        text:`[{ 'x': 4 }, { 'x': 5 }]`, // 展示页面所用值
                    },
                    {
                        value:{ 'x': 4.5 },
                        text:`{ 'x': 4.5 }`
                    },
                    {
                        value:function(o) { return o.x; },
                        text:`function(o) { return o.x; }`
徐立's avatar
徐立 committed
1096
                    }
徐立's avatar
徐立 committed
1097
                ],
徐立's avatar
徐立 committed
1098 1099
            },
            {
徐立's avatar
徐立 committed
1100 1101 1102 1103
                name:'排序数组反向二进制查找',
                funcName: '它是在已经排序的数组array上执行反向二进制检索。不存在返回-1', // 函数名字
                function: ArraySortedLastIndexOf, // 当前函数
                callKey: 'ArraySortedLastIndexOf',
徐立's avatar
徐立 committed
1104 1105
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1106 1107 1108 1109
                        text:' 要搜索的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '搜索的值。'
徐立's avatar
徐立 committed
1110 1111 1112 1113
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1114 1115 1116 1117 1118 1119
                        value:[10, 20, 20, 30, 40],// 传入函数中的值
                        text:`[10, 20, 20, 30, 40]`, // 展示页面所用值
                    },
                    {
                        value:20,
                        text:20
徐立's avatar
徐立 committed
1120
                    }
徐立's avatar
徐立 committed
1121
                ],
徐立's avatar
徐立 committed
1122 1123
            },
            {
徐立's avatar
徐立 committed
1124 1125 1126 1127
                name:'数组去重',
                funcName: '它会优化排序数组,返回一个不重复数组', // 函数名字
                function: ArraySortedUniq, // 当前函数
                callKey: 'ArraySortedUniq',
徐立's avatar
徐立 committed
1128 1129
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1130 1131 1132 1133
                        text:' 要搜索的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '搜索的值。'
徐立's avatar
徐立 committed
1134 1135 1136 1137
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1138 1139
                        value:[10, 10, 20, 20, 30, 30, 40, 40],// 传入函数中的值
                        text:`[10, 10, 20, 20, 30, 30, 40, 40]`, // 展示页面所用值
徐立's avatar
徐立 committed
1140
                    }
徐立's avatar
徐立 committed
1141
                ],
徐立's avatar
徐立 committed
1142 1143
            },
            {
徐立's avatar
徐立 committed
1144 1145 1146 1147
                name:'数组去重(指定规则)',
                funcName: '它会根据指定规则优化排序数组。,返回一个不重复数组', // 函数名字
                function: ArraySortedUniqBy, // 当前函数
                callKey: 'ArraySortedUniqBy',
徐立's avatar
徐立 committed
1148 1149
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1150 1151 1152 1153
                        text:'要检查的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '迭代函数,调用每个元素。'
徐立's avatar
徐立 committed
1154 1155 1156 1157
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1158 1159 1160 1161 1162 1163
                        value:[1.1, 1.2, 2.3, 2.4],// 传入函数中的值
                        text:`[1.1, 1.2, 2.3, 2.4]`, // 展示页面所用值
                    },
                    {
                        value: Math.floor,
                        text:'Math.floor'
徐立's avatar
徐立 committed
1164
                    }
徐立's avatar
徐立 committed
1165
                ],
徐立's avatar
徐立 committed
1166 1167
            },
            {
徐立's avatar
徐立 committed
1168 1169 1170 1171
                name:'数组(除第一个数据)数据获取',
                funcName: '获取除了array数组第一个元素以外的全部元素。', // 函数名字
                function: ArrayTail, // 当前函数
                callKey: 'ArrayTail',
徐立's avatar
徐立 committed
1172 1173
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1174
                        text:' 要检查的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1175 1176 1177 1178
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1179 1180
                        value:[10, 10, 20, 20, 30, 30, 40, 40],// 传入函数中的值
                        text:`[10, 10, 20, 20, 30, 30, 40, 40]`, // 展示页面所用值
徐立's avatar
徐立 committed
1181
                    }
徐立's avatar
徐立 committed
1182
                ],
徐立's avatar
徐立 committed
1183 1184
            },
            {
徐立's avatar
徐立 committed
1185 1186 1187 1188
                name:'数组指定数量元素提取',
                funcName: '创建一个数组切片,从array数组的起始元素开始提取n个元素。', // 函数名字
                function: ArrayTake, // 当前函数
                callKey: 'ArrayTake',
徐立's avatar
徐立 committed
1189 1190
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1191 1192 1193 1194
                        text:' 要检索的数组', // 第一个参数代表含义
                    },
                    {
                        text: '要提取的元素个数。'
徐立's avatar
徐立 committed
1195 1196 1197 1198
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1199 1200 1201 1202 1203 1204
                        value:[10, 10, 20, 20, 30, 30, 40, 40],// 传入函数中的值
                        text:`[10, 10, 20, 20, 30, 30, 40, 40]`, // 展示页面所用值
                    },
                    {
                        value:5,
                        text:5
徐立's avatar
徐立 committed
1205
                    }
徐立's avatar
徐立 committed
1206
                ],
徐立's avatar
徐立 committed
1207 1208
            },
            {
徐立's avatar
徐立 committed
1209 1210 1211 1212
                name:'数组(从最后开始)指定数量元素提取',
                funcName: '创建一个数组切片,从array数组的最后一个元素开始提取n个元素。', // 函数名字
                function: ArrayTakeRight, // 当前函数
                callKey: 'ArrayTakeRight',
徐立's avatar
徐立 committed
1213 1214
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1215
                        text:' 要检查的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1216 1217
                    },
                    {
徐立's avatar
徐立 committed
1218
                        text: '要提取的元素个数。'
徐立's avatar
徐立 committed
1219 1220 1221 1222
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1223 1224
                        value:[10, 10, 20, 20, 30, 30, 40, 40],// 传入函数中的值
                        text:`[10, 10, 20, 20, 30, 30, 40, 40]`, // 展示页面所用值
徐立's avatar
徐立 committed
1225 1226
                    },
                    {
徐立's avatar
徐立 committed
1227 1228
                        value:5,
                        text:5
徐立's avatar
徐立 committed
1229
                    }
徐立's avatar
徐立 committed
1230
                ],
徐立's avatar
徐立 committed
1231 1232
            },
            {
徐立's avatar
徐立 committed
1233 1234 1235 1236
                name:'数组指定规则元素提取',
                funcName: '从array数组的起始元素开始提取元素,直到 规则 返回假值。', // 函数名字
                function: ArrayTakeWhile, // 当前函数
                callKey: 'ArrayTakeWhile',
徐立's avatar
徐立 committed
1237 1238
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1239
                        text:' 要检索的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1240 1241
                    },
                    {
徐立's avatar
徐立 committed
1242
                        text: '每次迭代调用的函数。'
徐立's avatar
徐立 committed
1243 1244 1245 1246
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256
                        value:[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                            ],// 传入函数中的值
                        text:`[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                          ]`, // 展示页面所用值
徐立's avatar
徐立 committed
1257 1258
                    },
                    {
徐立's avatar
徐立 committed
1259 1260
                        value:function(o) { return o.active; },
                        text:`function(o) { return o.active; }`
徐立's avatar
徐立 committed
1261
                    }
徐立's avatar
徐立 committed
1262
                ],
徐立's avatar
徐立 committed
1263 1264
            },
            {
徐立's avatar
徐立 committed
1265 1266 1267 1268
                name:'数组(从最后开始)指定规则元素提取',
                funcName: '从array数组的最后一个元素开始提取元素,直到规则返回假值。', // 函数名字
                function: ArrayTakeRightWhile, // 当前函数
                callKey: 'ArrayTakeRightWhile',
徐立's avatar
徐立 committed
1269 1270
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1271 1272 1273 1274
                        text:' 要检索的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '每次迭代调用的函数。'
徐立's avatar
徐立 committed
1275 1276 1277 1278
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292
                        value:[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                            ],// 传入函数中的值
                        text:`[
                            { 'user': 'barney',  'active': true },
                            { 'user': 'fred',    'active': false },
                            { 'user': 'pebbles', 'active': false }
                          ]`, // 展示页面所用值
                    },
                    {
                        value:function(o) { return !o.active; },
                        text:`function(o) { return !o.active; }`
徐立's avatar
徐立 committed
1293
                    }
徐立's avatar
徐立 committed
1294
                ],
徐立's avatar
徐立 committed
1295 1296
            },
            {
徐立's avatar
徐立 committed
1297 1298 1299 1300
                name:'多个数组去重合并',
                funcName: '创建一个按顺序排列的唯一值的数组。所有给定数组的元素值做等值比较。', // 函数名字
                function: ArrayUnion, // 当前函数
                callKey: 'ArrayUnion',
徐立's avatar
徐立 committed
1301 1302
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1303 1304
                        text:' 要检查的数组。可传多个', // 第一个参数代表含义
                    }
徐立's avatar
徐立 committed
1305 1306 1307
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1308 1309
                        value:[10, 10, 20, 20, 30, 30, 40, 40],// 传入函数中的值
                        text:`[10, 10, 20, 20, 30, 30, 40, 40]`, // 展示页面所用值
徐立's avatar
徐立 committed
1310 1311
                    },
                    {
徐立's avatar
徐立 committed
1312 1313
                        value:[10,25,30,35,40,45],
                        text:`[10,25,30,35,40,45]`
徐立's avatar
徐立 committed
1314
                    },
徐立's avatar
徐立 committed
1315 1316 1317 1318 1319
                    {
                        value:[10,25,30,35,40,45],
                        text:`[10,25,30,35,40,45]`
                    },
                ],
徐立's avatar
徐立 committed
1320 1321
            },
            {
徐立's avatar
徐立 committed
1322 1323 1324 1325
                name:'多个数组按照规则去重合并(支持对象)',
                funcName: '它接受一个 iteratee (迭代函数),调用每一个数组(array)的每个元素以产生唯一性计算的标准。', // 函数名字
                function: ArrayUnionBy, // 当前函数
                callKey: 'ArrayUnionBy',
徐立's avatar
徐立 committed
1326 1327
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1328
                        text:' 需要合并的数组组,', // 第一个参数代表含义
徐立's avatar
徐立 committed
1329
                    },
徐立's avatar
徐立 committed
1330 1331 1332
                    {
                        text:'迭代函数,调用每个元素。'
                    }
徐立's avatar
徐立 committed
1333 1334 1335
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1336 1337 1338 1339 1340 1341 1342 1343
                        value:[[{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }]],// 传入函数中的值
                        text:`[[{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }]]`, // 展示页面所用值
                    },
                    {
                        value:'x',
                        text:`x`
                    },
                ],
徐立's avatar
徐立 committed
1344 1345
            },
            {
徐立's avatar
徐立 committed
1346 1347 1348 1349
                name:'多个数组去重合并(支持对象)',
                funcName: '它接受一个 comparator 调用比较arrays数组的每一个元素。 ', // 函数名字
                function: ArrayUnionWith, // 当前函数
                callKey: 'ArrayUnionWith',
徐立's avatar
徐立 committed
1350 1351
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1352 1353 1354 1355 1356
                        text:' 需要合并的数组,', // 第一个参数代表含义
                    },
                    {
                        text:' 需要合并的数组,', // 第一个参数代表含义
                    },
徐立's avatar
徐立 committed
1357 1358 1359
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1360 1361
                        value:[{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 1 }],// 传入函数中的值
                        text:`[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]`, // 展示页面所用值
徐立's avatar
徐立 committed
1362
                    },
徐立's avatar
徐立 committed
1363 1364 1365 1366 1367
                    {
                        value:[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],
                        text:`[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]`
                    },
                ],
徐立's avatar
徐立 committed
1368 1369
            },
            {
徐立's avatar
徐立 committed
1370 1371 1372 1373
                name:'数组去重(简版)',
                funcName: '创建一个去重后的array数组副本。只有第一次出现的元素才会被保留。', // 函数名字
                function: ArrayUniq, // 当前函数
                callKey: 'ArrayUniq',
徐立's avatar
徐立 committed
1374 1375
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1376
                        text:' 要检查的数组。,', // 第一个参数代表含义
徐立's avatar
徐立 committed
1377 1378 1379 1380
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1381 1382 1383 1384
                        value:[2, 1, 2],// 传入函数中的值
                        text:`[2, 1, 2]`, // 展示页面所用值
                    }
                ],
徐立's avatar
徐立 committed
1385 1386
            },
            {
徐立's avatar
徐立 committed
1387 1388 1389 1390
                name:'数组对象自动去重',
                funcName: '它接受一个 comparator 调用比较arrays数组的每一个元素', // 函数名字
                function: ArrayUniqWith, // 当前函数
                callKey: 'ArrayUniqWith',
徐立's avatar
徐立 committed
1391 1392
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1393
                        text:' 要检查的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1394 1395 1396 1397
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1398 1399 1400 1401
                        value:[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }],// 传入函数中的值
                        text:`[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]`, // 展示页面所用值
                    }
                ],
徐立's avatar
徐立 committed
1402 1403
            },
            {
徐立's avatar
徐立 committed
1404 1405 1406 1407
                name:'数组重组',
                funcName: '它接收分组元素的数组,并且创建一个数组,分组元素到打包前的结构。返回数组的第一个元素包含所有的输入数组的第一元素,第一个元素包含了所有的输入数组的第二元素,依此类推。)', // 函数名字
                function: ArrayUnzip, // 当前函数
                callKey: 'ArrayUnzip',
徐立's avatar
徐立 committed
1408 1409
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1410
                        text:' 要重组的数组。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1411 1412
                    },
                    {
徐立's avatar
徐立 committed
1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444
                        text:' 要重组的数组。', // 第一个参数代表含义
                    },
                    {
                        text:' 要重组的数组。', // 第一个参数代表含义
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:['fred', 'barney'],// 传入函数中的值
                        text:`['fred', 'barney']`, // 展示页面所用值
                    },
                    {
                        value:[30, 40],
                        text: `[30, 40]`
                    },
                    {
                        value:[true, false],
                        text:`[true, false]`
                    }
                ],
            },
            {
                name:'数组指定规则重组',
                funcName: '它接受一个iteratee指定重组值应该如何被组合。', // 函数名字
                function: ArrayUnzipWidth, // 当前函数
                callKey: 'ArrayUnzipWidth',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:' 要处理的分组元素数组。', // 第一个参数代表含义
                    },
                    {
                        text:'这个函数用来组合重组的值。'
徐立's avatar
徐立 committed
1445 1446 1447 1448
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1449 1450
                        value:[[1, 10, 100], [2, 20, 200]],// 传入函数中的值
                        text:`[[1, 10, 100], [2, 20, 200]]`, // 展示页面所用值
徐立's avatar
徐立 committed
1451 1452
                    },
                    {
徐立's avatar
徐立 committed
1453 1454 1455 1456 1457 1458
                        value:function(num,num1) {
                            return num+num1
                        },
                        text:`function(num,num1) {
                            return num+num1
                        }`
徐立's avatar
徐立 committed
1459
                    }
徐立's avatar
徐立 committed
1460
                ],
徐立's avatar
徐立 committed
1461 1462
            },
            {
徐立's avatar
徐立 committed
1463 1464 1465 1466
                name:'数组剔除指定参数',
                funcName: '创建一个剔除所有给定值的新数组', // 函数名字
                function: ArrayWithout, // 当前函数
                callKey: 'ArrayWithout',
徐立's avatar
徐立 committed
1467 1468
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
                        text:' 要检查的数组。', // 第一个参数代表含义
                    },
                    {
                        text: '要剔除的值。 可多个'
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[2, 1, 2, 3],// 传入函数中的值
                        text:`[2, 1, 2, 3]`, // 展示页面所用值
                    },
                    {
                        value:1,
                        text:1
                    },
                    {
                        value:2,
                        text:2,
                    }
                ],
            },
            {
                name:'数组过滤',
                funcName: '创建一个给定数组唯一值的数组,返回值的顺序取决于他们数组的出现顺序,返回过滤后的新数组', // 函数名字
                function: ArrayXor, // 当前函数
                callKey: 'ArrayXor',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:' 要过滤的数组。', // 第一个参数代表含义
                    },
                    {
                        text:'要过滤的数组。'
徐立's avatar
徐立 committed
1501 1502 1503 1504
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514
                        value:[2, 1],// 传入函数中的值
                        text:`[2, 1]`, // 展示页面所用值
                    },
                    {
                        value: [2, 3],
                        text: `[2, 3]`
                    },
                    {
                        value: [3, 4],
                        text: `[3, 4]`
徐立's avatar
徐立 committed
1515
                    }
徐立's avatar
徐立 committed
1516
                ],
徐立's avatar
徐立 committed
1517 1518
            },
            {
徐立's avatar
徐立 committed
1519 1520 1521 1522
                name:'数组指定规则过滤',
                funcName: '它接受 迭代器,这个迭代器 调用每一个 arrays(数组)的每一个值,以生成比较的新值。', // 函数名字
                function: ArrayXorBy, // 当前函数
                callKey: 'ArrayXorBy',
徐立's avatar
徐立 committed
1523 1524
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1525 1526 1527 1528
                        text:' 要检查的数组组。', // 第一个参数代表含义
                    },
                    {
                        text:' 调用每一个元素的迭代函数。'
徐立's avatar
徐立 committed
1529 1530 1531 1532
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1533 1534 1535 1536 1537 1538
                        value:[[{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }]],// 传入函数中的值
                        text:`[[{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }]]`, // 展示页面所用值
                    },
                    {
                        value: 'x',
                        text: `x`
徐立's avatar
徐立 committed
1539
                    }
徐立's avatar
徐立 committed
1540
                ],
徐立's avatar
徐立 committed
1541 1542
            },
            {
徐立's avatar
徐立 committed
1543 1544 1545 1546
                name:'数组过滤(支持对象)',
                funcName: '接收对象进行相同筛选,以调用比较数组的元素。', // 函数名字
                function: ArrayXorBy, // 当前函数
                callKey: 'ArrayXorBy',
徐立's avatar
徐立 committed
1547 1548
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1549 1550 1551 1552
                        text:' 要检查的数组组。', // 第一个参数代表含义
                    },
                    {
                        text:' 调用每一个元素的迭代函数。'
徐立's avatar
徐立 committed
1553 1554 1555 1556
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1557 1558 1559 1560 1561 1562
                        value:[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],// 传入函数中的值
                        text:`[{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]`, // 展示页面所用值
                    },
                    {
                        value: 'x',
                        text: `x`
徐立's avatar
徐立 committed
1563
                    }
徐立's avatar
徐立 committed
1564
                ],
徐立's avatar
徐立 committed
1565 1566
            },
            {
徐立's avatar
徐立 committed
1567 1568 1569 1570
                name:'多数组合并',
                funcName: '创建一个分组元素的数组,数组的第一个元素包含所有给定数组的第一个元素,数组的第二个元素包含所有给定数组的第二个元', // 函数名字
                function: ArrayZip, // 当前函数
                callKey: 'ArrayZip',
徐立's avatar
徐立 committed
1571 1572
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1573 1574 1575 1576 1577 1578 1579
                        text:'要处理的数组。传多个', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:['fred', 'barney'],// 传入函数中的值
                        text:`['fred', 'barney']`, // 展示页面所用值
徐立's avatar
徐立 committed
1580 1581
                    },
                    {
徐立's avatar
徐立 committed
1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601
                        value: [30, 40],
                        text: `[30, 40]`
                    },
                    {
                        value: [true, false],
                        text: `[true, false]`
                    }
                ],
            },
            {
                name:'数组合并为对象',
                funcName: '它接受2个数组,第一个数组中的值作为属性标识符(属性名),第二个数组中的值作为相应的属性值。', // 函数名字
                function: ArrayZipObject, // 当前函数
                callKey: 'ArrayZipObject',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'作为对象标识符数组', // 第一个参数代表含义
                    },
                    {
                        text:'作为属性值数组'
徐立's avatar
徐立 committed
1602 1603 1604 1605
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1606 1607
                        value:['name', 'age', 'year'],// 传入函数中的值
                        text:`['name', 'age', 'year']`, // 展示页面所用值
徐立's avatar
徐立 committed
1608 1609
                    },
                    {
徐立's avatar
徐立 committed
1610 1611
                        value: ['张三', 18, 2018],
                        text: `['张三', 18, 2018]`
徐立's avatar
徐立 committed
1612
                    }
徐立's avatar
徐立 committed
1613
                ],
徐立's avatar
徐立 committed
1614 1615
            },
            {
徐立's avatar
徐立 committed
1616 1617 1618 1619
                name:'数组合并为指定路径对象',
                funcName: '它支持属性路径接受2个数组,第一个数组中的值作为属性标识符(属性名),第二个数组中的值作为相应的属性值。', // 函数名字
                function: ArrayZipObjectDeep, // 当前函数
                callKey: 'ArrayZipObjectDeep',
徐立's avatar
徐立 committed
1620 1621
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1622 1623 1624 1625
                        text:'作为对象标识符数组', // 第一个参数代表含义
                    },
                    {
                        text:'作为属性值数组'
徐立's avatar
徐立 committed
1626 1627 1628 1629
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1630 1631 1632 1633 1634 1635
                        value:['a.b[0].c', 'a.b[1].d'],// 传入函数中的值
                        text:`['a.b[0].c', 'a.b[1].d']`, // 展示页面所用值
                    },
                    {
                        value: [1, 2],
                        text: `[1, 2]`
徐立's avatar
徐立 committed
1636
                    }
徐立's avatar
徐立 committed
1637
                ],
徐立's avatar
徐立 committed
1638 1639
            },
            {
徐立's avatar
徐立 committed
1640 1641 1642 1643
                name:'数组指定规则合成',
                funcName: '它接受一个 iteratee(迭代函数),来 指定分组的值应该如何被组合。 该iteratee调用每个组的元素', // 函数名字
                function: ArrayZipWith, // 当前函数
                callKey: 'ArrayZipWith',
徐立's avatar
徐立 committed
1644 1645
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1646 1647 1648 1649
                        text:'要处理的数组组。', // 第一个参数代表含义
                    },
                    {
                        text:'函数用来组合分组的值。'
徐立's avatar
徐立 committed
1650 1651 1652 1653
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672
                        value:[[1, 2], [10, 20], [100, 200],[40,60]],// 传入函数中的值
                        text:`[[1, 2], [10, 20], [100, 200],[40,60]]`, // 展示页面所用值
                    },
                    {
                        value: function(...ary) {
                            let num = 0
                            ary.map(item=>{
                                console.log(item)
                                num+=item
                            })
                            return num
                          },
                        text: `function(...ary) {
                            let num = 0
                            ary.map(item=>{
                                num+=item
                            })
                            return num
                          }`
徐立's avatar
徐立 committed
1673
                    }
徐立's avatar
徐立 committed
1674
                ],
徐立's avatar
徐立 committed
1675
            },
徐立's avatar
徐立 committed
1676 1677 1678 1679 1680 1681 1682
        ],
    },
    {
        name: '对象操作函数',
        images: ObjectPng,
        pitchImages: Object2Png,
        children:[
徐立's avatar
徐立 committed
1683
            {
徐立's avatar
徐立 committed
1684 1685 1686 1687
                name:'数组指定规则生成对象', // 函数代表名
                funcName: '创建一个组成对象,key(键)是经过 iteratee(迭代函数) 执行处理collection中每个元素后返回的结果,每个key(键)对应的值是 iteratee(迭代函数)返回该key(键)的次数', // 函数名字
                function: ObjectCountBy, // 当前函数
                callKey: 'ObjectCountBy',
徐立's avatar
徐立 committed
1688 1689
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1690 1691 1692 1693
                        text:'一个用来迭代的数组。', // 第一个参数代表含义
                    },
                    {
                        text:'一个迭代函数', // 第二个参数代表含义
徐立's avatar
徐立 committed
1694 1695 1696 1697
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717
                        value:['one', 'two', 'three'],// 传入函数中的值
                        text:`['one', 'two', 'three']`, // 展示页面所用值
                    },
                    {
                        value:'length',// 传入函数中的值
                        text:'length', // 展示页面所用值
                    },
                ],
            },
            {
                name:'对象制定规则遍历', // 函数代表名
                funcName: '调用 iteratee 遍历 collection(集合) 中的每个元素,如果迭代函数(iteratee)显式的返回 false ,迭代会提前退出。', // 函数名字
                function: ObjectForEach, // 当前函数
                callKey: 'ObjectForEach',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'一个用来迭代的集合。', // 第一个参数代表含义
                    },
                    {
                        text:'函数用来组合分组的值。', // 第二个参数代表含义
徐立's avatar
徐立 committed
1718
                    }
徐立's avatar
徐立 committed
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:{ 'a': 1, 'b': 2 },// 传入函数中的值
                        text:`{ 'a': 1, 'b': 2 }`, // 展示页面所用值
                    },
                    {
                        value:function(value, key) {
                            console.log(value,key);
                            },// 传入函数中的值
                        text:`function(value, key) {
                            console.log(value,key);
                            }`, // 展示页面所用值
                    },
                ],
徐立's avatar
徐立 committed
1734 1735
            },
            {
徐立's avatar
徐立 committed
1736 1737 1738 1739
                name:'对象制定规则反向遍历', // 函数代表名
                funcName: '调用 iteratee 反方向遍历 collection(集合) 中的每个元素,如果迭代函数(iteratee)显式的返回 false ,迭代会提前退出。', // 函数名字
                function: ObjectForEachRight, // 当前函数
                callKey: 'ObjectForEachRight',
徐立's avatar
徐立 committed
1740 1741
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
徐立's avatar
徐立 committed
1742
                        text:'一个用来迭代的集合。', // 第一个参数代表含义
徐立's avatar
徐立 committed
1743 1744
                    },
                    {
徐立's avatar
徐立 committed
1745
                        text:'函数用来组合分组的值。', // 第二个参数代表含义
徐立's avatar
徐立 committed
1746 1747 1748 1749
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
徐立's avatar
徐立 committed
1750 1751
                        value:{ 'a': 1, 'b': 2 },// 传入函数中的值
                        text:`{ 'a': 1, 'b': 2 }`, // 展示页面所用值
徐立's avatar
徐立 committed
1752 1753
                    },
                    {
徐立's avatar
徐立 committed
1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773
                        value:function(value, key) {
                            console.log(value,key);
                            },// 传入函数中的值
                        text:`function(value, key) {
                            console.log(value,key);
                            }`, // 展示页面所用值
                    },
                ],
            },
            {
                name:'对象制定规则断言', // 函数代表名
                funcName: '通过 predicate(断言函数) 检查 collection(集合)中的 所有 元素是否都返回真值。一旦 predicate(断言函数) 返回假值,迭代就马上停止。', // 函数名字
                function: ObjectEvery, // 当前函数
                callKey: 'ObjectEvery',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'一个用来迭代的集合。', // 第一个参数代表含义
                    },
                    {
                        text:'函数用来组合分组的值。', // 第二个参数代表含义
徐立's avatar
徐立 committed
1774
                    }
徐立's avatar
徐立 committed
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[
                            { 'user': 'barney', 'age': 36, 'active': false },
                            { 'user': 'fred',   'age': 40, 'active': false }
                            ],// 传入函数中的值
                        text:`[
                            { 'user': 'barney', 'age': 36, 'active': false },
                            { 'user': 'fred',   'age': 40, 'active': false }
                            ]`, // 展示页面所用值
                    },
                    {
                        value:{ 'user': 'barney', 'active': false },// 传入函数中的值
                        text:`{ 'user': 'barney', 'active': false }`, // 展示页面所用值
                    },
                ],
            }
        ],
    },
    {
        name: '数字操作函数',
        images: NumberPng,
        pitchImages: Number2Png,
        children:[
            {
                name:'兼容合并数组', // 函数代表名
                funcName: '将传入2个数组进行合并,返回一个合并后数组', // 函数名字
                function: MERGEARRAY, // 当前函数
                callKey: 'MERGEARRAY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入合并数组', // 第一个参数代表含义
                    },
                    {
                        text:'传入合并数组', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[23,98,78],// 传入函数中的值
                        text:'[23,98,78]', // 展示页面所用值
                    },
                    {
                        value:[32,51,79],// 传入函数中的值
                        text:'[32,51,79]', // 展示页面所用值
                    },
                ],
                
徐立's avatar
徐立 committed
1824
            },
徐立's avatar
徐立 committed
1825
        ],
徐立's avatar
徐立 committed
1826
    },
徐立's avatar
徐立 committed
1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192
    {
        name: '字符串操作函数',
        images: StringPng,
        pitchImages: String2Png,
        children:[
            {
                name:'兼容合并数组', // 函数代表名
                funcName: '将传入2个数组进行合并,返回一个合并后数组', // 函数名字
                function: MERGEARRAY, // 当前函数
                callKey: 'MERGEARRAY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入合并数组', // 第一个参数代表含义
                    },
                    {
                        text:'传入合并数组', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[23,98,78],// 传入函数中的值
                        text:'[23,98,78]', // 展示页面所用值
                    },
                    {
                        value:[32,51,79],// 传入函数中的值
                        text:'[32,51,79]', // 展示页面所用值
                    },
                ],
                
            },
        ],
    },
    {
        name:'兼容性函数', // 系列函数名称
        images: Compatibility,
        pitchImages: Compatibility2,
        children:[
            {
                name:'兼容合并数组', // 函数代表名
                funcName: '将传入2个数组进行合并,返回一个合并后数组', // 函数名字
                function: MERGEARRAY, // 当前函数
                callKey: 'MERGEARRAY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入合并数组', // 第一个参数代表含义
                    },
                    {
                        text:'传入合并数组', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[23,98,78],// 传入函数中的值
                        text:'[23,98,78]', // 展示页面所用值
                    },
                    {
                        value:[32,51,79],// 传入函数中的值
                        text:'[32,51,79]', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'兼容拆分数组', // 函数代表名
                funcName: '将传入数组按照传入长度进行拆分,返回一个拆分后多维数组', // 函数名字
                function: SPLITARRAY, // 当前函数
                callKey: 'SPLITARRAY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要拆分数组', // 第一个参数代表含义
                    },
                    {
                        text:'传入拆分长度', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[23,98,78,65,32,11,12],// 传入函数中的值
                        text:'[23,98,78,65,32,11,12]', // 展示页面所用值
                    },
                    {
                        value:2,// 传入函数中的值
                        text:'2', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'兼容切片数组', // 函数代表名
                funcName: '将传入数组按照传入长度进行切片,返回一个切片后数组', // 函数名字
                function: REMOVEARRAYDROP, // 当前函数
                callKey: 'REMOVEARRAYDROP',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要切片数组', // 第一个参数代表含义
                    },
                    {
                        text:'传入切片长度', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[23,98,78,65,32,11,12],// 传入函数中的值
                        text:'[23,98,78,65,32,11,12]', // 展示页面所用值
                    },
                    {
                        value:2,// 传入函数中的值
                        text:'2', // 展示页面所用值
                    },
                ],
                
            },
        ]
    },
 
    {
        name:'多维数据集函数', // 系列函数名称
        images: Dimensions,
        pitchImages: Dimensions2,
        children:[
            {
                name:'多维数据数组对象从大到小排序', // 函数代表名
                funcName: '检查传入数组中对象,并根据指定数字属性进行从大到小排序', // 函数名字
                function: ARRAYSORTONJECT, // 当前函数
                callKey: 'ARRAYSORTONJECT',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要排序的数组', // 第一个参数代表含义
                    },
                    {
                        text:'需要排序的对象指定值', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[{name:'xx',age:19},{name:'ss',age:16},{name:'ww',age:12}
                        ,{name:'ee',age:17},{name:'qq',age:14},{name:'uu',age:22}],// 传入函数中的值
                        text:`[{name:'xx',age:19},{name:'ss',age:16},{name:'ww',age:12}
                        ,{name:'ee',age:17},{name:'qq',age:14},{name:'uu',age:22}]`, // 展示页面所用值
                    },
                    {
                        value:'age',// 传入函数中的值
                        text:'age', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'多维数据数组对象从小到大排序', // 函数代表名
                funcName: '检查传入数组中对象,并根据指定数字属性进行从小到大排序', // 函数名字
                function: ARRAYSORTONJECTTWO, // 当前函数
                callKey: 'ARRAYSORTONJECTTWO',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要排序的数组', // 第一个参数代表含义
                    },
                    {
                        text:'需要排序的对象指定值', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[{name:'qq',age:19},{name:'ss',age:56},{name:'ww',age:12}
                        ,{name:'ii',age:17},{name:'qq',age:34},{name:'uu',age:22}],// 传入函数中的值
                        text:`[{name:'qq',age:19},{name:'ss',age:56},{name:'ww',age:12}
                        ,{name:'ii',age:17},{name:'qq',age:34},{name:'uu',age:22}]`, // 展示页面所用值
                    },
                    {
                        value:'age',// 传入函数中的值
                        text:'age', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'多维数据对象转为数组', // 函数代表名
                funcName: '检查传入对象,并进行转换为数组', // 函数名字
                function: OBJECTTOARRY, // 当前函数
                callKey: 'OBJECTTOARRY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的对象', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:{name:'xx',age:12,address:'china'},// 传入函数中的值
                        text:"{name:'xx',age:12,address:'china'}", // 展示页面所用值
                    }
                ],
            },
            {
                name:'多维数据获取对象指定值', // 函数代表名
                funcName: '检查传入对象,获取需要的指定key值', // 函数名字
                function: OBJECTGETKEY, // 当前函数
                callKey: 'OBJECTGETKEY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要操作的对象', // 第一个参数代表含义
                    },
                    {
                        text:'获取数组中指定的key值'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:{name:'xx',age:12,address:'china',time:'2019-10-10'},// 传入函数中的值
                        text:"{name:'xx',age:12,address:'china',time:'2019-10-10'}", // 展示页面所用值
                    },
                    {
                        value:['name','address'],
                        text: "['name','address']"
                    }
                ],
            },
            {
                name:'多维数据子数组排序', // 函数代表名
                funcName: '传入多维数组,并对子数组中数值排序进行,非子数组则会跳过', // 函数名字
                function: ARRAYMANYSORT, // 当前函数
                callKey: 'ARRAYMANYSORT',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要排序的多维数组', // 第一个参数代表含义
                    },
                    {
                        text:'是否从大到小排序,默认从大到小'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    
                    {
                        value:[[43,12,56,26,47],[21,76,74,23,63],'我不是数组',[85,74,12,53,23]],
                        text: "[[43,12,56,26,47],[21,76,74,23,63],'我不是数组',[85,74,12,53,23]]"
                    },
                    {
                        value:false,
                        text:'false'
                    }
                ],
            },
            {
                name:'多维数据子数组中对象拆分为数组', // 函数代表名
                funcName: '传入多维数组,并对子数组中对象进行拆分成数组,非子数组则会跳过', // 函数名字
                function: ARRAYSPLITOBJECT, // 当前函数
                callKey: 'ARRAYSPLITOBJECT',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要拆分的多维数组', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    
                    {
                        value:[[{age:21,name:'sx',address:'chind'},{post:'职位',title:'标题'}],[{name1:'as',age1:43,address:'china'},{post:'职位',title:'标题'}]],
                        text: "[[{age:21,name:'sx',address:'chind'},{post:'职位',title:'标题'}],[{name1:'as',age1:43,address:'china'},{post:'职位',title:'标题'}]]"
                    }
                ],
            },
        ]
    },
    {
        name:'数据库函数', // 系列函数名称
        images: Database,
        pitchImages: Database2,
        children:[
            {
                name:'数据库函数子函数', // 函数代表名
                funcName: 'sql', // 函数名字
                function: sql, // 当前函数
                callKey: 'sql',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:'', // 传入函数中的值
                        text: '', // 展示页面所用值
                    }
                ]
            }
        ]
    },
    {
        name:'日期和时间函数', // 系列函数名称
        images: DateImg,
        pitchImages: DateImg2,
        children:[
            {
                name:'日期差值计算', // 函数代表名
                funcName: '将传入2个时间戳进行计算,返回2者时间戳差值', // 函数名字
                function: CONTRASTTIME, // 当前函数
                callKey: 'CONTRASTTIME',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入计算时间戳', // 第一个参数代表含义
                    },
                    {
                        text:'传入计算时间戳', // 第二个参数代表含义
                    },
                    {
                        text:'是否需要将时间差值进行转换(true或false)',
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:1576122231269,// 传入函数中的值
                        text:'1576122231269', // 展示页面所用值
                    },
                    {
                        value:1576111231269,// 传入函数中的值
                        text:'1576121231269', // 展示页面所用值
                    },
                    {
                        value:true,
                        text:'true'
                    }
                ],
            },
            {
                name:'日期年月日格式化', // 函数代表名
                funcName: '将传入的时间戳格式化为年月日', // 函数名字
                function: DATEGETYEAR, // 当前函数
                callKey: 'DATEGETYEAR',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要格式化时间戳', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:1576122231269,// 传入函数中的值
                        text:'1576122231269', // 展示页面所用值
                    }
                ],
            },
            {
                name:'日期月日格式化', // 函数代表名
                funcName: '将传入的时间戳格式化为月日', // 函数名字
                function: DATAGETMONTH, // 当前函数
                callKey: 'DATAGETMONTH',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要格式化时间戳', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:1576122231269,// 传入函数中的值
                        text:'1576122231269', // 展示页面所用值
                    }
                ],
            },
            {
                name:'日期日格式化', // 函数代表名
                funcName: '将传入的时间戳格式化为日', // 函数名字
                function: DATAGETDAY, // 当前函数
                callKey: 'DATAGETDAY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要格式化时间戳', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:1576122231269,// 传入函数中的值
                        text:'1576122231269', // 展示页面所用值
                    }
                ],
            },
            {
                name:'日期时间格式化', // 函数代表名
                funcName: '将传入的时间戳格式化为时间', // 函数名字
                function: DATAGETTIME, // 当前函数
                callKey: 'DATAGETTIME',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要格式化时间戳', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:1576122231269,// 传入函数中的值
                        text:'1576122231269', // 展示页面所用值
                    }
                ],
            },
            {
                name:'日期自定义格式化', // 函数代表名
                funcName: '将传入的时间戳按照自定义格式化为时间格式', // 函数名字
                function: DATAGETCUSTOM, // 当前函数
                callKey: 'DATAGETCUSTOM',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要格式化时间戳', // 第一个参数代表含义
                    },
                    {
                        text:'传入的时间格式化格式'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:1576122231269,// 传入函数中的值
                        text:'1576122231269', // 展示页面所用值
                    },
                    {
                        value:'YYYY-MM-DD hh:mm:ss',
                        text:'YYYY-MM-DD hh:mm:ss',
                    }
                ],
            },
        ]
    },
    {
        name:'财务函数', // 系列函数名称
        images: Finance,
        pitchImages: Finance2,
        children:[
            {
                name:'财务自动求和', // 函数代表名
                funcName: '将传入2个数值进行相加,返回相加后总数', // 函数名字
                function: AUTOSUMMATION, // 当前函数
                callKey: 'AUTOSUMMATION',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入被加值', // 第一个参数代表含义
                    },
                    {
                        text:'传入累加值', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:23,// 传入函数中的值
                        text:'23', // 展示页面所用值
                    },
                    {
                        value:85,// 传入函数中的值
                        text:'85', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'财务自动求平均值', // 函数代表名
                funcName: '将传入的数字数组集合累加并进行平均值求值', // 函数名字
                function: AUTOMEAN, // 当前函数
                callKey: 'AUTOMEAN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求平均值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'财务自动获取最大值', // 函数代表名
                funcName: '将传入的数字数组集合获取最大值', // 函数名字
                function: AUTOMAX, // 当前函数
                callKey: 'AUTOMAX',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求获取最大值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'财务自动获取最小值', // 函数代表名
                funcName: '将传入的数字数组集合获取最小值', // 函数名字
                function: AUTOMIN, // 当前函数
                callKey: 'AUTOMIN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求获取最小值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
        ]
    },
    {
        name:'信息函数', // 系列函数名称
        images: MessageImg,
        pitchImages: MessageImg2,
        children:[
            {
                name:'信息类型判断', // 函数代表名
                funcName: '将传入的数据判断类型并返回', // 函数名字
                function: TYPEOFDATA, // 当前函数
                callKey: 'TYPEOFDATA',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入一个数据,对传入数据进行判断', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:['测试'], // 传入函数中的值
                        text: '["测试"]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'信息提示', // 函数代表名
                funcName: '将传入的提示内容添加到提示框展示', // 函数名字
                function: TOASTMESSAGE, // 当前函数
                callKey: 'TOASTMESSAGE',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要提示用户的信息', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:'测试信息', // 传入函数中的值
                        text: '测试信息', // 展示页面所用值
                    }
                ]
            },
            {
                name:'信息NaN判断', // 函数代表名
                funcName: '将传入的数据是否是NaN', // 函数名字
                function: TYPEOFNAN, // 当前函数
                callKey: 'TYPEOFNAN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入的需要判断数据', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:NaN, // 传入函数中的值
                        text: 'NaN', // 展示页面所用值
                    }
                ]
            },
        ]
    },
    {
        name:'逻辑函数', // 系列函数名称
        images: Logic,
        pitchImages: Logic2,
        children:[
            {
                name:'逻辑判断数组是否存在空数值', // 函数代表名
                funcName: '检查传入数组所有值是否存在值,存在控制返回true', // 函数名字
                function: LOGICARRAY, // 当前函数
                callKey: 'LOGICARRAY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要检查的数组', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[56,'23','236',undefined,null], // 传入函数中的值
                        text: "[56,'23','236',undefined,null]", // 展示页面所用值
                    }
                ]
            },
            {
                name:'逻辑判断文本内容对比', // 函数代表名
                funcName: '对比传入的2个字符串是否相同', // 函数名字
                function: STRINGISSAME, // 当前函数
                callKey: 'STRINGISSAME',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    },
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,world', // 传入函数中的值
                        text: '你好,world', // 展示页面所用值
                    },
                    {
                        value: '你好世界', // 传入函数中的值
                        text: '你好世界', // 展示页面所用值
                    }
                ]
            },
            {
                name:'逻辑判断文本对比查询', // 函数代表名
                funcName: '对比传入的2个字符串对比,查询后面传入值是否存在于第一个参数中', // 函数名字
                function: STRINGISHAVE, // 当前函数
                callKey: 'STRINGISHAVE',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    },
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,world', // 传入函数中的值
                        text: '你好,world', // 展示页面所用值
                    },
                    {
                        value: '好', // 传入函数中的值
                        text: '好', // 展示页面所用值
                    }
                ]
            },
            {
                name:'逻辑筛选数组指定值', // 函数代表名
                funcName: '检查数值是否存在指定值,存在则返回', // 函数名字
                function: LOGICARRAYFILTER, // 当前函数
                callKey: 'LOGICARRAYFILTER',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要检查的数组', // 第一个参数代表含义
                    },
                    {
                        text:'指定值', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: ['你好','世界','嗯'], // 传入函数中的值
                        text: "['你好','世界','嗯']", // 展示页面所用值
                    },
                    {
                        value: '世界', // 传入函数中的值
                        text: '世界', // 展示页面所用值
                    }
                ]
            },
        ]
    },
    {
        name:'查找和引用函数', // 系列函数名称
        images: Find,
        pitchImages: Find2,
        children:[
            {
                name:'查找并替换字段', // 函数代表名
                funcName: '修改字符串中匹配的第一个字段', // 函数名字
                function: FINDSTRRPLACE, // 当前函数
                callKey: 'FINDSTRRPLACE',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要查询的字符串', // 第一个参数代表含义
                    },
                    {
                        text: '传入需要查询的字段',
                    },
                    {
                        text: '传入需要更换查询的字段',
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:'你好,世界', // 传入函数中的值
                        text: '你好,世界', // 展示页面所用值
                    },
                    {
                        value:'世界',
                        text:'世界',
                    },
                    {
                        value:'美丽世界',
                        text:'美丽世界'
                    }
                ]
            },
            {
                name:'查找数组内容', // 函数代表名
                funcName: '查找出数组中匹配的第一个数值', // 函数名字
                function: FINDARRAYNUM, // 当前函数
                callKey: 'FINDARRAYNUM',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要查询的数组', // 第一个参数代表含义
                    },
                    {
                        text: '传入需要查询的内容',
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[2,3,5,2,21], // 传入函数中的值
                        text: '[2,3,5,2,21]', // 展示页面所用值
                    },
                    {
                        value:21,
                        text:'21',
                    }
                ]
            },
        ]
    },
    {
        name:'数学和三角函数', // 系列函数名称
        images: MathImg,
        pitchImages: MathImg2,
        children:[
            {
                name:'数学自动求和', // 函数代表名
                funcName: '将传入2个数值进行相加,返回相加后总数', // 函数名字
                function: AUTOSUMMATION, // 当前函数
                callKey: 'AUTOSUMMATION',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入被加值', // 第一个参数代表含义
                    },
                    {
                        text:'传入累加值', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:23,// 传入函数中的值
                        text:'23', // 展示页面所用值
                    },
                    {
                        value:85,// 传入函数中的值
                        text:'85', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'数学自动求平均值', // 函数代表名
                funcName: '将传入的数字数组集合累加并进行平均值求值', // 函数名字
                function: AUTOMEAN, // 当前函数
                callKey: 'AUTOMEAN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求平均值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'数学自动获取最大值', // 函数代表名
                funcName: '将传入的数字数组集合获取最大值', // 函数名字
                function: AUTOMAX, // 当前函数
                callKey: 'AUTOMAX',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求获取最大值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'数学自动获取最小值', // 函数代表名
                funcName: '将传入的数字数组集合获取最小值', // 函数名字
                function: AUTOMIN, // 当前函数
                callKey: 'AUTOMIN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求获取最小值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
        ]
    },
    {
        name:'统计函数', // 系列函数名称
        images: Statistics,
        pitchImages: Statistics2,
        children:[
            {
                name:'统计数组总值', // 函数代表名
                funcName: '将传入的数组值,进行累加返回累加总数,如果存在非数字会跳过计算', // 函数名字
                function: ARRAYADDNUM, // 当前函数
                callKey: 'ARRAYADDNUM',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要进行累积的数组', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,'测试',16], // 传入函数中的值
                        text: '[8,9,6,8,7,"测试",16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'统计数组中对象某一值总数', // 函数代表名
                funcName: '将传入的数组值,进行累加返回累加总数,如果存在非数字会跳过计算', // 函数名字
                function: ARRAYOBJECTADD, // 当前函数
                callKey: 'ARRAYOBJECTADD',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入需要进行累积的数组', // 第一个参数代表含义
                    },
                    {
                        text: '指定需要累积的对象key值'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[{num:3},{num:33},{num:63},{num:43},{num:23},{num:"98w"},{num:13}], // 传入函数中的值
                        text: '[{num:3},{num:33},{num:63},{num:43},{num:23},{num:"98w"},{num:13}]', // 展示页面所用值
                    },
                    {
                        value:'num',
                        text:'num',
                    }
                ]
            },
            {
                name:'统计用户输入长度', // 函数代表名
                funcName: '统计用户总共输入的长度并返回', // 函数名字
                function: STRINGLEHGTH, // 当前函数
                callKey: 'STRINGLEHGTH',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要统计的内容长度', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:'我是被测试内容', // 传入函数中的值
                        text: '我是被测试内容', // 展示页面所用值
                    }
                ]
            },
            {
                name:'统计自动求和', // 函数代表名
                funcName: '将传入2个数值进行相加,返回相加后总数', // 函数名字
                function: AUTOSUMMATION, // 当前函数
                callKey: 'AUTOSUMMATION',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入被加值', // 第一个参数代表含义
                    },
                    {
                        text:'传入累加值', // 第二个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:23,// 传入函数中的值
                        text:'23', // 展示页面所用值
                    },
                    {
                        value:85,// 传入函数中的值
                        text:'85', // 展示页面所用值
                    },
                ],
                
            },
            {
                name:'统计自动求平均值', // 函数代表名
                funcName: '将传入的数字数组集合累加并进行平均值求值', // 函数名字
                function: AUTOMEAN, // 当前函数
                callKey: 'AUTOMEAN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求平均值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'统计自动获取最大值', // 函数代表名
                funcName: '将传入的数字数组集合获取最大值', // 函数名字
                function: AUTOMAX, // 当前函数
                callKey: 'AUTOMAX',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求获取最大值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
            {
                name:'统计自动获取最小值', // 函数代表名
                funcName: '将传入的数字数组集合获取最小值', // 函数名字
                function: AUTOMIN, // 当前函数
                callKey: 'AUTOMIN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'传入所有需要求获取最小值的数组集合', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:[8,9,6,8,7,16], // 传入函数中的值
                        text: '[8,9,6,8,7,16]', // 展示页面所用值
                    }
                ]
            },
        ]
    },
    {
        name:'文本函数', // 系列函数名称
        images: TextImg,
        pitchImages: TextImg2,
        children:[
            {
                name:'文本HTML标签转译', // 函数代表名
                funcName: '将文本域输入的HTML标签转移', // 函数名字
                function: TRANSLATIONSTRING, // 当前函数
                callKey: 'TRANSLATIONSTRING',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要进行转移的文本输入', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:'<script>alert("233")</script>', // 传入函数中的值
                        text: '<script>alert("233")</script>', // 展示页面所用值
                    }
                ]
            },
            {
                name:'文本HTML标签反向转译', // 函数代表名
                funcName: '将文本域输入的已转译HTML标签反向转译', // 函数名字
                function: TRANSLATIONSTRINGTWO, // 当前函数
                callKey: 'TRANSLATIONSTRINGTWO',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要进行反向转译的文本输入', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:'&lt;script&gt;alert(&quto;233&quto;)&lt;&#x2F;script&gt;', // 传入函数中的值
                        text: '&lt;script&gt;alert(&quto;233&quto;)&lt;&#x2F;script&gt;', // 展示页面所用值
                    }
                ]
            },
            {
                name:'文本数组内容拼接', // 函数代表名
                funcName: '将数组内容进行拼接,会跳过拼接对象', // 函数名字
                function: TEXTCONCAT, // 当前函数
                callKey: 'TEXTCONCAT',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要拼接的数组内容', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value:['你好',{num:1},'世界'], // 传入函数中的值
                        text: "['你好',{num:1},'世界']", // 展示页面所用值
                    }
                ]
            },
            {
                name:'文本内容对比', // 函数代表名
                funcName: '对比传入的2个字符串是否相同', // 函数名字
                function: STRINGISSAME, // 当前函数
                callKey: 'STRINGISSAME',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    },
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,世界', // 传入函数中的值
                        text: '你好,世界', // 展示页面所用值
                    },
                    {
                        value: '你好世界', // 传入函数中的值
                        text: '你好世界', // 展示页面所用值
                    }
                ]
            },
            {
                name:'文本对比查询', // 函数代表名
                funcName: '对比传入的2个字符串对比,查询后面传入值是否存在于第一个参数中', // 函数名字
                function: STRINGISHAVE, // 当前函数
                callKey: 'STRINGISHAVE',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    },
                    {
                        text:'需要对比的字符串', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,世界', // 传入函数中的值
                        text: '你好,世界', // 展示页面所用值
                    },
                    {
                        value: '好', // 传入函数中的值
                        text: '好', // 展示页面所用值
                    }
                ]
            },
            {
                name:'文本转换为驼峰写法', // 函数代表名
                funcName: '将文本英文转为驼峰写法', // 函数名字
                function: STRINGCAMELCASE, // 当前函数
                callKey: 'STRINGCAMELCASE',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的字符串', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,hello world,世界', // 传入函数中的值
                        text: '你好,hello world,世界', // 展示页面所用值
                    }
                ]
            },
            {
                name:'文本校验', // 函数代表名
                funcName: '校验传入文本是否按照规定字符结尾', // 函数名字
                function: STRINGVERIFY, // 当前函数
                callKey: 'STRINGVERIFY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要校验的字符串', // 第一个参数代表含义
                    },
                    {
                        text:'需要校验的字符规则', // 第一个参数代表含义
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,hello world,世界', // 传入函数中的值
                        text: '你好,hello world,世界', // 展示页面所用值
                    },
                    {
                        value: '世界', // 传入函数中的值
                        text: '世界', // 展示页面所用值
                    },
                ]
            },
            {
                name: '文本拆分为集合', // 函数代表名
                funcName: '拆分字符串内容成数组', // 函数名字
                function: STRINGVERIFY, // 当前函数
                callKey: 'STRINGVERIFY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要拆分的字段', // 第一个参数代表含义
                    },
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: '你好,hello world,世界', // 传入函数中的值
                        text: '你好,hello world,世界', // 展示页面所用值
                    }
                ]
            },
        ]
    },
    {
        name:'工程函数', // 系列函数名称
        images: Project,
        pitchImages: Project2,
        children:[
            {
                name:'工程十进制转八进制', // 函数代表名
                funcName: '获得十进制参数并转换为八进制返回', // 函数名字
                function: TENSCALETOEIGHT, // 当前函数
                callKey: 'TENSCALETOEIGHT',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 580, // 传入函数中的值
                        text: '580', // 展示页面所用值
                    },
                ]
            },
            {
                name:'工程十进制转十六进制', // 函数代表名
                funcName: '获得十进制参数并转换为十六进制返回', // 函数名字
                function: TENSCALETOSIXTEEN, // 当前函数
                callKey: 'TENSCALETOSIXTEEN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 580, // 传入函数中的值
                        text: '580', // 展示页面所用值
                    },
                ]
            },
            {
                name:'工程十进制转二进制', // 函数代表名
                funcName: '获得十进制参数并转换为二进制返回', // 函数名字
                function: TENSCALETOTWO, // 当前函数
                callKey: 'TENSCALETOTWO',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 580, // 传入函数中的值
                        text: '580', // 展示页面所用值
                    },
                ]
            },
            {
                name:'工程十进制自定义转化', // 函数代表名
                funcName: '获得十进制参数并转换为自定义转化返回', // 函数名字
                function: TENSCALETOMANY, // 当前函数
                callKey: 'TENSCALETOMANY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    },
                    {
                        text:'自定义的进制转换'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 580, // 传入函数中的值
                        text: '580', // 展示页面所用值
                    },
                    {
                        value: 8,
                        text:'8'
                    }
                ]
            },
            {
                name:'工程八进制到十进制转换', // 函数代表名
                funcName: '获得八进制参数并转换为十进制返回', // 函数名字
                function: EIGHTSCALETOTEN, // 当前函数
                callKey: 'EIGHTSCALETOTEN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 1104, // 传入函数中的值
                        text: '1104', // 展示页面所用值
                    }
                ]
            },
            {
                name:'工程八进制到十六进制转换', // 函数代表名
                funcName: '获得八进制参数并转换为十六进制返回', // 函数名字
                function: EIGHTSCALETOSIXTEEN, // 当前函数
                callKey: 'EIGHTSCALETOSIXTEEN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 1104, // 传入函数中的值
                        text: '1104', // 展示页面所用值
                    }
                ]
            },
            {
                name:'工程八进制到二进制转换', // 函数代表名
                funcName: '获得八进制参数并转换为二进制返回', // 函数名字
                function: EIGHTSCALETOTWO, // 当前函数
                callKey: 'EIGHTSCALETOTWO',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 1104, // 传入函数中的值
                        text: '1104', // 展示页面所用值
                    }
                ]
            },
            {
                name:'工程八进制到自定义进制转换', // 函数代表名
                funcName: '获得八进制参数并转换为自定义返回', // 函数名字
                function: EIGHTSCALETOMANY, // 当前函数
                callKey: 'EIGHTSCALETOMANY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    },
                    {
                        text:'自定义的进制转换'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 1104, // 传入函数中的值
                        text: '1104', // 展示页面所用值
                    },
                    {
                        value:10,
                        text:'10'
                    }
                ]
            },
            {
                name:'工程十六进制到十进制转换', // 函数代表名
                funcName: '获得十六进制参数并转换为十进制返回', // 函数名字
                function: SIXTEENSCALETOTEN, // 当前函数
                callKey: 'SIXTEENSCALETOTEN',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 244, // 传入函数中的值
                        text: '244', // 展示页面所用值
                    }
                ]
            },
            {
                name:'工程十六进制到二进制转换', // 函数代表名
                funcName: '获得十六进制参数并转换为二进制返回', // 函数名字
                function: SIXTEENSCALETOTWO, // 当前函数
                callKey: 'SIXTEENSCALETOTWO',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 244, // 传入函数中的值
                        text: '244', // 展示页面所用值
                    }
                ]
            },
            {
                name:'工程十六进制到八进制转换', // 函数代表名
                funcName: '获得十六进制参数并转换为八进制返回', // 函数名字
                function: SIXTEENSCALETOEIGHT, // 当前函数
                callKey: 'SIXTEENSCALETOEIGHT',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 244, // 传入函数中的值
                        text: '244', // 展示页面所用值
                    }
                ]
            },
            {
                name:'工程十六进制到自定义进制转换', // 函数代表名
                funcName: '获得十六进制参数并转换为自定义返回', // 函数名字
                function: SIXTEENSCALETOMANY, // 当前函数
                callKey: 'SIXTEENSCALETOMANY',
                params: [ // 函数所需要传入值内容 为空为不传值
                    {
                        text:'需要转换的数字', // 第一个参数代表含义
                    },
                    {
                        text:'自定义的进制转换'
                    }
                ],
                demo: [ // 展示给用户看的案例传入值
                    {
                        value: 244, // 传入函数中的值
                        text: '244', // 展示页面所用值
                    },
                    {
                        value:10,
                        text:'10'
                    }
                ]
            },
        ]
    },
]
/**
 * 公式选择数组
 */
const tabList = [
    // {
    //     name:'柱形图',
    //     key:'1',
    //     images: Column,
    //     pitchImages: Column2,
    //     children:[
    //         // 格式参考 
    //         // {
    //         //     name: '', // 函数名字
    //         //     funcName: '', // 函数介绍
    //         //     function: ''. // 函数
    //         // }
    //     ],
    //     isPitch:false, // 是否选中
    //     isShowList: false, // 是否自动展开子表单
    // },
    // {
    //     name:'饼图',
    //     key:'2',
    //     images:PieImg,
    //     pitchImages: PieImg2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '雷达图',
    //     key:'3',
徐立's avatar
徐立 committed
3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263
    //     images: Radar,
    //     pitchImages: Radar2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '气泡图',
    //     key:'4',
    //     images: Bubble,
    //     pitchImages: Bubble2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '散点图',
    //     key:'5',
    //     images: Splashes,
    //     pitchImages: Splashes2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '树状图',
    //     key: '6',
    //     images: Dendrogram,
    //     pitchImages: Dendrogram2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '箱型图',
    //     key: '7',
    //     images: Box,
    //     pitchImages: Box2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '旭日图',
    //     key: '8',
    //     images: Rising,
    //     pitchImages: Rising2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '折线图',
    //     key: '9',
    //     images: Line,
    //     pitchImages: Line2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // },
    // {
    //     name: '直方图',
    //     key:'10',
    //     images: Straight,
    //     pitchImages: Straight2,
    //     children:[],
    //     isPitch:false,
    //     isShowList: false,
    // }
]
/**
徐立's avatar
徐立 committed
3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793
 * List 在此做格式化操作并添加入tabList导出,
 * 属于List数组中函数新增应新增到List中,此处会自动添加进去
 * 属于tabList数组函数新增应新增到tabList中
 */
List.map( (item,index) => {
    tabList.push({
        name:item.name,
        key:item.name+index,
        images: item.images,
        pitchImages: item.pitchImages,
        isPitch:false,
        isShowList: false,
        children:item.children.map((arr,i) => {
            return {
                name: arr.name,
                funcName: arr.funcName,
                function: arr.function,
                callKey: arr.callKey
            }
        })
    })
})
export const formulaList = tabList
/**
 * 数据库函数系列
 * @param {*} params 
 */
export function sql() {
    
}
/**
 * 基础计算函数
 * 自动求和
 * @param {传入被加值} num 
 * @param {传入累加值} num1 
 */
export function AUTOSUMMATION(num,num1) {
    num=+num
    num1=+num1
    return num+num1
}
/**
 * 基础计算函数
 * 自动求平均值
 * @param {传入需要累加的数组,里面为数字} List 
 */
export function AUTOMEAN(List) {
    let num = 0; // 初始值
    let mean = 0; // 平均值
    if(isArray(List)){
        List.map(item => {
            if(typeof item == 'number'||typeof item == 'string'){
                num +=item
            } else {
                console.log('这不是一个数字')
                return 
            }
        })
        if(isNaN(num)){
            console.log('传入值错误,请检查')
        } else {
            mean = num/List.length
            return mean
        }
    } else {
        console.log('这不是数组')
        return
    }
}
/**
 * 基础计算函数
 * 获取最大值
 * @param {传入需要累加的数组,获取数组最大值} List 
 */
export function AUTOMAX(List) {
    return Math.max.apply(null,List);
}
/**
 * 基础计算函数
 * 获取最大值
 * @param {传入需要累加的数组,获取数组最小值} List 
 */
export function AUTOMIN(List) {
    return Math.min.apply(null,List);
}
/**
 * 查找引用函数
 * 修改字符串中匹配的第一个字段
 * @param {传入需要查询的字符串} str 
 * @param {传入需要查询的字段} str2 
 * @param {传入需要更换的字段} str32
 */
export function FINDSTRRPLACE(str,str2,str3) {
    if(typeof str == 'string'&&typeof str2 == 'string'&&typeof str3 == 'string'){
        str=str.replace(str2,str3)
        return str
    } else {
        console.log('这不是个字符串')
    }
}
/**
 * 查找引用函数
 * 查找出数组中匹配的第一个数值
 * @param {传入需要查询的数组} arr
 * @param {传入需要查询的内容} data
 */
export function FINDARRAYNUM(arr,data) {
    if(isArray(arr)){
        if(typeof arr[0] == 'object'){
            let index = arr.findIndex(arr,data)
            if(index == -1){
                return '数组不存在查询值'
            }else{
                return arr[index]
            }
        }
        let index = arr.indexOf(data)
        if(index == -1){
            return '数组不存在查询值'
        }else{
            return arr[index]
        }
    }else{
        return '传入值不是数组'
    }
}
/**
 * 兼容性函数
 * 合并2个传入的数组集合
 * @param {传入需要合并的数组} arr
 * @param {传入需要合并的数组} arr1
 */
export function MERGEARRAY(arr,arr1) {
    if(isArray(arr)&&isArray(arr1)){
        const list = [...arr,...arr1]
        return list
    }else{
        return '传入值不是数组'
    }
}
/**
 * 兼容性函数
 * 根据传入数组进行拆分成多维数组
 * @param {传入需要拆分的数组} arr
 * @param {传入需要拆分成长度的数值} num
 */
export function SPLITARRAY(arr,num) {
    if(isArray(arr)){
        let list = chunk(arr,num)
        return list
    }else {
        return '传入值不是数组'
    }
}
/**
 * 兼容性函数
 * 根据传入数组和切片长度,去除对应长度的数组
 * @param {传入需要拆分的数组} arr
 * @param {传入需要拆分成长度的数值} num
 */
export function REMOVEARRAYDROP(arr,num) {
    if(isArray(arr)){
        let list = drop(arr,num)
        return list
    }else {
        return '传入值不是数组'
    }
}
/**
 * 日期和时间函数
 * 根据传入的2个时间戳进行对比,返回时间差值
 * @param {传入需要对比的时间戳} time
 * @param {传入需要对比的时间戳} time1
 * @param {是否需要将时间差值进行转换} isFormat
 */
export function CONTRASTTIME(time,time1,isFormat) {
    if(typeof time1 == 'number'&&typeof time=='number'){
        if(time1>time){
            let data = time1-time
            if(isFormat){
                return getTimeMonth(data)
            }else{
                return data
            }
        } else if(time1<time){
            let data = time-time1
            if(isFormat){
                return getTimeMonth(data)
            }else{
                return data
            }
        }
    } else {
        return '传入值不正确'
    }
}
/**
 * 时间戳格式化函数
 */
export function getTimeMonth(time) {
    if(time<=60000){ // 低于1分钟
        return '低于一分钟'
    } else if( 60000<=time&&time<3600000) { // 低于1小时 统计分钟数
        return moment(time).format('mm')+'分钟'
    } else if( 3600000<=time&&time<86400000 ){ // 高于一小时,低于一天
        return moment(time).format('hh:mm:ss')
    } else if(86400000<=time&&time<2592000000){ // 大于一天小于一个月
        return moment(time).format('DD天hh:mm:ss')
    }else if(2592000000<time){ // 大于一个月
        return moment(time).format('MM月DD天 hh:mm:ss')
    }
}
/**
 * 日期和时间函数
 * 将传入的时间戳格式化为年月日
 * @param {传入的时间戳} time
 */
export function DATEGETYEAR(time) {
    let data = moment(time).format('YYYY-MM-DD')
    return data
}
/**
 * 日期和时间函数
 * 将传入的时间戳格式化为月日
 * @param {传入的时间戳} time
 */
export function DATAGETMONTH(time) {
    let data = moment(time).format('MM-DD')
    return data
}
/**
 * 日期和时间函数
 * 将传入的时间戳格式化为日
 * @param {传入的时间戳} time
 */
export function DATAGETDAY(time) {
    let data = moment(time).format('DD')
    return data
}
/**
 * 日期和时间函数
 * 将传入的时间戳格式化为时间格式
 * @param {传入的时间戳} time
 */
export function DATAGETTIME(time) {
    let data = moment(time).format('hh:mm:ss')
    return data
}
/**
 * 日期和时间函数
 * 将传入的时间戳按照自定义格式化为时间格式
 * @param {传入的时间戳} time
 * @param {传入的时间格式化格式} str
 */
export function DATAGETCUSTOM(time,str) {
    let data = moment(time).format(str)
    return data
}
/**
 * 信息函数
 * 判断传入值的类型并返回
 * @param {需要判断类型的数据} data
 */
export function TYPEOFDATA(data) {
    if(typeof data == 'object'){
        if(isArray(data)){
            return 'array'
        } else {
            return 'object'
        }
    } else {
        return typeof data
    }
}
/**
 * 信息函数
 * 发起弹框提示用户信息
 * @param {需要提示用户的信息} str
 */
export function TOASTMESSAGE(str) {
    let width = document.documentElement.clientWidth || document.body.clientWidth;
    if(width<1200){
        showToast(str)
    } else {
        openToast('info','提示',str)
    }
    return ''
}
/**
 * 信息函数
 * 判断传入值是否为NAN
 * @param {传入的需要判断数据} str
 */
export function TYPEOFNAN(str) {
    if (typeof str == 'string') {
        try {
            JSON.parse(str);
            if(typeof JSON.parse(str) === 'number'){
            return false;
        }
            return true;
        } catch (e) {
            return false;
        }
    }
}
/**
 * 统计函数
 * 将传入的数组值,进行累加返回累加总数,如果存在非数字会跳过计算
 * @param {传入的需要累加的数组} ary
 */
export function ARRAYADDNUM(ary) {
    if(isArray(ary)){
        let sum = 0;
        ary.map(item => {
            if(isNaN(+item)){
                return
            }
            sum+=item
        })
        return sum
    }else {
        return '传入值非数组'
    }
}
/**
 * 统计函数
 * 将传入的为对象型数组进行指定属性统一累积
 * @param {传入的需要累加的数组} ary
 * @param {指定需要累积的对象key值} str
 */
export function ARRAYOBJECTADD(ary,str) {
    if(isArray(ary)){
        let sum = 0;
        ary.map(item => {
            if(isNaN(+item[str])){
                return
            }
            sum+=item[str]
        })
        return sum
    }else {
        return '传入值非数组'
    }
}
/**
 * 统计函数
 * 统计传入的字符串总共输入的长度
 * @param {需要统计的字符串长度} str
 */
export function STRINGLEHGTH(str) {
    return str.length
}
/**
 * 文本函数
 * 将文本域输入的HTML标签转译
 * @param {需要进行转移的文本输入} str
 */
export function TRANSLATIONSTRING(str) {
    str = str.replace(/&/g, '&amp;')
    str = str.replace(/</g, '&lt;')
    str = str.replace(/>/g, '&gt;')
    str = str.replace(/"/g, '&quto;')
    str = str.replace(/'/g, '&#39;')
    str = str.replace(/`/g, '&#96;')
    str = str.replace(/\//g, '&#x2F;')
    str = str.replace(/ /g, "&nbsp;");
    return str
}
/**
 * 文本函数
 * 将文本域输入的已转译HTML标签反向转译
 * @param {需要进行反向转译的文本输入} str
 */
export function TRANSLATIONSTRINGTWO(str) {
    str = str.replace(/&amp;/g, '&')
    str = str.replace(/&lt;/g, '<')
    str = str.replace(/&gt;/g, '>')
    str = str.replace(/&quto;/g, '"')
    str = str.replace(/&#39;/g, "'")
    str = str.replace(/&#96;/g, '`')
    str = str.replace(/&#x2F;/g, '\/')
    str = str.replace(/&nbsp;/g, " ");
    return str
}
/**
 * 文本函数
 * 拆分字符串内容成数组
 * @param {需要拆分的字段} str 
 */
export function STRINGWORDS(str) {
    if(typeof str == 'string'){
        return words(str)
    } else {
        return '传入值应该为字符串'
    }
}
/**
 * 文本函数
 * 将数组中内容进行拼接返回一个完整字符串,无法拼接则会跳过
 * @param {需要拼接的数组内容} ary
 */
export function TEXTCONCAT(ary) {
    if(isArray(ary)){
        let str = ''
        ary.map(item => {
            if(typeof item == 'object'){
                return
            }else{
                str = `${str}`+`${item}`
            }
        })
        return str
    }else {
        return '传入值非数组'
    }
}
/**
 * 文本函数
 * 对比传入的2个字符串是否相同
 * @param {需要对比的字符串} str
 * @param {需要对比的字符串} str1
 */
export function STRINGISSAME(str,str1) {
    return str === str1
}
/**
 * 文本函数
 * 对比传入的2个字符串对比,查询后面传入值是否存在于第一个参数中
 * @param {需要对比的字符串} str
 * @param {需要对比的字符串} str1
 */
export function STRINGISHAVE(str,str1) {
    let res = str.indexOf(str1)
    if(res == -1){
        return false
    }else {
        return true
    }
}
/**
 * 文本函数
 * 将文本英文转为驼峰写法
 * @param {需要转换的字符串} str
 */
export function STRINGCAMELCASE(str) {
    if(typeof str == 'string'){
        return camelCase(str)
    } else {
        return '这不是个字符串'
    }
}
/**
 * 文本函数
 * 校验传入文本是否按照规定字符结尾
 * @param {需要校验的字符串} str
 * @param {需要校验的字符规则} str1
 */
export function STRINGVERIFY(str,str1) {
    if(typeof str == 'string'&&typeof str1 == 'string'){
        return endsWith(str,str1)
    }else {
        return '传入值不是字符串'
    }
}
/**
 * 工程函数
 * 十进制转换8进制
 * @param { 需要转换的十进制} num
 */
export function TENSCALETOEIGHT(num) {
    if(typeof num == 'number'){
        return parseInt(num).toString(8)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 十进制转换16进制
 * @param { 需要转换的十进制} num
 */
export function TENSCALETOSIXTEEN(num) {
    if(typeof num == 'number'){
        return parseInt(num).toString(16)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 十进制转换2进制
 * @param { 需要转换的十进制} num
 */
export function TENSCALETOTWO(num) {
    if(typeof num == 'number'){
        return parseInt(num).toString(2)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 自定义十进制转换
 * @param {需要转换的十进制} num
 * @param {自定义的进制转换} num1
 */
export function TENSCALETOMANY(num,num1) {
    if(typeof num == 'number'&&typeof num1 == 'number'){
        return parseInt(num).toString(num1)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 八进制到十进制转换
 * @param {需要转换的八进制} num
 */
export function EIGHTSCALETOTEN(num) {
    if(typeof num == 'number'){
        return parseInt(num,8)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 八进制到十六进制转换
 * @param {需要转换的八进制} num
徐立's avatar
徐立 committed
3794
 */
徐立's avatar
徐立 committed
3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050
export function EIGHTSCALETOSIXTEEN(num) {
    if(typeof num == 'number'){
        return parseInt(num,8).toString(16)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 八进制到二进制转换
 * @param {需要转换的八进制} num 
 */
export function EIGHTSCALETOTWO(num) {
    if(typeof num == 'number'){
        return parseInt(num,8).toString(2)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 八进制到自定义机制转换
 * @param {需要转换的八进制} num 
 * @param {自定义的进制转换} num1
 */
export function EIGHTSCALETOMANY(num,num1) {
    if(typeof num == 'number'&&typeof num1 == 'number'){
        return parseInt(num,8).toString(num1)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 十六进制转二进制
 * @param {需要转换的十六进制} num 
 */
export function SIXTEENSCALETOTWO(num) {
    if(typeof num == 'number'){
        return parseInt(num,16).toString(2)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 十六进制转八进制
 * @param {需要转换的十六进制} num 
 */
export function SIXTEENSCALETOEIGHT(num) {
        if(typeof num == 'number'){
        return parseInt(num,16).toString(8)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 十六进制转十进制
 * @param {需要转换的十六进制} num
 */
export function SIXTEENSCALETOTEN(num) {
    if(typeof num == 'number'){
        return parseInt(num,16)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 工程函数
 * 十六进制转自定义进制
 * @param {需要转换的十六进制} num
 * @param {自定义的进制转换} num1
 */
export function SIXTEENSCALETOMANY(num,num1) {
    if(typeof num == 'number'&&typeof num1 == 'number'){
        return parseInt(num,16).toString(num1)
    }else{
        return '传入值不是数字'
    }
}
/**
 * 逻辑函数
 * 检查传入数组所有值是否存在值,存在控制返回true
 * @param {需要检查的数组} ary
 */
export function LOGICARRAY(ary) {
    if(isArray(ary)){
        let isHave = true
        ary.map(item => {
            if(!!item == false){
                isHave = false
            }
        })
        return isHave
    }else {
        return '传入值不是数组'
    }
}
/**
 * 逻辑函数
 * 检查数值是否存在指定值,存在则返回
 * @param {需要检查的数组} ary
 * @param {需要检查的指定值} res
 */
export function LOGICARRAYFILTER(ary,res) {
    if(isArray(ary)){
        let data;
        data = ary.filter(item => item==res)
        if(data.length>0){
            return data
        }else {
            return '不存在指定值'
        }
    }else {
        return '传入值不是数组'
    }
}
/**
 * 多维数据集函数
 * 检查传入数组中对象,并根据指定数字属性进行从大到小排序
 * @param {需要排序的数组} ary
 * @param {需要排序的对象指定值} name
 */
export function ARRAYSORTONJECT(ary,name) {
    function sortList(obj1,obj2){
        var a=obj1[name];
        var b=obj2[name];                                   
        if(a>b){    
            return -1
        }else if(a<b){    
            return 1
        }else{
            return 0
        }              
    };
    if(isArray(ary)){
        return ary.sort(sortList)
    }else {
        return '传入值不是数组'
    }
}
/**
 * 多维数据集函数
 * 检查传入数组中对象,并根据指定数字属性进行从小到大排序
 * @param {需要排序的数组} ary
 * @param {需要排序的对象指定值} name
 */
export function ARRAYSORTONJECTTWO(ary,name) {
    function sortList(obj1,obj2){
        var a=obj1[name];
        var b=obj2[name];                                  
        if(a<b){    
            return -1
        }else if(a>b){    
            return 1
        }else{
            return 0
        }              
    };
    if(isArray(ary)){
        return ary.sort(sortList)
    }else {
        return '传入值不是数组'
    }
}
/**
 * 多维数据集函数
 * 检查传入对象,并进行转换为数组
 * @param {需要转换的对象} obj
 */
export function OBJECTTOARRY(obj) {
    let arr = [];
    for (let i in obj) {
        let o = {};
        o[i] = obj[i];
        arr.push(o)
    }
    return arr
}
/**
 * 多维数据集函数
 * 检查传入对象,获取需要的指定key值
 * @param {需要操作的对象} obj
 * @param {获取数组中指定的key值} ary
 */
export function OBJECTGETKEY(obj,ary) {
    if(isArray(ary)){
        return  pick(obj,ary)
    }else{
        return '获取key值需传入数组'
    }
}
/**
 * 多维数据集函数
 * 传入多维数组,并对子数组中数值排序进行,非子数组则会跳过
 * @param {需要排序的多维数组} ary
 * @param {是否从大到小排序} isSort
 */
export function ARRAYMANYSORT(ary,isSort = true) {
    function sortList(a,b){
        if(isSort){
            if(a>b){    
                return -1
            }else if(a<b){    
                return 1
            }else{
                return 0
            } 
        } else {
            if(a<b){    
                return -1
            }else if(a>b){    
                return 1
            }else{
                return 0
            } 
        }
    };
    if(isArray(ary)){
        ary.map(item => {
            if(isArray(item)){
                return item.sort(sortList)
            } else {
                return
            }
        })
        return ary
    }else{
        return '传入值应为数组'
    }
}
/**
 * 多维数据集函数
 * 传入多维数组,并对子数组中对象进行拆分成数组,非子数组则会跳过
 * @param {需要拆分的多维数组} ary
 */
export function ARRAYSPLITOBJECT(ary) {
    if(isArray(ary)){
        let data = ary.map(item => {
            if(isArray(item)){
                let newAry = item.map(res => {
                    if(Object.prototype.toString.call(res) == '[object Object]'){
                        let arr = [];
                        for (let i in res) {
                            let o = {};
                            o[i] = res[i];
                            arr.push(o)
                        }
                        return arr
                    }
                    return res
                }) 
                return newAry
            } else {
                return item
徐立's avatar
徐立 committed
4051 4052
            }
        })
徐立's avatar
徐立 committed
4053 4054 4055 4056 4057
        return data
    } else {
        return '应传入一个数组'
    }
}
徐立's avatar
徐立 committed
4058
/**
徐立's avatar
徐立 committed
4059 4060 4061
 * 数组操作函数
 * 创建一个新数组,包含原数组中所有的非假值元素。例如false, null, 0, "", undefined, 和 NaN 都是被认为是“假值”。
 * @param {Array} ary 筛选数组
徐立's avatar
徐立 committed
4062
 */
徐立's avatar
徐立 committed
4063 4064 4065 4066 4067 4068
export function ArrayScreenFalse(ary) {
    if(isArray(ary)){
        return compact(ary)
    } else {
        console.log('传入值非数组')
    }
徐立's avatar
徐立 committed
4069 4070
}
/**
徐立's avatar
徐立 committed
4071 4072 4073 4074
 * 数组操作函数
 * 创建一个新数组,将array与任何数组 或 值连接在一起。
 * @param { Array } ary 连接数组
 * @param { any  } data 连接入数组的值
徐立's avatar
徐立 committed
4075
 */
徐立's avatar
徐立 committed
4076 4077 4078 4079 4080 4081
export function ArrayConcatData(ary,data) {
    if(isArray(ary)){
        return concat(ary,data)
    } else {
        console.log('连接值必须为数组')
    }
徐立's avatar
徐立 committed
4082 4083
}
/**
徐立's avatar
徐立 committed
4084 4085 4086 4087
 * 数组操作函数
 * 创建一个新数组,这个数组中的值,为第一个数字(array 参数)排除了给定数组中的值。
 * @param { Array } ary 需要被筛选的数组
 * @param { Array } ary2 被筛选除外的值 
徐立's avatar
徐立 committed
4088
 */
徐立's avatar
徐立 committed
4089 4090 4091
export function ArrayDifference(ary,ary2) {
    if(isArray(ary)&&isArray(ary2)){
        return difference(ary,ary2)
徐立's avatar
徐立 committed
4092
    } else {
徐立's avatar
徐立 committed
4093
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4094 4095 4096
    }
}
/**
徐立's avatar
徐立 committed
4097 4098 4099 4100 4101 4102
 * 数组操作函数
 * 它接受一个 iteratee (注:迭代器), 调用array 和 values 中的每个元素以产生比较的标准。 结果值是从第一数组中选择。
 * @param { Array } ary 需要被筛选的数组
 * @param { Array } ary2 排除的值。
 * @param { Array|Function|Object|string } data 调用每个元素。
 * @returns { Array } 返回筛选后的数组
徐立's avatar
徐立 committed
4103
 */
徐立's avatar
徐立 committed
4104 4105 4106 4107 4108 4109
export function ArrayDifferenceBy(ary,ary2,data) {
    if(isArray(ary)&&isArray(ary2)){
        return differenceBy(ary,ary2,data)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4110 4111
}
/**
徐立's avatar
徐立 committed
4112 4113 4114 4115 4116
 * 数组操作函数
 * 比较array,values中的元素。 结果值是从第一数组中选择。
 * @param { Array } ary 要检查的数组
 * @param { Array } ary2 要排除的值
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4117
 */
徐立's avatar
徐立 committed
4118 4119 4120 4121 4122 4123
export function ArrayDifferenceWith(ary,ary2) {
    if(isArray(ary)&&isArray(ary2)){
        return differenceWith(ary,ary2,isEqual)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4124 4125
}
/**
徐立's avatar
徐立 committed
4126 4127 4128 4129 4130
 * 数组操作函数
 * 创建一个切片数组,去除array尾部的n个元素。(n默认值为1。)
 * @param { Array } ary 要查询的数组。
 * @param { number } num 要去除的元素个数。
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4131
 */
徐立's avatar
徐立 committed
4132 4133 4134
export function ArrayDropRight(ary,num){
    if(isArray(ary)){
        return dropRight(ary,num)
徐立's avatar
徐立 committed
4135
    } else {
徐立's avatar
徐立 committed
4136
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4137 4138 4139
    }
}
/**
徐立's avatar
徐立 committed
4140 4141 4142 4143 4144
 * 数组操作函数
 * 创建一个切片数组,去除array中从 predicate 返回假值开始到尾部的部分。
 * @param { Array } ary 要查询的数组。
 * @param { function } func 查询规则
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4145
 */
徐立's avatar
徐立 committed
4146 4147 4148 4149 4150
export function ArrayDropRightWhile(ary,func) {
    if(isArray(ary)){
        return dropRightWhile(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4151 4152 4153
    }
}
/**
徐立's avatar
徐立 committed
4154 4155 4156 4157 4158
 * 数组操作函数
 * 创建一个切片数组,去除array中从 predicate 返回假值开始到尾部的部分。
 * @param { Array } ary 要查询的数组。
 * @param { function } func 查询规则
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4159
 */
徐立's avatar
徐立 committed
4160 4161 4162 4163 4164
export function ArrayDropWhile(ary,func) {
    if(isArray(ary)){
        return dropWhile(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4165 4166 4167
    }
}
/**
徐立's avatar
徐立 committed
4168 4169 4170 4171 4172 4173 4174
 * 数组操作函数
 * 使用 value 值来填充(替换) array,从start位置开始, 到end位置结束(但不包含end位置)。
 * @param { Array } ary 要查询的数组.
 * @param { * } data 填充给 array 的值。
 * @param { number } start 开始位置(默认0)。
 * @param { number } end 结束位置
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4175
 */
徐立's avatar
徐立 committed
4176 4177 4178 4179 4180
export function ArrayFill(ary,data,start=0,end) {
    if(isArray(ary)){
        return fill(ary,data,start)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4181 4182 4183
    }
}
/**
徐立's avatar
徐立 committed
4184 4185 4186 4187 4188
 * 数组操作函数
 * 该方法返回第一个通过 predicate 判断为真值的元素的索引值(index),而不是元素本身。
 * @param { Array } ary 要查询的数组.
 * @param { function } func 查询规则
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4189
 */
徐立's avatar
徐立 committed
4190 4191 4192 4193 4194
export function ArrayFindIndex(ary,func) {
    if(isArray(ary)){
        return findIndex(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4195 4196 4197
    }
}
/**
徐立's avatar
徐立 committed
4198 4199 4200 4201 4202
 * 数组操作函数
 * 该方法从末尾查询返回第一个通过 predicate 判断为真值的元素的索引值(index),而不是元素本身。
 * @param { Array } ary 要查询的数组.
 * @param { function } func 查询规则
 * @returns { Array } 返回一个新数组
徐立's avatar
徐立 committed
4203
 */
徐立's avatar
徐立 committed
4204 4205 4206
export function ArrayFindLastIndex(ary,func) {
    if(isArray(ary)){
        return findLastIndex(ary,func)
徐立's avatar
徐立 committed
4207
    } else {
徐立's avatar
徐立 committed
4208
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4209 4210 4211
    }
}
/**
徐立's avatar
徐立 committed
4212 4213 4214 4215
 * 数组操作函数
 * 获取数组第一个元素
 * @param {Array} ary 要查询的数组
 * @returns {*}  返回数组 array的第一个元素。
徐立's avatar
徐立 committed
4216
 */
徐立's avatar
徐立 committed
4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367
export function ArrayHead(ary) {
    if(isArray(ary)){
        return head(ary)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 减少一级array嵌套深度。
 * @param {Array} ary 要减少嵌套深度的数组
 */
export function ArrayFlatten(ary) {
    if(isArray(ary)){
        return flatten(ary)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 将array递归为一维数组。
 * @param {Array} ary 要清除嵌套深度的数组
 * @returns { Array } 一维数组
 */
export function ArrayFlattenDeep(ary) {
    if(isArray(ary)){
        return flattenDeep(ary)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 减少指定层级array嵌套深度。
 * @param { Array } ary 减少指定层级array嵌套深度。
 * @param { number } num 最多减少的嵌套层级数。
 * @returns { Array } 返回减少嵌套层级后的新数组。
 */
export function ArrayFlattenDepth(ary,num) {
    if(isArray(ary)){
        return flattenDepth(ary,num)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 将数组pairs格式化为对象
 * @param { Array } ary 键值对pairs。
 * @returns { object } 返回一个新对象。
 */
export function ArrayFromPairs(ary) {
    if(isArray(ary)){
        return fromPairs(ary)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 返回首次 value 在数组array中被找到的 索引值, 如果 fromIndex 为负值,将从数组array尾端索引进行匹配。
 * @param { Array } ary  需要查找的数组。
 * @param { * } data 需要查找的值
 * @param { numbre } num 开始查询的位置。
 * @returns 返回 值value在数组中的索引位置, 没有找到为返回-1。
 */
export function ArrayIndexOf(ary,data,num=0) {
    if(isArray(ary)){
        return indexOf(ary,data,num)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 获取数组array中除了最后一个元素之外的所有元素(注:去除数组array中的最后一个元素)。
 * @param { Array } ary 需要查找的数组。
 * @returns 返回截取后的数组array。
 */
export function ArrayInitial(ary) {
    if(isArray(ary)){
        return initial(ary)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 创建唯一值的数组,这个数组包含所有给定数组都包含的元素,
 * @param { Array } ary 待检查的数组
 * @returns 返回一个包含所有传入数组交集元素的新数组。
 */
export function ArrayIntersection(ary) {
    if(isArray(ary)){
        return intersection(...ary)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 它接受一个 iteratee 调用每一个arrays的每个值以产生一个值,通过产生的值进行了比较。结果值是从第一数组中选择。
 * @param { Array } ary 待检查的数组
 * @param { function } func 查询规则
 * @returns  返回一个包含所有传入数组交集元素的新数组。
 */
export function ArrayIntersectionBy(ary,func) {
    if(isArray(ary)){
        return intersectionBy(...ary,func)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 它接受一个 comparator 调用比较arrays中的元素。结果值是从第一数组中选择。
 * @param { Array } ary 待检查的数组
 * @returns  返回一个包含所有传入数组交集元素的新数组。
 */
export function ArrayIntersectionWith(ary) {
    if(isArray(ary)){
        return intersectionBy(...ary,isEqual)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 将 array 中的所有元素转换为由 separator 分隔的字符串。
 * @param { Array } ary 待转换的数组
 * @param { string } str 分割元素
 * @returns 返回连接字符串。
 */
export function ArrayJoin(ary,str=',') {
    if(isArray(ary)){
        return join(ary,str)
    } else {
        console.log('传入值必须为数组')
    }
}
/**
 * 数组操作函数
 * 获取array中的最后一个元素。
 * @param { Array } ary 要检索的数组
 */
export function ArrayLast(ary) {
    if(isArray(ary)){
        return last(ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4368 4369 4370
    }
}
/**
徐立's avatar
徐立 committed
4371 4372 4373 4374 4375 4376
 * 数组操作函数
 * 它是从右到左遍历array的元素。返回查找到的元素
 * @param { Array } ary 待查找数组
 * @param {*} value 要搜索的值
 * @param {number} startIndex 开始搜索的下标值 默认 最后位
 * @returns 返回匹配值的索引值,否则返回 -1。
徐立's avatar
徐立 committed
4377
 */
徐立's avatar
徐立 committed
4378 4379 4380 4381 4382 4383 4384 4385 4386
export function ArrayLastIndexOf(ary,value,startIndex) {
    if(isArray(ary)){
        if(startIndex){
            return lastIndexOf(ary,value,startIndex)
        }
        return lastIndexOf(ary,value)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4387 4388
}
/**
徐立's avatar
徐立 committed
4389 4390 4391 4392 4393
 * 数组操作函数
 * 获取array数组的第n个元素。如果n为负数,则返回从数组结尾开始的第n个元素。
 * @param { Array } ary 要查询的数组。
 * @param { number } num  要返回元素的索引值。
 * @returns { * }  获取array数组的第n个元素。
徐立's avatar
徐立 committed
4394
 */
徐立's avatar
徐立 committed
4395 4396 4397 4398 4399 4400
export function ArrayNth(ary,num) {
    if(isArray(ary)){
        return nth(ary,num)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4401 4402
}
/**
徐立's avatar
徐立 committed
4403 4404 4405 4406 4407
 * 数组操作函数
 * 移除数组array中所有和给定值相等的元素,使用 SameValueZero 进行全等比较。 会修改传入数组
 * @param { Array } ary 要修改的数组。
 * @param { value } value 需要删除的值 可多个
 * @returns { Array }  返回 array.
徐立's avatar
徐立 committed
4408
 */
徐立's avatar
徐立 committed
4409 4410 4411 4412 4413 4414
export function ArrayPull(ary,...value) {
    if(isArray(ary)){
        return pull(ary,...value)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4415 4416
}
/**
徐立's avatar
徐立 committed
4417 4418 4419 4420 4421
 * 数组操作函数
 * 移除数组array中所有和给定值相等的元素,使用 SameValueZero 进行全等比较。区别是这个方法接收一个要移除值的数组。 会修改传入数组
 * @param { Array } ary 要修改的数组。
 * @param { Array } ary2 要移除值的数组。
 * @returns { Array }  返回 array.
徐立's avatar
徐立 committed
4422
 */
徐立's avatar
徐立 committed
4423 4424 4425 4426 4427 4428
export function ArrayPullAll(ary,ary2) {
    if(isArray(ary)&&isArray(ary2)){
        return pullAll(ary,ary2)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4429 4430
}
/**
徐立's avatar
徐立 committed
4431 4432 4433 4434 4435 4436
 * 数组操作函数
 * 这个方法接受一个 iteratee(迭代函数) 调用 array 和 values的每个值以产生一个值,通过产生的值进行了比较。 会修改传入数组
 * @param { Array } ary 要修改的数组。
 * @param { Array } ary2 要移除值的数组。
 * @param { Array|Function|Object|string } value(迭代器)调用每个元素。
 * @returns { Array }  返回 array.
徐立's avatar
徐立 committed
4437
 */
徐立's avatar
徐立 committed
4438 4439 4440 4441 4442 4443 4444 4445 4446
export function ArrayPullAllBy(ary,ary2,value) {
    if(isArray(ary)&&isArray(ary2)){
        if(value){
            return pullAllBy(ary,ary2,value)
        }
        return pullAllBy(ary,ary2)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4447 4448
}
/**
徐立's avatar
徐立 committed
4449 4450 4451 4452 4453
 * 数组操作函数
 * 这个方法接受 comparator 调用array中的元素和values比较。
 * @param { Array } ary 要修改的数组。
 * @param { Array } ary2 要移除值的数组。
 * @returns { Array }  返回 array.
徐立's avatar
徐立 committed
4454
 */
徐立's avatar
徐立 committed
4455 4456 4457
export function ArrayPullAllWith(ary,ary2) {
    if(isArray(ary)&&isArray(ary2)){
        return pullAllWith(ary,ary2,isEqual)
徐立's avatar
徐立 committed
4458
    } else {
徐立's avatar
徐立 committed
4459
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4460 4461 4462
    }
}
/**
徐立's avatar
徐立 committed
4463 4464 4465 4466
 * 数组操作函数
 * 根据索引 indexes,移除array中对应的元素,并返回被移除元素的数组。 会修改传入数组
 * @param { Array } ary 要修改的数组。
 * @param { number } value 要移除元素的索引。
徐立's avatar
徐立 committed
4467
 */
徐立's avatar
徐立 committed
4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478
export function ArrayPullAt(ary,value) {
    if(isArray(ary)){
        let newAry = []
        ary.map((item,index) => {
            if(index === value){
                return item
            }
            newAry.push(item)
            return item
        })
        return newAry
徐立's avatar
徐立 committed
4479
    } else {
徐立's avatar
徐立 committed
4480
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4481 4482 4483
    }
}
/**
徐立's avatar
徐立 committed
4484 4485 4486 4487 4488
 * 数组操作函数
 * 移除数组中predicate(断言)返回为真值的所有元素,并返回移除元素组成的数组。
 * @param { Array } ary 要修改的数组。
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns { Array }  返回移除元素组成的新数组。
徐立's avatar
徐立 committed
4489
 */
徐立's avatar
徐立 committed
4490 4491 4492 4493 4494 4495
export function ArrayRemove(ary,func) {
    if(isArray(ary)){
        remove(ary,func)
        return ary
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4496 4497 4498
    }
}
/**
徐立's avatar
徐立 committed
4499 4500 4501 4502
 * 数组操作函数
 * 反转array,使得第一个元素变为最后一个元素,第二个元素变为倒数第二个元素,依次类推。
 * @param { Array } ary 要反转的数组
 * @returns { Array } 返回反转组成的新数组。
徐立's avatar
徐立 committed
4503
 */
徐立's avatar
徐立 committed
4504
export function ArrayReverse(ary) {
徐立's avatar
徐立 committed
4505
    if(isArray(ary)){
徐立's avatar
徐立 committed
4506 4507 4508 4509 4510
        let nAry = [...ary]
        reverse(nAry)
        return nAry
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4511 4512 4513
    }
}
/**
徐立's avatar
徐立 committed
4514 4515 4516 4517 4518 4519
 * 数组操作函数
 * 裁剪数组array,从 start 位置开始到end结束,但不包括 end 本身的位置
 * @param { Array } ary 要裁剪的数组
 * @param { number } start 开始的位置
 * @param { number } end 结束的位置
 * @returns 返回 数组array 裁剪部分的新数组。
徐立's avatar
徐立 committed
4520
 */
徐立's avatar
徐立 committed
4521
export function ArraySlice(ary,start=0,end) {
徐立's avatar
徐立 committed
4522
    if(isArray(ary)){
徐立's avatar
徐立 committed
4523 4524 4525 4526 4527 4528 4529
        if(end){
            return slice(ary,start,end)
        } else {
            return slice(ary,start)
        }
    }else{
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4530 4531 4532
    }
}
/**
徐立's avatar
徐立 committed
4533 4534 4535 4536 4537
 * 数组操作函数
 * 使用二进制的方式检索来决定 value值 应该插入到数组中 尽可能小的索引位置,以保证array的排序。
 * @param { Array } ary 要检查的排序数组。
 * @param { * } value 要评估的值
 * @returns 返回 value值 应该在数组array中插入的索引位置 index。
徐立's avatar
徐立 committed
4538
 */
徐立's avatar
徐立 committed
4539 4540 4541 4542 4543 4544
export function ArraySortedIndex(ary,value) {
    if(isArray(ary)){
        return sortedIndex(ary,value)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4545 4546
}
/**
徐立's avatar
徐立 committed
4547 4548 4549 4550 4551 4552
 * 数组操作函数
 * 它接受一个 iteratee (迭代函数),调用每一个数组(array)元素,返回结果和value 值比较来计算排序
 * @param { Array } ary 要检查的排序数组
 * @param { * } value  要评估的值。
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns 返回 value值 应该在数组array中插入的索引位置 index。
徐立's avatar
徐立 committed
4553
 */
徐立's avatar
徐立 committed
4554 4555 4556 4557 4558 4559
export function ArraySortedIndexBy(ary,value,func) {
    if(isArray(ary)){
        return sortedIndexBy(ary,value,func)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4560 4561
}
/**
徐立's avatar
徐立 committed
4562 4563 4564 4565 4566
 * 数组操作函数
 * 这个方法类似 _.indexOf,除了它是在已经排序的数组array上执行二进制检索。
 * @param { Array } ary 要检查的排序数组
 * @param { * } value 要检查的值
 * @returns 返回匹配值的索引位置,否则返回 -1。
徐立's avatar
徐立 committed
4567
 */
徐立's avatar
徐立 committed
4568 4569 4570 4571 4572 4573
export function ArraySortedIndexOf(ary,value) {
    if(isArray(ary)){
        return sortedIndexOf(ary,value)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4574 4575
}
/**
徐立's avatar
徐立 committed
4576 4577 4578 4579 4580
 * 数组操作函数
 * 它返回 value值 在 array 中尽可能大的索引位置(index)。
 * @param { Array } ary 要检查的排序数组
 * @param { * } value 要检查的值
 * @returns 返回匹配值的索引位置,否则返回 -1。
徐立's avatar
徐立 committed
4581
 */
徐立's avatar
徐立 committed
4582 4583 4584
export function ArraySortedLastIndex(ary,value) {
    if(isArray(ary)){
        return sortedLastIndex(ary,value)
徐立's avatar
徐立 committed
4585
    } else {
徐立's avatar
徐立 committed
4586
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4587 4588 4589
    }
}
/**
徐立's avatar
徐立 committed
4590 4591 4592 4593 4594 4595
 * 数组操作函数
 * 它接受一个 iteratee (迭代函数),调用每一个数组(array)元素,返回结果和value 值比较来计算排序。
 * @param { Array } ary 要检查的排序数组
 * @param { * } value 要评估检查的值
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns 返回 value值 应该在数组array中插入的索引位置 index。
徐立's avatar
徐立 committed
4596
 */
徐立's avatar
徐立 committed
4597
export function ArraySortedLastIndexBy(ary,value,func) {
徐立's avatar
徐立 committed
4598
    if(isArray(ary)){
徐立's avatar
徐立 committed
4599 4600 4601
        return sortedLastIndexBy(ary,value,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4602 4603 4604
    }
}
/**
徐立's avatar
徐立 committed
4605 4606 4607 4608 4609
 * 数组操作函数
 * 它是在已经排序的数组array上执行反向二进制检索。
 * @param { Array } ary 要检查的排序数组
 * @param { * } value 要检查的值
 * @returns 返回匹配值的索引位置,否则返回 -1。
徐立's avatar
徐立 committed
4610
 */
徐立's avatar
徐立 committed
4611 4612 4613 4614 4615 4616
export function ArraySortedLastIndexOf(ary,value) {
    if(isArray(ary)){
        return sortedLastIndexOf(ary,value)
    } else {
        console.log('传入值必须为数组')
    }
徐立's avatar
徐立 committed
4617 4618
}
/**
徐立's avatar
徐立 committed
4619 4620 4621 4622
 * 数组操作函数
 * 它会优化排序数组,返回一个不重复数组
 * @param { Array } ary 要检查的排序数组
 * @returns 返回一个新的不重复的数组。
徐立's avatar
徐立 committed
4623
 */
徐立's avatar
徐立 committed
4624 4625 4626 4627 4628
export function ArraySortedUniq(ary) {
    if(isArray(ary)){
        return sortedUniq(ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4629 4630 4631
    }
}
/**
徐立's avatar
徐立 committed
4632 4633 4634 4635 4636
 * 数组操作函数
 * 它会根据指定规则优化排序数组。,返回一个不重复数组
 * @param { Array } ary 要检查的数组。
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns 迭代函数,调用每个元素。
徐立's avatar
徐立 committed
4637
 */
徐立's avatar
徐立 committed
4638 4639 4640
export function ArraySortedUniqBy(ary,func) {
    if(isArray(ary)){
        return sortedUniqBy(ary,func)
徐立's avatar
徐立 committed
4641
    } else {
徐立's avatar
徐立 committed
4642
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4643 4644 4645
    }
}
/**
徐立's avatar
徐立 committed
4646 4647 4648 4649
 * 数组操作函数
 * 获取除了array数组第一个元素以外的全部元素。
 * @param { Array } ary 要检查的数组。
 * @returns 返回 array 数组的切片(除了array数组第一个元素以外的全部元素)。
徐立's avatar
徐立 committed
4650
 */
徐立's avatar
徐立 committed
4651 4652 4653 4654 4655
export function ArrayTail(ary) {
    if(isArray(ary)){
        return tail(ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4656 4657 4658
    }
}
/**
徐立's avatar
徐立 committed
4659 4660 4661 4662 4663
 * 数组操作函数
 * 创建一个数组切片,从array数组的起始元素开始提取n个元素。
 * @param { Array } ary 要检索的数组
 * @param { number } num 要提取的元素个数。
 * @returns 返回 array 数组的切片(从起始元素开始n个元素)。
徐立's avatar
徐立 committed
4664
 */
徐立's avatar
徐立 committed
4665 4666 4667 4668 4669
export function ArrayTake(ary,num) {
    if(isArray(ary)){
        return take(ary,num)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4670 4671 4672
    }
}
/**
徐立's avatar
徐立 committed
4673 4674 4675 4676 4677
 * 数组操作函数
 * 创建一个数组切片,从array数组的最后一个元素开始提取n个元素。
 * @param { Array } ary 要检索的数组
 * @param { number } num 要提取的元素个数
 * @returns 返回 array 数组的切片(从最后元素开始n个元素)。
徐立's avatar
徐立 committed
4678
 */
徐立's avatar
徐立 committed
4679 4680 4681 4682 4683
export function ArrayTakeRight(ary,num) {
    if(isArray(ary)){
        return takeRight(ary,num)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4684 4685 4686
    }
}
/**
徐立's avatar
徐立 committed
4687 4688 4689 4690 4691
 * 数组操作函数
 * 从array数组的最后一个元素开始提取元素,直到规则返回假值。
 * @param { Array } ary 要检索的数组
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns 返回 array 数组的切片。
徐立's avatar
徐立 committed
4692
 */
徐立's avatar
徐立 committed
4693 4694 4695 4696 4697
export function ArrayTakeRightWhile(ary,func) {
    if(isArray(ary)){
        return takeRightWhile(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4698 4699 4700
    }
}
/**
徐立's avatar
徐立 committed
4701 4702 4703 4704 4705
 * 数组操作函数
 * 从array数组的起始元素开始提取元素,,直到 规则 返回假值。
 * @param { Array } ary 要检索的数组
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns 返回 array 数组的切片。
徐立's avatar
徐立 committed
4706
 */
徐立's avatar
徐立 committed
4707 4708 4709 4710 4711
export function ArrayTakeWhile(ary,func) {
    if(isArray(ary)){
        return takeWhile(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4712 4713 4714
    }
}
/**
徐立's avatar
徐立 committed
4715 4716 4717 4718
 * 数组操作函数
 * 创建一个按顺序排列的唯一值的数组。所有给定数组的元素值做等值比较。
 * @param { Array } ary 要检查的数组
 * @returns 返回一个新的联合数组。
徐立's avatar
徐立 committed
4719
 */
徐立's avatar
徐立 committed
4720 4721
export function ArrayUnion(...ary) {
    return union(...ary)
徐立's avatar
徐立 committed
4722 4723
}
/**
徐立's avatar
徐立 committed
4724 4725 4726 4727 4728
 * 数组操作函数
 * 它接受一个 iteratee (迭代函数),调用每一个数组(array)的每个元素以产生唯一性计算的标准。
 * @param { Array } ary  要检查的数组。
 * @param { Array|Function|Object|string } func 迭代函数,调用每个元素。
 * @returns  返回一个新的联合数组。
徐立's avatar
徐立 committed
4729
 */
徐立's avatar
徐立 committed
4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747
export function ArrayUnionBy(ary,func) {
    if(isArray(ary)){
        return unionBy(ary,func)
    } else {
        console.log('传入值必须为数组')
    }
}
/***
 * 数组操作函数
 * 它接受一个 comparator 调用比较arrays数组的每一个元素。 
 * @param { Array } ary 要检查的多个数组
 * @returns  返回一个新的联合数组。
 */
export function ArrayUnionWith(...ary) {
    if(isArray(ary)){
        return unionWith(...ary,isEqual)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4748 4749 4750
    }
}
/**
徐立's avatar
徐立 committed
4751 4752 4753 4754
 * 数组操作函数
 * 创建一个去重后的array数组副本。只有第一次出现的元素才会被保留。
 * @param { Array } ary 要检查的数组。
 * @returns  返回新的去重后的数组。
徐立's avatar
徐立 committed
4755
 */
徐立's avatar
徐立 committed
4756 4757 4758 4759 4760
export function ArrayUniq(ary) {
    if(isArray(ary)){
        return uniq(ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4761 4762 4763
    }
}
/**
徐立's avatar
徐立 committed
4764 4765 4766 4767 4768
 * 数组操作函数
 * 它接受一个 iteratee (迭代函数),调用每一个数组(array)的每个元素以产生唯一性计算的标准。
 * @param { Array } ary 要检查的数组。
 * @param { Array|Function|Object|string } func 迭代函数,调用每个元素。
 * @returns 返回新的去重后的数组。
徐立's avatar
徐立 committed
4769
 */
徐立's avatar
徐立 committed
4770 4771 4772 4773 4774
export function ArrayUniqBy(ary,func) {
    if(isArray(ary)){
        return uniqBy(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4775 4776 4777
    }
}
/**
徐立's avatar
徐立 committed
4778 4779 4780 4781
 * 数组操作函数
 * 它接受一个 comparator 调用比较arrays数组的每一个元素
 * @param { Array } ary 要检查的数组。
 * @returns 返回新的去重后的数组。
徐立's avatar
徐立 committed
4782
 */
徐立's avatar
徐立 committed
4783 4784 4785 4786 4787
export function ArrayUniqWith(ary) {
    if(isArray(ary)){
        return uniqWith(ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4788 4789 4790
    }
}
/**
徐立's avatar
徐立 committed
4791 4792 4793 4794
 * 数组操作函数
 * 它接收分组元素的数组,并且创建一个数组,分组元素到打包前的结构。
 * @param { Array } ary 要处理的分组元素数组。
 * @returns 返回重组元素的新数组。
徐立's avatar
徐立 committed
4795
 */
徐立's avatar
徐立 committed
4796 4797 4798 4799 4800
export function ArrayUnzip(...ary) {
    if(isArray(ary)){
        return unzip(ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4801 4802 4803
    }
}
/**
徐立's avatar
徐立 committed
4804 4805 4806 4807 4808
 * 数组操作函数
 * 它接受一个iteratee指定重组值应该如何被组合。
 * @param { Array } ary 要处理的分组元素数组。
 * @param { Array|Function|Object|string } func 迭代函数,调用每个元素。
 * @returns 这个函数用来组合重组的值。
徐立's avatar
徐立 committed
4809
 */
徐立's avatar
徐立 committed
4810 4811 4812 4813 4814
export function ArrayUnzipWidth(ary,func) {
    if(isArray(ary)){
        return unzipWith(ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4815 4816 4817
    }
}
/**
徐立's avatar
徐立 committed
4818 4819 4820 4821 4822
 * 数组操作函数
 * 创建一个剔除所有给定值的新数组,
 * @param { Array } ary 要处理的分组元素数组。
 * @param { any } value 要剔除的值。
 * @returns 返回过滤值后的新数组。
徐立's avatar
徐立 committed
4823
 */
徐立's avatar
徐立 committed
4824 4825 4826 4827 4828
export function ArrayWithout(ary,...value) {
    if(isArray(ary)){
        return without(ary,...value)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4829 4830 4831
    }
}
/**
徐立's avatar
徐立 committed
4832 4833 4834 4835
 * 数组操作函数
 * 创建一个给定数组唯一值的数组,返回值的顺序取决于他们数组的出现顺序,返回过滤后的新数组
 * @param { Array } ary 要检查的数组。
 * @returns 返回过滤值后的新数组。
徐立's avatar
徐立 committed
4836
 */
徐立's avatar
徐立 committed
4837
export function ArrayXor(...ary) {
徐立's avatar
徐立 committed
4838
    if(isArray(ary)){
徐立's avatar
徐立 committed
4839 4840 4841
        return xor(...ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4842 4843 4844
    }
}
/**
徐立's avatar
徐立 committed
4845 4846 4847 4848 4849
 * 数组操作函数
 * 它接受 迭代器,这个迭代器 调用每一个 arrays(数组)的每一个值,以生成比较的新值。
 * @param { Array } ary 要检查的数组组。
 * @param { Array|Function|Object|string } func 迭代函数,调用每个元素。
 * @returns 返回过滤值后的新数组。
徐立's avatar
徐立 committed
4850
 */
徐立's avatar
徐立 committed
4851
export function ArrayXorBy(ary,func) {
徐立's avatar
徐立 committed
4852
    if(isArray(ary)){
徐立's avatar
徐立 committed
4853 4854 4855
        return xorBy(...ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4856 4857 4858
    }
}
/**
徐立's avatar
徐立 committed
4859 4860 4861 4862 4863
 * 数组操作函数
 * 接收对象进行相同筛选,以调用比较数组的元素。
 * @param { Array } ary 要检查的数组组。
 * @param { Array|Function|Object|string } func 迭代函数,调用每个元素。
 * @returns 返回过滤值后的新数组。
徐立's avatar
徐立 committed
4864
 */
徐立's avatar
徐立 committed
4865
export function ArrayXorWith(ary,func) {
徐立's avatar
徐立 committed
4866
    if(isArray(ary)){
徐立's avatar
徐立 committed
4867 4868 4869
        return xorWith(...ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4870 4871 4872
    }
}
/**
徐立's avatar
徐立 committed
4873 4874 4875 4876
 * 数组操作函数
 * 创建一个分组元素的数组,数组的第一个元素包含所有给定数组的第一个元素,数组的第二个元素包含所有给定数组的第二个元
 * @param { Array } ary 要合并分组的数组组
 * @returns 返回分组元素的新数组。
徐立's avatar
徐立 committed
4877
 */
徐立's avatar
徐立 committed
4878
export function ArrayZip(...ary) {
徐立's avatar
徐立 committed
4879
    if(isArray(ary)){
徐立's avatar
徐立 committed
4880 4881 4882
        return zip(...ary)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4883 4884 4885
    }
}
/**
徐立's avatar
徐立 committed
4886 4887 4888 4889 4890
 * 数组操作函数
 * 它接受2个数组,第一个数组中的值作为属性标识符(属性名),第二个数组中的值作为相应的属性值。
 * @param { Array } ary 作为对象标识符数组
 * @param { Array } ary2 作为属性值数组
 * @returns 返回新对象
徐立's avatar
徐立 committed
4891
 */
徐立's avatar
徐立 committed
4892 4893 4894 4895 4896
export function ArrayZipObject(ary,ary2) {
    if(isArray(ary)&&isArray(ary2)){
        return zipObject(ary,ary2)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4897 4898 4899
    }
}
/**
徐立's avatar
徐立 committed
4900 4901 4902 4903 4904
 * 数组操作函数
 * 它支持属性路径接受2个数组,第一个数组中的值作为属性标识符(属性名),第二个数组中的值作为相应的属性值。
 * @param { Array } ary 作为对象标识符(属性名)数组
 * @param { Array } ary2 作为属性值数组
 * @returns 返回新对象
徐立's avatar
徐立 committed
4905
 */
徐立's avatar
徐立 committed
4906 4907 4908 4909 4910
export function ArrayZipObjectDeep(ary, ary2) {
    if(isArray(ary)&&isArray(ary2)){
        return zipObjectDeep(ary,ary2)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4911 4912 4913
    }
}
/**
徐立's avatar
徐立 committed
4914 4915 4916 4917 4918
 * 数组操作函数
 * 它接受一个 iteratee(迭代函数),来 指定分组的值应该如何被组合。 该iteratee调用每个组的元素
 * @param { Array } ary  要处理的数组组。
 * @param { Function } func 函数用来组合分组的值。
 * @returns 返回分组元素的新数组。
徐立's avatar
徐立 committed
4919
 */
徐立's avatar
徐立 committed
4920
export function ArrayZipWith(ary,func) {
徐立's avatar
徐立 committed
4921
    if(isArray(ary)){
徐立's avatar
徐立 committed
4922 4923 4924
        return zipWith(...ary,func)
    } else {
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4925 4926 4927
    }
}
/**
徐立's avatar
徐立 committed
4928 4929 4930 4931 4932
 * 对象操作函数
 * 创建一个组成对象,key(键)是经过 iteratee(迭代函数) 执行处理collection中每个元素后返回的结果,每个key(键)对应的值是 iteratee(迭代函数)返回该key(键)的次数
 * @param { Array } ary 一个用来迭代的集合。
 * @param { Array|Function|Object|string } func 一个迭代函数,用来转换key(键)
 * @returns { Object } 返回一个组成集合对象。
徐立's avatar
徐立 committed
4933
 */
徐立's avatar
徐立 committed
4934
export function ObjectCountBy(ary,func) {
徐立's avatar
徐立 committed
4935
    if(isArray(ary)){
徐立's avatar
徐立 committed
4936
        return countBy(ary,func)
徐立's avatar
徐立 committed
4937
    } else {
徐立's avatar
徐立 committed
4938
        console.log('传入值必须为数组')
徐立's avatar
徐立 committed
4939 4940
    }
}
徐立's avatar
徐立 committed
4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970
/**
 * 对象操作函数
 * 调用 iteratee 遍历 collection(集合) 中的每个元素,如果迭代函数(iteratee)显式的返回 false ,迭代会提前退出。
 * @param { Array|Object } ary 一个用来迭代的集合。
 * @param { Function } func 函数用来组合分组的值。
 * @returns  返回集合 collection。
 */
export function ObjectForEach(ary,func) {
    return forEach(ary,func)
}
/**
 * 对象操作函数
 * 调用 iteratee 反方向遍历 collection(集合) 中的每个元素,如果迭代函数(iteratee)显式的返回 false ,迭代会提前退出。
 * @param { Array|Object } ary 一个用来迭代的集合。
 * @param { Function } func 函数用来组合分组的值。
 * @returns  返回集合 collection。
 */
export function ObjectForEachRight(ary,func) {
    return forEachRight(ary,func)
}
/**
 * 对象操作函数
 * 通过 predicate(断言函数) 检查 collection(集合)中的 所有 元素是否都返回真值。一旦 predicate(断言函数) 返回假值,迭代就马上停止。
 * @param { Array|Object } ary 一个用来迭代的集合。
 * @param { Array|Function|Object|string } func 每次迭代调用的函数。
 * @returns 如果所有元素经 predicate(断言函数) 检查后都都返回真值,那么就返回true,否则返回 false 。
 */
export function ObjectEvery(ary, func) {
    return every(ary,func)
}
徐立's avatar
徐立 committed
4971
export default List