1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16function basePullAll(array) { 17 return array; 18} 19 20function pullAll(array, values) { 21 return (array && array.length && values && values.length) 22 ? basePullAll(array, values) 23 : array; 24} 25 26function pullAll_Test() { 27 const source = ['a', 'b', 'c', 'a', 'b', 'c'] 28 let result = null; 29 for (let i = 0; i < 10; i++) { 30 result = pullAll(source, ['a', 'c']); 31 } 32 print(`done`) 33} 34 35function lodash_Array_Test() { 36 pullAll_Test() 37} 38 39lodash_Array_Test() 40 41let a = {x: 1, y: 2, z: 3} 42 43let b = {x: 1, y: 2} 44let c = {x: 1} 45 46if (ArkTools.isAOTCompiled(foo)) { 47 let d = {x: 1, y: 2, z: 3, u: 4} 48 print(d.y) 49} 50 51function foo() { 52 return a.x; 53} 54 55function result() { 56 return false; 57} 58 59print(foo()) 60