mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Refactor out Setting.getArrayItem()
This commit is contained in:
@ -448,3 +448,8 @@ export function maskEmail(email) {
|
||||
|
||||
return `${username}@${domainTokens.join(".")}`;
|
||||
}
|
||||
|
||||
export function getArrayItem(array, key, value) {
|
||||
const res = array.filter(item => item[key] === value)[0];
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user