PHP 8.2.30
Preview: trimLeft.js Size: 1.05 KB
/opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/cli-table2/node_modules/lodash/string/trimLeft.js

var baseToString = require('../internal/baseToString'),
    charsLeftIndex = require('../internal/charsLeftIndex'),
    isIterateeCall = require('../internal/isIterateeCall'),
    trimmedLeftIndex = require('../internal/trimmedLeftIndex');

/**
 * Removes leading whitespace or specified characters from `string`.
 *
 * @static
 * @memberOf _
 * @category String
 * @param {string} [string=''] The string to trim.
 * @param {string} [chars=whitespace] The characters to trim.
 * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
 * @returns {string} Returns the trimmed string.
 * @example
 *
 * _.trimLeft('  abc  ');
 * // => 'abc  '
 *
 * _.trimLeft('-_-abc-_-', '_-');
 * // => 'abc-_-'
 */
function trimLeft(string, chars, guard) {
  var value = string;
  string = baseToString(string);
  if (!string) {
    return string;
  }
  if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
    return string.slice(trimmedLeftIndex(string));
  }
  return string.slice(charsLeftIndex(string, (chars + '')));
}

module.exports = trimLeft;

Directory Contents

Dirs: 0 × Files: 23

Name Size Perms Modified Actions
680 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
494 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.06 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.05 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.84 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.11 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
649 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.28 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
654 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
664 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.50 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.07 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
626 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
690 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
974 B lrw-r--r-- 2021-09-28 11:28:35
Edit Download
8.89 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.36 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.32 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.05 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.08 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
3.18 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.06 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download
1.16 KB lrw-r--r-- 2021-09-28 11:28:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).