@mnpjs/package
Version:
A package structure for mnp.
32 lines (28 loc) • 863 B
JavaScript
import { debuglog } from '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.
*/
export default 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.
*/