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