package.cjs.utils.permissions.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
{"version":3,"file":"permissions.js","names":["hasPermission","permission","_globalProps$permissi","_globalProps","permissions","globalProps","includes","exports","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":";;;;;;AAAO,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;AAACM,OAAA,CAAAP,aAAA,GAAAA,aAAA;AAEK,IAAMQ,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAA;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOP,WAAW,OAAAQ,KAAA,CAAAH,IAAA,GAAAI,IAAA,MAAAA,IAAA,GAAAJ,IAAA,EAAAI,IAAA;IAAXT,WAAW,CAAAS,IAAA,IAAAH,SAAA,CAAAG,IAAA;EAAA;EAAA,OAC7CT,WAAW,CAACU,IAAI,CAACd,aAAa,CAAC;AAAA;AAACO,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAE3B,IAAMO,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAA;EAAA,SAAAC,KAAA,GAAAN,SAAA,CAAAC,MAAA,EAAOP,WAAW,OAAAQ,KAAA,CAAAI,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;IAAXb,WAAW,CAAAa,KAAA,IAAAP,SAAA,CAAAO,KAAA;EAAA;EAAA,OAC9Cb,WAAW,CAACc,KAAK,CAAClB,aAAa,CAAC;AAAA;AAACO,OAAA,CAAAQ,iBAAA,GAAAA,iBAAA"}