@brave-js/inscriber
A Simple Javascript Class which is carved out with some features to offer the property bindings for the instances

Design
@brave-js/inscriber
distinct javascript class
API
The scope of the API works only within the current object / instance of the class
compute
Enables the usage of computed property within the current object / instance of the class
Parameters
-
name
name of the computed property
-
properties
array of properties that exists in the current object
-
method
callback function which to calculate the value of the computed property
Usage
import Inscriber from '@brave-js/inscriber';
class Person extends Inscriber {
constructor(obj) {
super();
this.firstName = obj.firstName;
this.lastName = obj.lastName;
return this;
}
}
var person = new Person({
firstName: 'John',
lastName: 'Doe'
});
person.compute('fullName', ['firstName', 'lastName'], function() {
return `${this.firstName} ${this.lastName}`;
});
person.fullName
person.firstName = 'Mr';
person.lastName = 'Rob';
person.fullName