Changeset View
Changeset View
Standalone View
Standalone View
lib/chip-types/field-type.js
"use strict"; | |||||
const locreq = require("locreq")(__dirname); | |||||
const Promise = require("bluebird"); | const Promise = require("bluebird"); | ||||
const Errors = locreq("lib/response/error.js"); | |||||
const default_methods = require("./field-type-default-methods.js"); | const default_methods = require("./field-type-default-methods.js"); | ||||
function wrap_method_in_promise(context, declaration, method_name) { | function wrap_method_in_promise(context, declaration, method_name) { | ||||
return function() { | return function() { | ||||
return Promise.resolve( | return Promise.resolve( | ||||
declaration[method_name].apply(context, arguments) | declaration[method_name].apply(context, arguments) | ||||
); | ); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |