All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.utils.permissions.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"permissions.js","names":["hasPermission","permission","_globalProps$permissi","_globalProps","permissions","globalProps","includes","hasAnyPermission","_len","arguments","length","Array","_key","some","hasAllPermissions","_len2","_key2","every"],"sources":["../../src/utils/permissions.js"],"sourcesContent":["export const hasPermission = permission => {\n  const permissions = globalProps?.permissions ?? [];\n\n  return permissions.includes(permission);\n};\n\nexport const hasAnyPermission = (...permissions) =>\n  permissions.some(hasPermission);\n\nexport const hasAllPermissions = (...permissions) =>\n  permissions.every(hasPermission);\n"],"mappings":"AAAA,OAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,UAAU,EAAI;EAAA,IAAAC,qBAAA,EAAAC,YAAA;EACzC,IAAMC,WAAW,IAAAF,qBAAA,IAAAC,YAAA,GAAGE,WAAW,cAAAF,YAAA,uBAAXA,YAAA,CAAaC,WAAW,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,EAAE;EAElD,OAAOE,WAAW,CAACE,QAAQ,CAACL,UAAU,CAAC;AACzC,CAAC;AAED,OAAO,IAAMM,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAA;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAON,WAAW,OAAAO,KAAA,CAAAH,IAAA,GAAAI,IAAA,MAAAA,IAAA,GAAAJ,IAAA,EAAAI,IAAA;IAAXR,WAAW,CAAAQ,IAAA,IAAAH,SAAA,CAAAG,IAAA;EAAA;EAAA,OAC7CR,WAAW,CAACS,IAAI,CAACb,aAAa,CAAC;AAAA;AAEjC,OAAO,IAAMc,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAA;EAAA,SAAAC,KAAA,GAAAN,SAAA,CAAAC,MAAA,EAAON,WAAW,OAAAO,KAAA,CAAAI,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;IAAXZ,WAAW,CAAAY,KAAA,IAAAP,SAAA,CAAAO,KAAA;EAAA;EAAA,OAC9CZ,WAAW,CAACa,KAAK,CAACjB,aAAa,CAAC;AAAA","ignoreList":[]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy