cEnumToJSPropertyAttributes function

JSPropertyAttributes cEnumToJSPropertyAttributes(
  1. int typeCode
)

C enum to enum JSPropertyAttributes

Implementation

JSPropertyAttributes cEnumToJSPropertyAttributes(int typeCode) {
  switch (typeCode) {
    case JSObjectRef.JSPropertyAttributes.kJSPropertyAttributeReadOnly:
      return JSPropertyAttributes.kJSPropertyAttributeReadOnly;
    case JSObjectRef.JSPropertyAttributes.kJSPropertyAttributeDontEnum:
      return JSPropertyAttributes.kJSPropertyAttributeDontEnum;
    case JSObjectRef.JSPropertyAttributes.kJSPropertyAttributeDontDelete:
      return JSPropertyAttributes.kJSPropertyAttributeDontDelete;
    default:
      return JSPropertyAttributes.kJSPropertyAttributeNone;
  }
}