MCPcopy
hub / github.com/Exrick/xpay / captureSegment

Function captureSegment

xpay-code/src/main/resources/static/swagger/swagger-ui.js:11309–11331  ·  view source on GitHub ↗
(state, start, end, checkJson)

Source from the content-addressed store, hash-verified

11307
11308
11309function captureSegment(state, start, end, checkJson) {
11310 var _position, _length, _character, _result;
11311
11312 if (start < end) {
11313 _result = state.input.slice(start, end);
11314
11315 if (checkJson) {
11316 for (_position = 0, _length = _result.length;
11317 _position < _length;
11318 _position += 1) {
11319 _character = _result.charCodeAt(_position);
11320 if (!(_character === 0x09 ||
11321 (0x20 <= _character && _character <= 0x10FFFF))) {
11322 throwError(state, 'expected valid JSON character');
11323 }
11324 }
11325 } else if (PATTERN_NON_PRINTABLE.test(_result)) {
11326 throwError(state, 'the stream contains non-printable characters');
11327 }
11328
11329 state.result += _result;
11330 }
11331}
11332
11333function mergeMappings(state, destination, source, overridableKeys) {
11334 var sourceKeys, key, index, quantity;

Callers 4

readPlainScalarFunction · 0.85
readSingleQuotedScalarFunction · 0.85
readDoubleQuotedScalarFunction · 0.85
readBlockScalarFunction · 0.85

Calls 1

throwErrorFunction · 0.85

Tested by

no test coverage detected