Exo Composition: how to enhance an exo object with additional capabilities / methods? #9035
Answered
by
dckc
0xpatrickdev
asked this question in
Q&A
-
There is a JS convention where a const burger = { bread: true, tomato: true, patty: true };
const withCheese = foo => ({ ...foo, cheese: true });
const cheeseburger = withCheese(burger); If I want to do the same with Edit, keywords for search: mixin, higher order function, compose, composition |
Beta Was this translation helpful? Give feedback.
Answered by
dckc
Mar 5, 2024
Replies: 1 comment
-
briefly: use prepareGuardedAttenuator, which includes:
By way of example, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
0xpatrickdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
briefly: use prepareGuardedAttenuator, which includes:
By way of example,
myAddressNameAdmin
adds aprovideChild
method to enhance the normalnameAdmin
fromprepareNameHubKit
.agoric-sdk/packages/vats/src/vat-provisioning.js
Line 20 in c5284e4