You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
414 B
JavaScript
12 lines
414 B
JavaScript
"use strict";
|
|
|
|
module.exports = function (operations) {
|
|
return function wrapWithOperation(name) {
|
|
return function wrap(value) {
|
|
// NOTE: It is important that we only do this lookup at wrapping time! Otherwise we don't have a guarantee that all the operation modules have been fully initialized yet, due to potential cyclical references or out-of-order loading.
|
|
return operations[name](value);
|
|
};
|
|
};
|
|
}
|
|
|