Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 827 Bytes

CONTRIBUTING.md

File metadata and controls

59 lines (46 loc) · 827 Bytes

How to contribute?

Exports

Only modules correctly documented will be made available to the public.

src/inc.js:

/** @namespace / */

/**
 * @public
 * @function inc
 */
module.exports = inc;

src/utils.js:

/** @namespace /helpers/types */

/**
 * @public
 * @function is_string
 * @param {*} x
 * @return {boolean}
 */
const is_string = x => typeof x === 'string';

/**
 * @public
 * @function is_number
 * @param {*} x
 * @return {boolean}
 */
const is_number = x => typeof x === 'number';

module.exports = {
  is_number,
  is_string
};

will generate the following in dist/index.js:

module.exports {
  inc: require('./inc.js'),
  helpers: {
    types: {
      is_string: require('./utils').is_string,
      is_number: require('./utils').is_number
    }
  }
};