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