summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/strings/strpbrk.js.map
blob: 13e6be04ee0f4b2bdf1a7a0efde17fc04aaaf0c5 (plain) (blame)
1
{"version":3,"sources":["../../../src/php/strings/strpbrk.js"],"names":["module","exports","strpbrk","haystack","charList","i","len","length","indexOf","charAt","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAkBC,QAAlB,EAA4BC,QAA5B,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAK,IAAIC,IAAI,CAAR,EAAWC,MAAMH,SAASI,MAA/B,EAAuCF,IAAIC,GAA3C,EAAgD,EAAED,CAAlD,EAAqD;AACnD,QAAID,SAASI,OAAT,CAAiBL,SAASM,MAAT,CAAgBJ,CAAhB,CAAjB,KAAwC,CAA5C,EAA+C;AAC7C,aAAOF,SAASO,KAAT,CAAeL,CAAf,CAAP;AACD;AACF;AACD,SAAO,KAAP;AACD,CAfD","file":"strpbrk.js","sourcesContent":["module.exports = function strpbrk (haystack, charList) {\n  //  discuss at: http://locutus.io/php/strpbrk/\n  // original by: Alfonso Jimenez (http://www.alfonsojimenez.com)\n  // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n  //  revised by: Christoph\n  // improved by: Brett Zamir (http://brett-zamir.me)\n  //   example 1: strpbrk('This is a Simple text.', 'is')\n  //   returns 1: 'is is a Simple text.'\n\n  for (var i = 0, len = haystack.length; i < len; ++i) {\n    if (charList.indexOf(haystack.charAt(i)) >= 0) {\n      return haystack.slice(i)\n    }\n  }\n  return false\n}\n"]}