<commit_before>'use strict';

var R = require('ramda');

module.exports = function or (left, right, options) {
  if (arguments.length < 3) {
    throw new Error('The "or" helper needs two arguments.');
  }
  return R.or(left, right) ?
    options.fn(this) : options.inverse(this);
}<commit_msg>Add comment docs for "or" helper<commit_after>'use strict';

var R = require('ramda');

/**
 * Output a block (or its inverse) based on whether or not either of the suppied
 * arguments are truthy.
 *
 * @since v0.0.1
 * @param {*} left
 * @param {*} right
 * @param {Object} options
 * @throws {Error} An error is thrown when the `right` argument is missing.
 * @return {String}
 * @example
 *
 *  var a = true;
 *  var b = 1;
 *  var c = false;
 *  var d = 0;
 *
 *  {{#or a c}}✔︎{{else}}✘{{/or}} //=> ✔︎
 *  {{#or b c}}✔︎{{else}}✘{{/or}} //=> ✔︎
 *  {{#or c d}}✔︎{{else}}✘{{/or}} //=> ✘
 */

module.exports = function or (left, right, options) {
  if (arguments.length < 3) {
    throw new Error('The "or" helper needs two arguments.');
  }
  return R.or(left, right) ?
    options.fn(this) : options.inverse(this);
}
{'fraction_non_alphanumeric': 0.2001795332136445, 'fraction_numerical': 0.0062836624775583485, 'mean_word_length': 3.305019305019305, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3561949', 'n_tokens_mistral': 417, 'n_tokens_neox': 428, 'n_words': 125}