mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Rework to level up once at a time
This commit is contained in:
parent
37b8c9bd37
commit
43444dfd42
16 changed files with 653 additions and 739 deletions
|
|
@ -205,3 +205,21 @@ export const tagifyElement = (element, options, onChange, tagifyOptions = {}) =>
|
|||
};
|
||||
tagifyElement.on('change', onSelect);
|
||||
};
|
||||
|
||||
export const getDeleteKeys = (property, innerProperty, innerPropertyDefaultValue) => {
|
||||
return Object.keys(property).reduce((acc, key) => {
|
||||
if (innerProperty) {
|
||||
if (innerPropertyDefaultValue !== undefined) {
|
||||
acc[`${key}`] = {
|
||||
[innerProperty]: innerPropertyDefaultValue
|
||||
};
|
||||
} else {
|
||||
acc[`${key}.-=${innerProperty}`] = null;
|
||||
}
|
||||
} else {
|
||||
acc[`-=${key}`] = null;
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue