import { FaunaRoleOptions } from '~/types/fauna' ; import { CONVENTION } from '~/consts' ; export function BiotaRoleName ( name ) { return `${ CONVENTION . ROLE_PREFIX }${ name . replace ( CONVENTION . ROLE_PREFIX , '' ) }` ; } export function Role ( role ) { let { name , membership , privileges } = role || { } ; let self = { name , membership , privileges : privileges || [ ] , } ; return self ; }