Skip to content

ruslan-trufanov/computed-properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple realization of computed properties in objects

Special property in object computed wich recalculate its own value only if its dependency(ies) field(s) changed

Example

const computedObject = _withComputed({
    firstName: 'John',
    lastName: 'Doe',

    computed: {
      fullName: (obj) => `${obj.firstName} ${obj.lastName}` // John Doe
    }
  });

License

MIT

About

Simple realization of computed properties in objects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published