UNPKG

@mnpjs/package

Version:

A package structure for mnp.

34 lines (29 loc) 900 B
const { debuglog } = require('util'); const LOG = debuglog('my-new-package') /** * {{ description }} * @param {_my-new-package.Config} [config] Options for the program. * @param {boolean} [config.shouldRun=true] A boolean option. Default `true`. * @param {string} config.text A text to return. */ async function myNewPackage(config = {}) { const { shouldRun = true, text, } = config if (!shouldRun) return LOG('my-new-package called with %s', text) return text } /* documentary types/index.xml */ /** * @suppress {nonStandardJsDocs} * @typedef {_my-new-package.Config} Config Options for the program. */ /** * @suppress {nonStandardJsDocs} * @typedef {Object} _my-new-package.Config Options for the program. * @prop {boolean} [shouldRun=true] A boolean option. Default `true`. * @prop {string} text A text to return. */ module.exports = myNewPackage