back soft

مطالب مرتبط با «how to attack a castled king» در back soft | نویسنده: استخدام کار

How to "uncast" a Javascript enum to a string?

Vote count: 0 I'm using Google Apps Script, whose Drive library has the following function: setSharing(accessType, permissionType) accessType: Access (enum) permissionType: Permission (enum) To allow for a good user experience, I have the following objects to match enum values to nice Strings, and vice-verca (I only show here the objects for the Access, but I have the same for the Permission): /*** Method 1 ***/ var ACCESS_STR = {}; var ACCESS_ID = {}; ACCESS_STR[ DriveApp.Access.ANYONE ] = "Any...

ادامه مطلب