UNPKG

@ptkdev/node-module-boilerplate

Version:

Create your npm library with this user friendly boilerplate. Use this respository as template for your new node library/module

40 lines 958 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.m = void 0; /** * Hello World * ===================== * * Print hello-world * * @interface [ModuleInterface ModuleResponseInterface](https://github.com/ptkdev-boilerplate/node-module-boilerplate/blob/main/app/types/module.interfaces.ts) * * @param {string} {text} - input string * * @return {Promise<ModuleResponseInterface>} (async) app() function that return string * * @example * 1. In your node project run: `npm install @ptkdev/node-module-boilerplate@latest --save` * 2. Usage (async): * * ```typescript * import m from "@ptkdev/node-module-boilerplate"; * * (async () => { * const { app } = await m({ text: "hello-world" }); * * console.log(app()); * })(); * * ``` * */ const m = async ({ text }) => { const app = () => text; return { app, }; }; exports.m = m; exports.default = m; //# sourceMappingURL=module.js.map