ambilight
Version:
An API library for Node.js that interacts with a Philips Ambilight TV.
21 lines (16 loc) • 468 B
JavaScript
;
var Trait = require("traits").Trait,
ApiError = require("node-hue-api/hue-api/errors").ApiError;
module.exports = function (fn) {
if (!fn) {
throw new ApiError("A post processing function must be provided");
}
if (typeof fn !== "function") {
throw new ApiError("The post processing function must be a function; " + typeof fn );
}
return Trait(
{
"postProcessingFn" : fn
}
);
};