Sha256: 859308ae1a10554879615b0bf2e429e464b92bfa3510943705209afa6ab78047

Contents?: true

Size: 516 Bytes

Versions: 167

Compression:

Stored size: 516 Bytes

Contents

/**
 * Used by `_.trim` and `_.trimRight` to get the index of the last character
 * of `string` that is not found in `chars`.
 *
 * @private
 * @param {string} string The string to inspect.
 * @param {string} chars The characters to find.
 * @returns {number} Returns the index of the last character not found in `chars`.
 */
function charsRightIndex(string, chars) {
  var index = string.length;

  while (index-- && chars.indexOf(string.charAt(index)) > -1) {}
  return index;
}

module.exports = charsRightIndex;

Version data entries

167 entries across 87 versions & 9 rubygems

Version Path
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/charsRightIndex.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/charsRightIndex.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/charsRightIndex.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/charsRightIndex.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/charsRightIndex.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/charsRightIndex.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/charsRightIndex.js