Skip to content

Commit

Permalink
add missing src/entitlement.mjs from template
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jun 20, 2024
1 parent e51605b commit d6fefb8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/entitlement.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @param {string|Object} data
*/
export class Entitlement {
constructor(data) {
if (typeof data === "string") {
Object.defineProperties(this, { name: { value: data } });
} else {
Object.assign(this, data);
}

this.id = this.name;
}

get name() {
return Array.isArray(this.cn) ? this.cn[0] : this.cn;
}

get displayName() {
return this.name;
}
}

0 comments on commit d6fefb8

Please sign in to comment.