|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
296 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var $strSlice = require('call-bound')('String.prototype.slice');
|
|---|
| 4 |
|
|---|
| 5 | module.exports = function isPrefixOf(prefix, string) {
|
|---|
| 6 | if (prefix === string) {
|
|---|
| 7 | return true;
|
|---|
| 8 | }
|
|---|
| 9 | if (prefix.length > string.length) {
|
|---|
| 10 | return false;
|
|---|
| 11 | }
|
|---|
| 12 | return $strSlice(string, 0, prefix.length) === prefix;
|
|---|
| 13 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.