@opbi/ncm-preset-package
Version:
the config preset for [package] used by ncm
31 lines (25 loc) • 685 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.allStrings = exports.join = void 0;
/**
* Join two strings with a space.
*
* @param {string} a - The first param.
* @param {string} b - The second param.
* @returns {string} - The result.
*/
const join = (a, b) => `${a} ${b}`;
/**
* An example function to show JSDoc works with object destruction in function params.
*
* @typedef {import('./decorator')} Validator
*/
exports.join = join;
const allStrings = (...args) => {
const argTypes = args.map(arg => typeof arg);
if (argTypes.some(type => type !== 'string')) return false;
return true;
};
exports.allStrings = allStrings;