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