mirror of
https://gitee.com/dgflash/oops-plugin-excel-to-json.git
synced 2026-06-23 16:53:37 +08:00
20 lines
335 B
JavaScript
20 lines
335 B
JavaScript
class DataValidations {
|
|
constructor(model) {
|
|
this.model = model || {};
|
|
}
|
|
|
|
add(address, validation) {
|
|
return (this.model[address] = validation);
|
|
}
|
|
|
|
find(address) {
|
|
return this.model[address];
|
|
}
|
|
|
|
remove(address) {
|
|
this.model[address] = undefined;
|
|
}
|
|
}
|
|
|
|
module.exports = DataValidations;
|