Sha256: 1e046118d2c0a003fd1c23611fbcd15b440c1ec32159ea7cf3b43963019a831e

Contents?: true

Size: 789 Bytes

Versions: 14

Compression:

Stored size: 789 Bytes

Contents

/**
 * The base implementation of `compareAscending` which compares values and
 * sorts them in ascending order without guaranteeing a stable sort.
 *
 * @private
 * @param {*} value The value to compare to `other`.
 * @param {*} other The value to compare to `value`.
 * @returns {number} Returns the sort order indicator for `value`.
 */
function baseCompareAscending(value, other) {
  if (value !== other) {
    var valIsReflexive = value === value,
        othIsReflexive = other === other;

    if (value > other || !valIsReflexive || (typeof value == 'undefined' && othIsReflexive)) {
      return 1;
    }
    if (value < other || !othIsReflexive || (typeof other == 'undefined' && valIsReflexive)) {
      return -1;
    }
  }
  return 0;
}

module.exports = baseCompareAscending;

Version data entries

14 entries across 7 versions & 1 rubygems

Version Path
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/baseCompareAscending.js