UNPKG

@nguyennhuy/zalo-api

Version:

Unofficial Zalo API for JavaScript

16 lines (15 loc) 473 B
import {} from "../context.js"; import { apiFactory } from "../utils.js"; /* eslint-disable */ export const customFactory = apiFactory()((api, ctx, utils) => { return function custom(name, callback) { Object.defineProperty(api, name, { value: function (props) { return callback({ ctx, utils, props }); }, writable: false, enumerable: false, configurable: false, }); }; });