MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / beginsWith

Function beginsWith

web/static/bower_components/angular/angular.js:11393–11397  ·  view source on GitHub ↗

* * @param {string} begin * @param {string} whole * @returns {string} returns text from whole after begin or undefined if it does not begin with * expected string.

(begin, whole)

Source from the content-addressed store, hash-verified

11391 * expected string.
11392 */
11393function beginsWith(begin, whole) {
11394 if (whole.indexOf(begin) === 0) {
11395 return whole.substr(begin.length);
11396 }
11397}
11398
11399
11400function stripHash(url) {

Callers 4

LocationHtml5UrlFunction · 0.85
LocationHashbangUrlFunction · 0.85
$LocationProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected