1*af2ec015STomasz Sapeta // Copyright 2022-present 650 Industries. All rights reserved. 2*af2ec015STomasz Sapeta 3*af2ec015STomasz Sapeta #include "JSIUtils.h" 4*af2ec015STomasz Sapeta 5*af2ec015STomasz Sapeta namespace ABI49_0_0expo { 6*af2ec015STomasz Sapeta jsiArrayToPropNameIdsVector(jsi::Runtime & runtime,const jsi::Array & array)7*af2ec015STomasz Sapetastd::vector<jsi::PropNameID> jsiArrayToPropNameIdsVector(jsi::Runtime &runtime, const jsi::Array &array) { 8*af2ec015STomasz Sapeta size_t size = array.size(runtime); 9*af2ec015STomasz Sapeta std::vector<jsi::PropNameID> vector; 10*af2ec015STomasz Sapeta 11*af2ec015STomasz Sapeta vector.reserve(size); 12*af2ec015STomasz Sapeta 13*af2ec015STomasz Sapeta for (size_t i = 0; i < size; i++) { 14*af2ec015STomasz Sapeta jsi::String name = array.getValueAtIndex(runtime, i).getString(runtime); 15*af2ec015STomasz Sapeta vector.push_back(jsi::PropNameID::forString(runtime, name)); 16*af2ec015STomasz Sapeta } 17*af2ec015STomasz Sapeta return vector; 18*af2ec015STomasz Sapeta } 19*af2ec015STomasz Sapeta 20*af2ec015STomasz Sapeta } // namespace ABI49_0_0expo 21