MCPcopy
hub / github.com/webpack/webpack / _ifTwoCodePointsAreValidEscape

Function _ifTwoCodePointsAreValidEscape

lib/css/syntax.js:408–414  ·  view source on GitHub ↗
(input, pos, f, s)

Source from the content-addressed store, hash-verified

406 * @returns {boolean} true, if the two code points form a valid escape
407 */
408const _ifTwoCodePointsAreValidEscape = (input, pos, f, s) => {
409 const first = f || input.charCodeAt(pos - 1);
410 const second = s || input.charCodeAt(pos);
411 if (first !== CC_REVERSE_SOLIDUS) return false;
412 if (_isNewline(second)) return false;
413 return true;
414};
415
416/**
417 * Spec: "three code points would start an ident sequence".

Callers 6

consumeAStringTokenFunction · 0.85
consumeNumberSignFunction · 0.85
consumeAUrlTokenFunction · 0.85
consumeReverseSolidusFunction · 0.85

Calls 1

_isNewlineFunction · 0.85

Tested by

no test coverage detected