1 var isSpace = require('./isSpace');
4 * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace
5 * character of `string`.
8 * @param {string} string The string to inspect.
9 * @returns {number} Returns the index of the first non-whitespace character.
11 function trimmedLeftIndex(string) {
13 length = string.length;
15 while (++index < length && isSpace(string.charCodeAt(index))) {}
19 module.exports = trimmedLeftIndex;