repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/isSafeInteger.js
aws/lti-middleware/node_modules/lodash/fp/isSafeInteger.js
var convert = require('./convert'), func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/partialRight.js
aws/lti-middleware/node_modules/lodash/fp/partialRight.js
var convert = require('./convert'), func = convert('partialRight', require('../partialRight')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/sortedIndex.js
aws/lti-middleware/node_modules/lodash/fp/sortedIndex.js
var convert = require('./convert'), func = convert('sortedIndex', require('../sortedIndex')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/take.js
aws/lti-middleware/node_modules/lodash/fp/take.js
var convert = require('./convert'), func = convert('take', require('../take')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/groupBy.js
aws/lti-middleware/node_modules/lodash/fp/groupBy.js
var convert = require('./convert'), func = convert('groupBy', require('../groupBy')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/padStart.js
aws/lti-middleware/node_modules/lodash/fp/padStart.js
var convert = require('./convert'), func = convert('padStart', require('../padStart')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/paths.js
aws/lti-middleware/node_modules/lodash/fp/paths.js
module.exports = require('./at');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/takeRight.js
aws/lti-middleware/node_modules/lodash/fp/takeRight.js
var convert = require('./convert'), func = convert('takeRight', require('../takeRight')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/parseInt.js
aws/lti-middleware/node_modules/lodash/fp/parseInt.js
var convert = require('./convert'), func = convert('parseInt', require('../parseInt')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/init.js
aws/lti-middleware/node_modules/lodash/fp/init.js
module.exports = require('./initial');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/truncate.js
aws/lti-middleware/node_modules/lodash/fp/truncate.js
var convert = require('./convert'), func = convert('truncate', require('../truncate')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/ary.js
aws/lti-middleware/node_modules/lodash/fp/ary.js
var convert = require('./convert'), func = convert('ary', require('../ary')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/convert.js
aws/lti-middleware/node_modules/lodash/fp/convert.js
var baseConvert = require('./_baseConvert'), util = require('./_util'); /** * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last * version with conversion `options` applied. If `name` is an object its methods * will be converted. * * @param {string} name The name of the function to wrap. * @param {Function} [func] The function to wrap. * @param {Object} [options] The options object. See `baseConvert` for more details. * @returns {Function|Object} Returns the converted function or object. */ function convert(name, func, options) { return baseConvert(util, name, func, options); } module.exports = convert;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/findLastKey.js
aws/lti-middleware/node_modules/lodash/fp/findLastKey.js
var convert = require('./convert'), func = convert('findLastKey', require('../findLastKey')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/findIndex.js
aws/lti-middleware/node_modules/lodash/fp/findIndex.js
var convert = require('./convert'), func = convert('findIndex', require('../findIndex')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/spread.js
aws/lti-middleware/node_modules/lodash/fp/spread.js
var convert = require('./convert'), func = convert('spread', require('../spread')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/placeholder.js
aws/lti-middleware/node_modules/lodash/fp/placeholder.js
/** * The default argument placeholder value for methods. * * @type {Object} */ module.exports = {};
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/entriesIn.js
aws/lti-middleware/node_modules/lodash/fp/entriesIn.js
module.exports = require('./toPairsIn');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/_util.js
aws/lti-middleware/node_modules/lodash/fp/_util.js
module.exports = { 'ary': require('../ary'), 'assign': require('../_baseAssign'), 'clone': require('../clone'), 'curry': require('../curry'), 'forEach': require('../_arrayEach'), 'isArray': require('../isArray'), 'isError': require('../isError'), 'isFunction': require('../isFunction'), 'isWeakMap': require('../isWeakMap'), 'iteratee': require('../iteratee'), 'keys': require('../_baseKeys'), 'rearg': require('../rearg'), 'toInteger': require('../toInteger'), 'toPath': require('../toPath') };
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/isElement.js
aws/lti-middleware/node_modules/lodash/fp/isElement.js
var convert = require('./convert'), func = convert('isElement', require('../isElement'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/wrapperValue.js
aws/lti-middleware/node_modules/lodash/fp/wrapperValue.js
var convert = require('./convert'), func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/replace.js
aws/lti-middleware/node_modules/lodash/fp/replace.js
var convert = require('./convert'), func = convert('replace', require('../replace')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/includes.js
aws/lti-middleware/node_modules/lodash/fp/includes.js
var convert = require('./convert'), func = convert('includes', require('../includes')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/findIndexFrom.js
aws/lti-middleware/node_modules/lodash/fp/findIndexFrom.js
var convert = require('./convert'), func = convert('findIndexFrom', require('../findIndex')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/isTypedArray.js
aws/lti-middleware/node_modules/lodash/fp/isTypedArray.js
var convert = require('./convert'), func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/invokeArgsMap.js
aws/lti-middleware/node_modules/lodash/fp/invokeArgsMap.js
var convert = require('./convert'), func = convert('invokeArgsMap', require('../invokeMap')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/xorBy.js
aws/lti-middleware/node_modules/lodash/fp/xorBy.js
var convert = require('./convert'), func = convert('xorBy', require('../xorBy')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/util.js
aws/lti-middleware/node_modules/lodash/fp/util.js
var convert = require('./convert'); module.exports = convert(require('../util'));
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/first.js
aws/lti-middleware/node_modules/lodash/fp/first.js
module.exports = require('./head');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/zipObj.js
aws/lti-middleware/node_modules/lodash/fp/zipObj.js
module.exports = require('./zipObject');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/apply.js
aws/lti-middleware/node_modules/lodash/fp/apply.js
module.exports = require('./spread');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/toUpper.js
aws/lti-middleware/node_modules/lodash/fp/toUpper.js
var convert = require('./convert'), func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/functions.js
aws/lti-middleware/node_modules/lodash/fp/functions.js
var convert = require('./convert'), func = convert('functions', require('../functions'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/shuffle.js
aws/lti-middleware/node_modules/lodash/fp/shuffle.js
var convert = require('./convert'), func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/values.js
aws/lti-middleware/node_modules/lodash/fp/values.js
var convert = require('./convert'), func = convert('values', require('../values'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/assignIn.js
aws/lti-middleware/node_modules/lodash/fp/assignIn.js
var convert = require('./convert'), func = convert('assignIn', require('../assignIn')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/_convertBrowser.js
aws/lti-middleware/node_modules/lodash/fp/_convertBrowser.js
var baseConvert = require('./_baseConvert'); /** * Converts `lodash` to an immutable auto-curried iteratee-first data-last * version with conversion `options` applied. * * @param {Function} lodash The lodash function to convert. * @param {Object} [options] The options object. See `baseConvert` for more details. * @returns {Function} Returns the converted `lodash`. */ function browserConvert(lodash, options) { return baseConvert(lodash, lodash, options); } if (typeof _ == 'function' && typeof _.runInContext == 'function') { _ = browserConvert(_.runInContext()); } module.exports = browserConvert;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/concat.js
aws/lti-middleware/node_modules/lodash/fp/concat.js
var convert = require('./convert'), func = convert('concat', require('../concat')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/toPairsIn.js
aws/lti-middleware/node_modules/lodash/fp/toPairsIn.js
var convert = require('./convert'), func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/before.js
aws/lti-middleware/node_modules/lodash/fp/before.js
var convert = require('./convert'), func = convert('before', require('../before')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/camelCase.js
aws/lti-middleware/node_modules/lodash/fp/camelCase.js
var convert = require('./convert'), func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/snakeCase.js
aws/lti-middleware/node_modules/lodash/fp/snakeCase.js
var convert = require('./convert'), func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/isEqualWith.js
aws/lti-middleware/node_modules/lodash/fp/isEqualWith.js
var convert = require('./convert'), func = convert('isEqualWith', require('../isEqualWith')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/random.js
aws/lti-middleware/node_modules/lodash/fp/random.js
var convert = require('./convert'), func = convert('random', require('../random')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/flatten.js
aws/lti-middleware/node_modules/lodash/fp/flatten.js
var convert = require('./convert'), func = convert('flatten', require('../flatten'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/cloneDeep.js
aws/lti-middleware/node_modules/lodash/fp/cloneDeep.js
var convert = require('./convert'), func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/spreadFrom.js
aws/lti-middleware/node_modules/lodash/fp/spreadFrom.js
var convert = require('./convert'), func = convert('spreadFrom', require('../spread')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/isEmpty.js
aws/lti-middleware/node_modules/lodash/fp/isEmpty.js
var convert = require('./convert'), func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/dropRight.js
aws/lti-middleware/node_modules/lodash/fp/dropRight.js
var convert = require('./convert'), func = convert('dropRight', require('../dropRight')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/sum.js
aws/lti-middleware/node_modules/lodash/fp/sum.js
var convert = require('./convert'), func = convert('sum', require('../sum'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/partition.js
aws/lti-middleware/node_modules/lodash/fp/partition.js
var convert = require('./convert'), func = convert('partition', require('../partition')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/invert.js
aws/lti-middleware/node_modules/lodash/fp/invert.js
var convert = require('./convert'), func = convert('invert', require('../invert')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/sortedUniqBy.js
aws/lti-middleware/node_modules/lodash/fp/sortedUniqBy.js
var convert = require('./convert'), func = convert('sortedUniqBy', require('../sortedUniqBy')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/add.js
aws/lti-middleware/node_modules/lodash/fp/add.js
var convert = require('./convert'), func = convert('add', require('../add')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/unapply.js
aws/lti-middleware/node_modules/lodash/fp/unapply.js
module.exports = require('./rest');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/contains.js
aws/lti-middleware/node_modules/lodash/fp/contains.js
module.exports = require('./includes');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/__.js
aws/lti-middleware/node_modules/lodash/fp/__.js
module.exports = require('./placeholder');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/bind.js
aws/lti-middleware/node_modules/lodash/fp/bind.js
var convert = require('./convert'), func = convert('bind', require('../bind')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/split.js
aws/lti-middleware/node_modules/lodash/fp/split.js
var convert = require('./convert'), func = convert('split', require('../split')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/findFrom.js
aws/lti-middleware/node_modules/lodash/fp/findFrom.js
var convert = require('./convert'), func = convert('findFrom', require('../find')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/zipWith.js
aws/lti-middleware/node_modules/lodash/fp/zipWith.js
var convert = require('./convert'), func = convert('zipWith', require('../zipWith')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/escapeRegExp.js
aws/lti-middleware/node_modules/lodash/fp/escapeRegExp.js
var convert = require('./convert'), func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/takeLastWhile.js
aws/lti-middleware/node_modules/lodash/fp/takeLastWhile.js
module.exports = require('./takeRightWhile');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/slice.js
aws/lti-middleware/node_modules/lodash/fp/slice.js
var convert = require('./convert'), func = convert('slice', require('../slice')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/seq.js
aws/lti-middleware/node_modules/lodash/fp/seq.js
var convert = require('./convert'); module.exports = convert(require('../seq'));
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/overEvery.js
aws/lti-middleware/node_modules/lodash/fp/overEvery.js
var convert = require('./convert'), func = convert('overEvery', require('../overEvery')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/pull.js
aws/lti-middleware/node_modules/lodash/fp/pull.js
var convert = require('./convert'), func = convert('pull', require('../pull')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/assignWith.js
aws/lti-middleware/node_modules/lodash/fp/assignWith.js
var convert = require('./convert'), func = convert('assignWith', require('../assignWith')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/trimChars.js
aws/lti-middleware/node_modules/lodash/fp/trimChars.js
var convert = require('./convert'), func = convert('trimChars', require('../trim')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/sortedLastIndexBy.js
aws/lti-middleware/node_modules/lodash/fp/sortedLastIndexBy.js
var convert = require('./convert'), func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/isNil.js
aws/lti-middleware/node_modules/lodash/fp/isNil.js
var convert = require('./convert'), func = convert('isNil', require('../isNil'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/curryRightN.js
aws/lti-middleware/node_modules/lodash/fp/curryRightN.js
var convert = require('./convert'), func = convert('curryRightN', require('../curryRight')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/path.js
aws/lti-middleware/node_modules/lodash/fp/path.js
module.exports = require('./get');
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/flip.js
aws/lti-middleware/node_modules/lodash/fp/flip.js
var convert = require('./convert'), func = convert('flip', require('../flip'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/capitalize.js
aws/lti-middleware/node_modules/lodash/fp/capitalize.js
var convert = require('./convert'), func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/matchesProperty.js
aws/lti-middleware/node_modules/lodash/fp/matchesProperty.js
var convert = require('./convert'), func = convert('matchesProperty', require('../matchesProperty')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/curryN.js
aws/lti-middleware/node_modules/lodash/fp/curryN.js
var convert = require('./convert'), func = convert('curryN', require('../curry')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/transform.js
aws/lti-middleware/node_modules/lodash/fp/transform.js
var convert = require('./convert'), func = convert('transform', require('../transform')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash/fp/get.js
aws/lti-middleware/node_modules/lodash/fp/get.js
var convert = require('./convert'), func = convert('get', require('../get')); func.placeholder = require('./placeholder'); module.exports = func;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js
aws/lti-middleware/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js
/** * Copyright Brian White. All rights reserved. * * @see https://github.com/mscdex/streamsearch * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. * * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool */ const EventEmitter = require('events').EventEmitter const inherits = require('util').inherits function SBMH (needle) { if (typeof needle === 'string') { needle = Buffer.from(needle) } if (!Buffer.isBuffer(needle)) { throw new TypeError('The needle has to be a String or a Buffer.') } const needleLength = needle.length if (needleLength === 0) { throw new Error('The needle cannot be an empty String/Buffer.') } if (needleLength > 256) { throw new Error('The needle cannot have a length bigger than 256.') } this.maxMatches = Infinity this.matches = 0 this._occ = new Array(256) .fill(needleLength) // Initialize occurrence table. this._lookbehind_size = 0 this._needle = needle this._bufpos = 0 this._lookbehind = Buffer.alloc(needleLength) // Populate occurrence table with analysis of the needle, // ignoring last letter. for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var this._occ[needle[i]] = needleLength - 1 - i } } inherits(SBMH, EventEmitter) SBMH.prototype.reset = function () { this._lookbehind_size = 0 this.matches = 0 this._bufpos = 0 } SBMH.prototype.push = function (chunk, pos) { if (!Buffer.isBuffer(chunk)) { chunk = Buffer.from(chunk, 'binary') } const chlen = chunk.length this._bufpos = pos || 0 let r while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } return r } SBMH.prototype._sbmh_feed = function (data) { const len = data.length const needle = this._needle const needleLength = needle.length const lastNeedleChar = needle[needleLength - 1] // Positive: points to a position in `data` // pos == 3 points to data[3] // Negative: points to a position in the lookbehind buffer // pos == -2 points to lookbehind[lookbehind_size - 2] let pos = -this._lookbehind_size let ch if (pos < 0) { // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool // search with character lookup code that considers both the // lookbehind buffer and the current round's haystack data. // // Loop until // there is a match. // or until // we've moved past the position that requires the // lookbehind buffer. In this case we switch to the // optimized loop. // or until // the character to look at lies outside the haystack. while (pos < 0 && pos <= len - needleLength) { ch = this._sbmh_lookup_char(data, pos + needleLength - 1) if ( ch === lastNeedleChar && this._sbmh_memcmp(data, pos, needleLength - 1) ) { this._lookbehind_size = 0 ++this.matches this.emit('info', true) return (this._bufpos = pos + needleLength) } pos += this._occ[ch] } // No match. if (pos < 0) { // There's too few data for Boyer-Moore-Horspool to run, // so let's use a different algorithm to skip as much as // we can. // Forward pos until // the trailing part of lookbehind + data // looks like the beginning of the needle // or until // pos == 0 while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } } if (pos >= 0) { // Discard lookbehind buffer. this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) this._lookbehind_size = 0 } else { // Cut off part of the lookbehind buffer that has // been processed and append the entire haystack // into it. const bytesToCutOff = this._lookbehind_size + pos if (bytesToCutOff > 0) { // The cut off data is guaranteed not to contain the needle. this.emit('info', false, this._lookbehind, 0, bytesToCutOff) } this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size - bytesToCutOff) this._lookbehind_size -= bytesToCutOff data.copy(this._lookbehind, this._lookbehind_size) this._lookbehind_size += len this._bufpos = len return len } } pos += (pos >= 0) * this._bufpos // Lookbehind buffer is now empty. We only need to check if the // needle is in the haystack. if (data.indexOf(needle, pos) !== -1) { pos = data.indexOf(needle, pos) ++this.matches if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } return (this._bufpos = pos + needleLength) } else { pos = len - needleLength } // There was no match. If there's trailing haystack data that we cannot // match yet using the Boyer-Moore-Horspool algorithm (because the trailing // data is less than the needle size) then match using a modified // algorithm that starts matching from the beginning instead of the end. // Whatever trailing data is left after running this algorithm is added to // the lookbehind buffer. while ( pos < len && ( data[pos] !== needle[0] || ( (Buffer.compare( data.subarray(pos, pos + len - pos), needle.subarray(0, len - pos) ) !== 0) ) ) ) { ++pos } if (pos < len) { data.copy(this._lookbehind, 0, pos, pos + (len - pos)) this._lookbehind_size = len - pos } // Everything until pos is guaranteed not to contain needle data. if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } this._bufpos = len return len } SBMH.prototype._sbmh_lookup_char = function (data, pos) { return (pos < 0) ? this._lookbehind[this._lookbehind_size + pos] : data[pos] } SBMH.prototype._sbmh_memcmp = function (data, pos, len) { for (var i = 0; i < len; ++i) { // eslint-disable-line no-var if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } } return true } module.exports = SBMH
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js
aws/lti-middleware/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js
const inherits = require('util').inherits const ReadableStream = require('stream').Readable function PartStream (opts) { ReadableStream.call(this, opts) } inherits(PartStream, ReadableStream) PartStream.prototype._read = function (n) {} module.exports = PartStream
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js
aws/lti-middleware/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js
const WritableStream = require('stream').Writable const inherits = require('util').inherits const StreamSearch = require('../../streamsearch/sbmh') const PartStream = require('./PartStream') const HeaderParser = require('./HeaderParser') const DASH = 45 const B_ONEDASH = Buffer.from('-') const B_CRLF = Buffer.from('\r\n') const EMPTY_FN = function () {} function Dicer (cfg) { if (!(this instanceof Dicer)) { return new Dicer(cfg) } WritableStream.call(this, cfg) if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } this._headerFirst = cfg.headerFirst this._dashes = 0 this._parts = 0 this._finished = false this._realFinish = false this._isPreamble = true this._justMatched = false this._firstWrite = true this._inHeader = true this._part = undefined this._cb = undefined this._ignoreData = false this._partOpts = { highWaterMark: cfg.partHwm } this._pause = false const self = this this._hparser = new HeaderParser(cfg) this._hparser.on('header', function (header) { self._inHeader = false self._part.emit('header', header) }) } inherits(Dicer, WritableStream) Dicer.prototype.emit = function (ev) { if (ev === 'finish' && !this._realFinish) { if (!this._finished) { const self = this process.nextTick(function () { self.emit('error', new Error('Unexpected end of multipart data')) if (self._part && !self._ignoreData) { const type = (self._isPreamble ? 'Preamble' : 'Part') self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) self._part.push(null) process.nextTick(function () { self._realFinish = true self.emit('finish') self._realFinish = false }) return } self._realFinish = true self.emit('finish') self._realFinish = false }) } } else { WritableStream.prototype.emit.apply(this, arguments) } } Dicer.prototype._write = function (data, encoding, cb) { // ignore unexpected data (e.g. extra trailer data after finished) if (!this._hparser && !this._bparser) { return cb() } if (this._headerFirst && this._isPreamble) { if (!this._part) { this._part = new PartStream(this._partOpts) if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } } const r = this._hparser.push(data) if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } } // allows for "easier" testing if (this._firstWrite) { this._bparser.push(B_CRLF) this._firstWrite = false } this._bparser.push(data) if (this._pause) { this._cb = cb } else { cb() } } Dicer.prototype.reset = function () { this._part = undefined this._bparser = undefined this._hparser = undefined } Dicer.prototype.setBoundary = function (boundary) { const self = this this._bparser = new StreamSearch('\r\n--' + boundary) this._bparser.on('info', function (isMatch, data, start, end) { self._oninfo(isMatch, data, start, end) }) } Dicer.prototype._ignore = function () { if (this._part && !this._ignoreData) { this._ignoreData = true this._part.on('error', EMPTY_FN) // we must perform some kind of read on the stream even though we are // ignoring the data, otherwise node's Readable stream will not emit 'end' // after pushing null to the stream this._part.resume() } } Dicer.prototype._oninfo = function (isMatch, data, start, end) { let buf; const self = this; let i = 0; let r; let shouldWriteMore = true if (!this._part && this._justMatched && data) { while (this._dashes < 2 && (start + i) < end) { if (data[start + i] === DASH) { ++i ++this._dashes } else { if (this._dashes) { buf = B_ONEDASH } this._dashes = 0 break } } if (this._dashes === 2) { if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } this.reset() this._finished = true // no more parts will be added if (self._parts === 0) { self._realFinish = true self.emit('finish') self._realFinish = false } } if (this._dashes) { return } } if (this._justMatched) { this._justMatched = false } if (!this._part) { this._part = new PartStream(this._partOpts) this._part._read = function (n) { self._unpause() } if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() } if (!this._isPreamble) { this._inHeader = true } } if (data && start < end && !this._ignoreData) { if (this._isPreamble || !this._inHeader) { if (buf) { shouldWriteMore = this._part.push(buf) } shouldWriteMore = this._part.push(data.slice(start, end)) if (!shouldWriteMore) { this._pause = true } } else if (!this._isPreamble && this._inHeader) { if (buf) { this._hparser.push(buf) } r = this._hparser.push(data.slice(start, end)) if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } } } if (isMatch) { this._hparser.reset() if (this._isPreamble) { this._isPreamble = false } else { if (start !== end) { ++this._parts this._part.on('end', function () { if (--self._parts === 0) { if (self._finished) { self._realFinish = true self.emit('finish') self._realFinish = false } else { self._unpause() } } }) } } this._part.push(null) this._part = undefined this._ignoreData = false this._justMatched = true this._dashes = 0 } } Dicer.prototype._unpause = function () { if (!this._pause) { return } this._pause = false if (this._cb) { const cb = this._cb this._cb = undefined cb() } } module.exports = Dicer
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js
aws/lti-middleware/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js
const EventEmitter = require('events').EventEmitter const inherits = require('util').inherits const getLimit = require('../../../lib/utils').getLimit const StreamSearch = require('../../streamsearch/sbmh') const B_DCRLF = Buffer.from('\r\n\r\n') const RE_CRLF = /\r\n/g const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex function HeaderParser (cfg) { EventEmitter.call(this) cfg = cfg || {} const self = this this.nread = 0 this.maxed = false this.npairs = 0 this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) this.buffer = '' this.header = {} this.finished = false this.ss = new StreamSearch(B_DCRLF) this.ss.on('info', function (isMatch, data, start, end) { if (data && !self.maxed) { if (self.nread + end - start >= self.maxHeaderSize) { end = self.maxHeaderSize - self.nread + start self.nread = self.maxHeaderSize self.maxed = true } else { self.nread += (end - start) } self.buffer += data.toString('binary', start, end) } if (isMatch) { self._finish() } }) } inherits(HeaderParser, EventEmitter) HeaderParser.prototype.push = function (data) { const r = this.ss.push(data) if (this.finished) { return r } } HeaderParser.prototype.reset = function () { this.finished = false this.buffer = '' this.header = {} this.ss.reset() } HeaderParser.prototype._finish = function () { if (this.buffer) { this._parseHeader() } this.ss.matches = this.ss.maxMatches const header = this.header this.header = {} this.buffer = '' this.finished = true this.nread = this.npairs = 0 this.maxed = false this.emit('header', header) } HeaderParser.prototype._parseHeader = function () { if (this.npairs === this.maxHeaderPairs) { return } const lines = this.buffer.split(RE_CRLF) const len = lines.length let m, h for (var i = 0; i < len; ++i) { // eslint-disable-line no-var if (lines[i].length === 0) { continue } if (lines[i][0] === '\t' || lines[i][0] === ' ') { // folded header content // RFC2822 says to just remove the CRLF and not the whitespace following // it, so we follow the RFC and include the leading whitespace ... if (h) { this.header[h][this.header[h].length - 1] += lines[i] continue } } const posColon = lines[i].indexOf(':') if ( posColon === -1 || posColon === 0 ) { return } m = RE_HDR.exec(lines[i]) h = m[1].toLowerCase() this.header[h] = this.header[h] || [] this.header[h].push((m[2] || '')) if (++this.npairs === this.maxHeaderPairs) { break } } } module.exports = HeaderParser
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/lib/main.js
aws/lti-middleware/node_modules/@fastify/busboy/lib/main.js
const WritableStream = require('stream').Writable const { inherits } = require('util') const Dicer = require('../deps/dicer/lib/Dicer') const MultipartParser = require('./types/multipart') const UrlencodedParser = require('./types/urlencoded') const parseParams = require('./utils').parseParams function Busboy (opts) { if (!(this instanceof Busboy)) { return new Busboy(opts) } if (typeof opts !== 'object') { throw new TypeError('Busboy expected an options-Object.') } if (typeof opts.headers !== 'object') { throw new TypeError('Busboy expected an options-Object with headers-attribute.') } if (typeof opts.headers['content-type'] !== 'string') { throw new TypeError('Missing Content-Type-header.') } const { headers, ...streamOptions } = opts this.opts = { autoDestroy: false, ...streamOptions } WritableStream.call(this, this.opts) this._done = false this._parser = this.getParserByHeaders(headers) this._finished = false } inherits(Busboy, WritableStream) Busboy.prototype.emit = function (ev) { if (ev === 'finish') { if (!this._done) { this._parser && this._parser.end() return } else if (this._finished) { return } this._finished = true } WritableStream.prototype.emit.apply(this, arguments) } Busboy.prototype.getParserByHeaders = function (headers) { const parsed = parseParams(headers['content-type']) const cfg = { defCharset: this.opts.defCharset, fileHwm: this.opts.fileHwm, headers, highWaterMark: this.opts.highWaterMark, isPartAFile: this.opts.isPartAFile, limits: this.opts.limits, parsedConType: parsed, preservePath: this.opts.preservePath } if (MultipartParser.detect.test(parsed[0])) { return new MultipartParser(this, cfg) } if (UrlencodedParser.detect.test(parsed[0])) { return new UrlencodedParser(this, cfg) } throw new Error('Unsupported Content-Type.') } Busboy.prototype._write = function (chunk, encoding, cb) { this._parser.write(chunk, cb) } module.exports = Busboy module.exports.default = Busboy module.exports.Busboy = Busboy module.exports.Dicer = Dicer
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/lib/utils.js
aws/lti-middleware/node_modules/@fastify/busboy/lib/utils.js
const { TextDecoder } = require('util') const { TextDecoder: PolyfillTextDecoder, getEncoding } = require('text-decoding') const RE_ENCODED = /%([a-fA-F0-9]{2})/g const RE_PLUS = /\+/g const HEX = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] // Node has always utf-8 const textDecoders = new Map() textDecoders.set('utf-8', new TextDecoder('utf-8')) textDecoders.set('utf8', textDecoders.get('utf-8')) function encodedReplacer (match, byte) { return String.fromCharCode(parseInt(byte, 16)) } function parseParams (str) { const res = [] let state = 'key' let charset = '' let inquote = false let escaping = false let p = 0 let tmp = '' for (var i = 0, len = str.length; i < len; ++i) { // eslint-disable-line no-var const char = str[i] if (char === '\\' && inquote) { if (escaping) { escaping = false } else { escaping = true continue } } else if (char === '"') { if (!escaping) { if (inquote) { inquote = false state = 'key' } else { inquote = true } continue } else { escaping = false } } else { if (escaping && inquote) { tmp += '\\' } escaping = false if ((state === 'charset' || state === 'lang') && char === "'") { if (state === 'charset') { state = 'lang' charset = tmp.substring(1) } else { state = 'value' } tmp = '' continue } else if (state === 'key' && (char === '*' || char === '=') && res.length) { if (char === '*') { state = 'charset' } else { state = 'value' } res[p] = [tmp, undefined] tmp = '' continue } else if (!inquote && char === ';') { state = 'key' if (charset) { if (tmp.length) { tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), 'binary', charset) } charset = '' } else if (tmp.length) { tmp = decodeText(tmp, 'binary', 'utf8') } if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } tmp = '' ++p continue } else if (!inquote && (char === ' ' || char === '\t')) { continue } } tmp += char } if (charset && tmp.length) { tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), 'binary', charset) } else if (tmp) { tmp = decodeText(tmp, 'binary', 'utf8') } if (res[p] === undefined) { if (tmp) { res[p] = tmp } } else { res[p][1] = tmp } return res } function decodeText (text, textEncoding, destEncoding) { if (text) { if (textDecoders.has(destEncoding)) { try { return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) } catch (e) { } } else { try { textDecoders.set(destEncoding, new TextDecoder(destEncoding)) return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) } catch (e) { if (getEncoding(destEncoding)) { try { textDecoders.set(destEncoding, new PolyfillTextDecoder(destEncoding)) return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) } catch (e) { } } } } } return text } function Decoder () { this.buffer = undefined } Decoder.prototype.write = function (str) { // Replace '+' with ' ' before decoding str = str.replace(RE_PLUS, ' ') let res = '' let i = 0; let p = 0; const len = str.length for (; i < len; ++i) { if (this.buffer !== undefined) { if (!HEX[str.charCodeAt(i)]) { res += '%' + this.buffer this.buffer = undefined --i // retry character } else { this.buffer += str[i] ++p if (this.buffer.length === 2) { res += String.fromCharCode(parseInt(this.buffer, 16)) this.buffer = undefined } } } else if (str[i] === '%') { if (i > p) { res += str.substring(p, i) p = i } this.buffer = '' ++p } } if (p < len && this.buffer === undefined) { res += str.substring(p) } return res } Decoder.prototype.reset = function () { this.buffer = undefined } function basename (path) { if (typeof path !== 'string') { return '' } for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var switch (path.charCodeAt(i)) { case 0x2F: // '/' case 0x5C: // '\' path = path.slice(i + 1) return (path === '..' || path === '.' ? '' : path) } } return (path === '..' || path === '.' ? '' : path) } function getLimit (limits, name, defaultLimit) { if ( !limits || limits[name] === undefined || limits[name] === null ) { return defaultLimit } if ( typeof limits[name] !== 'number' || isNaN(limits[name]) ) { throw new TypeError('Limit ' + name + ' is not a valid number') } return limits[name] } module.exports = { Decoder, basename, getLimit, parseParams, decodeText }
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/lib/types/multipart.js
aws/lti-middleware/node_modules/@fastify/busboy/lib/types/multipart.js
// TODO: // * support 1 nested multipart level // (see second multipart example here: // http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) // * support limits.fieldNameSize // -- this will require modifications to utils.parseParams const ReadableStream = require('stream').Readable const inherits = require('util').inherits const Dicer = require('../../deps/dicer/lib/Dicer') const parseParams = require('../utils').parseParams const decodeText = require('../utils').decodeText const basename = require('../utils').basename const getLimit = require('../utils').getLimit const RE_BOUNDARY = /^boundary$/i const RE_FIELD = /^form-data$/i const RE_CHARSET = /^charset$/i const RE_FILENAME = /^filename$/i const RE_NAME = /^name$/i Multipart.detect = /^multipart\/form-data/i function Multipart (boy, cfg) { let i let len const self = this let boundary const limits = cfg.limits const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) const parsedConType = cfg.parsedConType || [] const defCharset = cfg.defCharset || 'utf8' const preservePath = cfg.preservePath const fileOpts = { highWaterMark: cfg.fileHwm } for (i = 0, len = parsedConType.length; i < len; ++i) { if (Array.isArray(parsedConType[i]) && RE_BOUNDARY.test(parsedConType[i][0])) { boundary = parsedConType[i][1] break } } function checkFinished () { if (nends === 0 && finished && !boy._done) { finished = false process.nextTick(function () { boy._done = true boy.emit('finish') }) } } if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) const filesLimit = getLimit(limits, 'files', Infinity) const fieldsLimit = getLimit(limits, 'fields', Infinity) const partsLimit = getLimit(limits, 'parts', Infinity) const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) let nfiles = 0 let nfields = 0 let nends = 0 let curFile let curField let finished = false this._needDrain = false this._pause = false this._cb = undefined this._nparts = 0 this._boy = boy const parserCfg = { boundary, maxHeaderPairs: headerPairsLimit, maxHeaderSize: headerSizeLimit, partHwm: fileOpts.highWaterMark, highWaterMark: cfg.highWaterMark } this.parser = new Dicer(parserCfg) this.parser.on('drain', function () { self._needDrain = false if (self._cb && !self._pause) { const cb = self._cb self._cb = undefined cb() } }).on('part', function onPart (part) { if (++self._nparts > partsLimit) { self.parser.removeListener('part', onPart) self.parser.on('part', skipPart) boy.hitPartsLimit = true boy.emit('partsLimit') return skipPart(part) } // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let // us emit 'end' early since we know the part has ended if we are already // seeing the next part if (curField) { const field = curField field.emit('end') field.removeAllListeners('end') } part.on('header', function (header) { let contype let fieldname let parsed let charset let encoding let filename let nsize = 0 if (header['content-type']) { parsed = parseParams(header['content-type'][0]) if (parsed[0]) { contype = parsed[0].toLowerCase() for (i = 0, len = parsed.length; i < len; ++i) { if (RE_CHARSET.test(parsed[i][0])) { charset = parsed[i][1].toLowerCase() break } } } } if (contype === undefined) { contype = 'text/plain' } if (charset === undefined) { charset = defCharset } if (header['content-disposition']) { parsed = parseParams(header['content-disposition'][0]) if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } for (i = 0, len = parsed.length; i < len; ++i) { if (RE_NAME.test(parsed[i][0])) { fieldname = parsed[i][1] } else if (RE_FILENAME.test(parsed[i][0])) { filename = parsed[i][1] if (!preservePath) { filename = basename(filename) } } } } else { return skipPart(part) } if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } let onData, onEnd if (isPartAFile(fieldname, contype, filename)) { // file/binary field if (nfiles === filesLimit) { if (!boy.hitFilesLimit) { boy.hitFilesLimit = true boy.emit('filesLimit') } return skipPart(part) } ++nfiles if (!boy._events.file) { self.parser._ignore() return } ++nends const file = new FileStream(fileOpts) curFile = file file.on('end', function () { --nends self._pause = false checkFinished() if (self._cb && !self._needDrain) { const cb = self._cb self._cb = undefined cb() } }) file._read = function (n) { if (!self._pause) { return } self._pause = false if (self._cb && !self._needDrain) { const cb = self._cb self._cb = undefined cb() } } boy.emit('file', fieldname, file, filename, encoding, contype) onData = function (data) { if ((nsize += data.length) > fileSizeLimit) { const extralen = fileSizeLimit - nsize + data.length if (extralen > 0) { file.push(data.slice(0, extralen)) } file.truncated = true file.bytesRead = fileSizeLimit part.removeAllListeners('data') file.emit('limit') return } else if (!file.push(data)) { self._pause = true } file.bytesRead = nsize } onEnd = function () { curFile = undefined file.push(null) } } else { // non-file field if (nfields === fieldsLimit) { if (!boy.hitFieldsLimit) { boy.hitFieldsLimit = true boy.emit('fieldsLimit') } return skipPart(part) } ++nfields ++nends let buffer = '' let truncated = false curField = part onData = function (data) { if ((nsize += data.length) > fieldSizeLimit) { const extralen = (fieldSizeLimit - (nsize - data.length)) buffer += data.toString('binary', 0, extralen) truncated = true part.removeAllListeners('data') } else { buffer += data.toString('binary') } } onEnd = function () { curField = undefined if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) --nends checkFinished() } } /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become broken. Streams2/streams3 is a huge black box of confusion, but somehow overriding the sync state seems to fix things again (and still seems to work for previous node versions). */ part._readableState.sync = false part.on('data', onData) part.on('end', onEnd) }).on('error', function (err) { if (curFile) { curFile.emit('error', err) } }) }).on('error', function (err) { boy.emit('error', err) }).on('finish', function () { finished = true checkFinished() }) } Multipart.prototype.write = function (chunk, cb) { let r if ((r = this.parser.write(chunk)) && !this._pause) { cb() } else { this._needDrain = !r this._cb = cb } } Multipart.prototype.end = function () { const self = this if (this._nparts === 0 && !self._boy._done) { process.nextTick(function () { self._boy._done = true self._boy.emit('finish') }) } else if (this.parser.writable) { this.parser.end() } } function skipPart (part) { part.resume() } function FileStream (opts) { ReadableStream.call(this, opts) this.bytesRead = 0 this.truncated = false } inherits(FileStream, ReadableStream) FileStream.prototype._read = function (n) { } module.exports = Multipart
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/@fastify/busboy/lib/types/urlencoded.js
aws/lti-middleware/node_modules/@fastify/busboy/lib/types/urlencoded.js
const Decoder = require('../utils').Decoder const decodeText = require('../utils').decodeText const getLimit = require('../utils').getLimit const RE_CHARSET = /^charset$/i UrlEncoded.detect = /^application\/x-www-form-urlencoded/i function UrlEncoded (boy, cfg) { const limits = cfg.limits const parsedConType = cfg.parsedConType this.boy = boy this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) this.fieldsLimit = getLimit(limits, 'fields', Infinity) let charset for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var if (Array.isArray(parsedConType[i]) && RE_CHARSET.test(parsedConType[i][0])) { charset = parsedConType[i][1].toLowerCase() break } } if (charset === undefined) { charset = cfg.defCharset || 'utf8' } this.decoder = new Decoder() this.charset = charset this._fields = 0 this._state = 'key' this._checkingBytes = true this._bytesKey = 0 this._bytesVal = 0 this._key = '' this._val = '' this._keyTrunc = false this._valTrunc = false this._hitLimit = false } UrlEncoded.prototype.write = function (data, cb) { if (this._fields === this.fieldsLimit) { if (!this.boy.hitFieldsLimit) { this.boy.hitFieldsLimit = true this.boy.emit('fieldsLimit') } return cb() } let idxeq; let idxamp; let i; let p = 0; const len = data.length while (p < len) { if (this._state === 'key') { idxeq = idxamp = undefined for (i = p; i < len; ++i) { if (!this._checkingBytes) { ++p } if (data[i] === 0x3D/* = */) { idxeq = i break } else if (data[i] === 0x26/* & */) { idxamp = i break } if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { this._hitLimit = true break } else if (this._checkingBytes) { ++this._bytesKey } } if (idxeq !== undefined) { // key with assignment if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } this._state = 'val' this._hitLimit = false this._checkingBytes = true this._val = '' this._bytesVal = 0 this._valTrunc = false this.decoder.reset() p = idxeq + 1 } else if (idxamp !== undefined) { // key with no assignment ++this._fields let key; const keyTrunc = this._keyTrunc if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } this._hitLimit = false this._checkingBytes = true this._key = '' this._bytesKey = 0 this._keyTrunc = false this.decoder.reset() if (key.length) { this.boy.emit('field', decodeText(key, 'binary', this.charset), '', keyTrunc, false) } p = idxamp + 1 if (this._fields === this.fieldsLimit) { return cb() } } else if (this._hitLimit) { // we may not have hit the actual limit if there are encoded bytes... if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } p = i if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { // yep, we actually did hit the limit this._checkingBytes = false this._keyTrunc = true } } else { if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } p = len } } else { idxamp = undefined for (i = p; i < len; ++i) { if (!this._checkingBytes) { ++p } if (data[i] === 0x26/* & */) { idxamp = i break } if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { this._hitLimit = true break } else if (this._checkingBytes) { ++this._bytesVal } } if (idxamp !== undefined) { ++this._fields if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } this.boy.emit('field', decodeText(this._key, 'binary', this.charset), decodeText(this._val, 'binary', this.charset), this._keyTrunc, this._valTrunc) this._state = 'key' this._hitLimit = false this._checkingBytes = true this._key = '' this._bytesKey = 0 this._keyTrunc = false this.decoder.reset() p = idxamp + 1 if (this._fields === this.fieldsLimit) { return cb() } } else if (this._hitLimit) { // we may not have hit the actual limit if there are encoded bytes... if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } p = i if ((this._val === '' && this.fieldSizeLimit === 0) || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { // yep, we actually did hit the limit this._checkingBytes = false this._valTrunc = true } } else { if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } p = len } } } cb() } UrlEncoded.prototype.end = function () { if (this.boy._done) { return } if (this._state === 'key' && this._key.length > 0) { this.boy.emit('field', decodeText(this._key, 'binary', this.charset), '', this._keyTrunc, false) } else if (this._state === 'val') { this.boy.emit('field', decodeText(this._key, 'binary', this.charset), decodeText(this._val, 'binary', this.charset), this._keyTrunc, this._valTrunc) } this.boy._done = true this.boy.emit('finish') } module.exports = UrlEncoded
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/lodash.isinteger/index.js
aws/lti-middleware/node_modules/lodash.isinteger/index.js
/** * lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /** * Checks if `value` is an integer. * * **Note:** This method is based on * [`Number.isInteger`](https://mdn.io/Number/isInteger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an integer, else `false`. * @example * * _.isInteger(3); * // => true * * _.isInteger(Number.MIN_VALUE); * // => false * * _.isInteger(Infinity); * // => false * * _.isInteger('3'); * // => false */ function isInteger(value) { return typeof value == 'number' && value == toInteger(value); } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && objectToString.call(value) == symbolTag); } /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = isInteger;
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/safer-buffer/safer.js
aws/lti-middleware/node_modules/safer-buffer/safer.js
/* eslint-disable node/no-deprecated-api */ 'use strict' var buffer = require('buffer') var Buffer = buffer.Buffer var safer = {} var key for (key in buffer) { if (!buffer.hasOwnProperty(key)) continue if (key === 'SlowBuffer' || key === 'Buffer') continue safer[key] = buffer[key] } var Safer = safer.Buffer = {} for (key in Buffer) { if (!Buffer.hasOwnProperty(key)) continue if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue Safer[key] = Buffer[key] } safer.Buffer.prototype = Buffer.prototype if (!Safer.from || Safer.from === Uint8Array.from) { Safer.from = function (value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) } if (value && typeof value.length === 'undefined') { throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) } return Buffer(value, encodingOrOffset, length) } } if (!Safer.alloc) { Safer.alloc = function (size, fill, encoding) { if (typeof size !== 'number') { throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) } if (size < 0 || size >= 2 * (1 << 30)) { throw new RangeError('The value "' + size + '" is invalid for option "size"') } var buf = Buffer(size) if (!fill || fill.length === 0) { buf.fill(0) } else if (typeof encoding === 'string') { buf.fill(fill, encoding) } else { buf.fill(fill) } return buf } } if (!safer.kStringMaxLength) { try { safer.kStringMaxLength = process.binding('buffer').kStringMaxLength } catch (e) { // we can't determine kStringMaxLength in environments where process.binding // is unsupported, so let's not set it } } if (!safer.constants) { safer.constants = { MAX_LENGTH: safer.kMaxLength } if (safer.kStringMaxLength) { safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength } } module.exports = safer
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/safer-buffer/tests.js
aws/lti-middleware/node_modules/safer-buffer/tests.js
/* eslint-disable node/no-deprecated-api */ 'use strict' var test = require('tape') var buffer = require('buffer') var index = require('./') var safer = require('./safer') var dangerous = require('./dangerous') /* Inheritance tests */ test('Default is Safer', function (t) { t.equal(index, safer) t.notEqual(safer, dangerous) t.notEqual(index, dangerous) t.end() }) test('Is not a function', function (t) { [index, safer, dangerous].forEach(function (impl) { t.equal(typeof impl, 'object') t.equal(typeof impl.Buffer, 'object') }); [buffer].forEach(function (impl) { t.equal(typeof impl, 'object') t.equal(typeof impl.Buffer, 'function') }) t.end() }) test('Constructor throws', function (t) { [index, safer, dangerous].forEach(function (impl) { t.throws(function () { impl.Buffer() }) t.throws(function () { impl.Buffer(0) }) t.throws(function () { impl.Buffer('a') }) t.throws(function () { impl.Buffer('a', 'utf-8') }) t.throws(function () { return new impl.Buffer() }) t.throws(function () { return new impl.Buffer(0) }) t.throws(function () { return new impl.Buffer('a') }) t.throws(function () { return new impl.Buffer('a', 'utf-8') }) }) t.end() }) test('Safe methods exist', function (t) { [index, safer, dangerous].forEach(function (impl) { t.equal(typeof impl.Buffer.alloc, 'function', 'alloc') t.equal(typeof impl.Buffer.from, 'function', 'from') }) t.end() }) test('Unsafe methods exist only in Dangerous', function (t) { [index, safer].forEach(function (impl) { t.equal(typeof impl.Buffer.allocUnsafe, 'undefined') t.equal(typeof impl.Buffer.allocUnsafeSlow, 'undefined') }); [dangerous].forEach(function (impl) { t.equal(typeof impl.Buffer.allocUnsafe, 'function') t.equal(typeof impl.Buffer.allocUnsafeSlow, 'function') }) t.end() }) test('Generic methods/properties are defined and equal', function (t) { ['poolSize', 'isBuffer', 'concat', 'byteLength'].forEach(function (method) { [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer[method], buffer.Buffer[method], method) t.notEqual(typeof impl.Buffer[method], 'undefined', method) }) }) t.end() }) test('Built-in buffer static methods/properties are inherited', function (t) { Object.keys(buffer).forEach(function (method) { if (method === 'SlowBuffer' || method === 'Buffer') return; [index, safer, dangerous].forEach(function (impl) { t.equal(impl[method], buffer[method], method) t.notEqual(typeof impl[method], 'undefined', method) }) }) t.end() }) test('Built-in Buffer static methods/properties are inherited', function (t) { Object.keys(buffer.Buffer).forEach(function (method) { if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer[method], buffer.Buffer[method], method) t.notEqual(typeof impl.Buffer[method], 'undefined', method) }) }) t.end() }) test('.prototype property of Buffer is inherited', function (t) { [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer.prototype, buffer.Buffer.prototype, 'prototype') t.notEqual(typeof impl.Buffer.prototype, 'undefined', 'prototype') }) t.end() }) test('All Safer methods are present in Dangerous', function (t) { Object.keys(safer).forEach(function (method) { if (method === 'Buffer') return; [index, safer, dangerous].forEach(function (impl) { t.equal(impl[method], safer[method], method) if (method !== 'kStringMaxLength') { t.notEqual(typeof impl[method], 'undefined', method) } }) }) Object.keys(safer.Buffer).forEach(function (method) { [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer[method], safer.Buffer[method], method) t.notEqual(typeof impl.Buffer[method], 'undefined', method) }) }) t.end() }) test('Safe methods from Dangerous methods are present in Safer', function (t) { Object.keys(dangerous).forEach(function (method) { if (method === 'Buffer') return; [index, safer, dangerous].forEach(function (impl) { t.equal(impl[method], dangerous[method], method) if (method !== 'kStringMaxLength') { t.notEqual(typeof impl[method], 'undefined', method) } }) }) Object.keys(dangerous.Buffer).forEach(function (method) { if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer[method], dangerous.Buffer[method], method) t.notEqual(typeof impl.Buffer[method], 'undefined', method) }) }) t.end() }) /* Behaviour tests */ test('Methods return Buffers', function (t) { [index, safer, dangerous].forEach(function (impl) { t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 10))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 'a'))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10, 'x'))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(9, 'ab'))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(''))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string'))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string', 'utf-8'))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([0, 42, 3]))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(new Uint8Array([0, 42, 3])))) t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([]))) }); ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](0))) t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](10))) }) t.end() }) test('Constructor is buffer.Buffer', function (t) { [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer.alloc(0).constructor, buffer.Buffer) t.equal(impl.Buffer.alloc(0, 10).constructor, buffer.Buffer) t.equal(impl.Buffer.alloc(0, 'a').constructor, buffer.Buffer) t.equal(impl.Buffer.alloc(10).constructor, buffer.Buffer) t.equal(impl.Buffer.alloc(10, 'x').constructor, buffer.Buffer) t.equal(impl.Buffer.alloc(9, 'ab').constructor, buffer.Buffer) t.equal(impl.Buffer.from('').constructor, buffer.Buffer) t.equal(impl.Buffer.from('string').constructor, buffer.Buffer) t.equal(impl.Buffer.from('string', 'utf-8').constructor, buffer.Buffer) t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').constructor, buffer.Buffer) t.equal(impl.Buffer.from([0, 42, 3]).constructor, buffer.Buffer) t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).constructor, buffer.Buffer) t.equal(impl.Buffer.from([]).constructor, buffer.Buffer) }); [0, 10, 100].forEach(function (arg) { t.equal(dangerous.Buffer.allocUnsafe(arg).constructor, buffer.Buffer) t.equal(dangerous.Buffer.allocUnsafeSlow(arg).constructor, buffer.SlowBuffer(0).constructor) }) t.end() }) test('Invalid calls throw', function (t) { [index, safer, dangerous].forEach(function (impl) { t.throws(function () { impl.Buffer.from(0) }) t.throws(function () { impl.Buffer.from(10) }) t.throws(function () { impl.Buffer.from(10, 'utf-8') }) t.throws(function () { impl.Buffer.from('string', 'invalid encoding') }) t.throws(function () { impl.Buffer.from(-10) }) t.throws(function () { impl.Buffer.from(1e90) }) t.throws(function () { impl.Buffer.from(Infinity) }) t.throws(function () { impl.Buffer.from(-Infinity) }) t.throws(function () { impl.Buffer.from(NaN) }) t.throws(function () { impl.Buffer.from(null) }) t.throws(function () { impl.Buffer.from(undefined) }) t.throws(function () { impl.Buffer.from() }) t.throws(function () { impl.Buffer.from({}) }) t.throws(function () { impl.Buffer.alloc('') }) t.throws(function () { impl.Buffer.alloc('string') }) t.throws(function () { impl.Buffer.alloc('string', 'utf-8') }) t.throws(function () { impl.Buffer.alloc('b25ldHdvdGhyZWU=', 'base64') }) t.throws(function () { impl.Buffer.alloc(-10) }) t.throws(function () { impl.Buffer.alloc(1e90) }) t.throws(function () { impl.Buffer.alloc(2 * (1 << 30)) }) t.throws(function () { impl.Buffer.alloc(Infinity) }) t.throws(function () { impl.Buffer.alloc(-Infinity) }) t.throws(function () { impl.Buffer.alloc(null) }) t.throws(function () { impl.Buffer.alloc(undefined) }) t.throws(function () { impl.Buffer.alloc() }) t.throws(function () { impl.Buffer.alloc([]) }) t.throws(function () { impl.Buffer.alloc([0, 42, 3]) }) t.throws(function () { impl.Buffer.alloc({}) }) }); ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { t.throws(function () { dangerous.Buffer[method]('') }) t.throws(function () { dangerous.Buffer[method]('string') }) t.throws(function () { dangerous.Buffer[method]('string', 'utf-8') }) t.throws(function () { dangerous.Buffer[method](2 * (1 << 30)) }) t.throws(function () { dangerous.Buffer[method](Infinity) }) if (dangerous.Buffer[method] === buffer.Buffer.allocUnsafe) { t.skip('Skipping, older impl of allocUnsafe coerced negative sizes to 0') } else { t.throws(function () { dangerous.Buffer[method](-10) }) t.throws(function () { dangerous.Buffer[method](-1e90) }) t.throws(function () { dangerous.Buffer[method](-Infinity) }) } t.throws(function () { dangerous.Buffer[method](null) }) t.throws(function () { dangerous.Buffer[method](undefined) }) t.throws(function () { dangerous.Buffer[method]() }) t.throws(function () { dangerous.Buffer[method]([]) }) t.throws(function () { dangerous.Buffer[method]([0, 42, 3]) }) t.throws(function () { dangerous.Buffer[method]({}) }) }) t.end() }) test('Buffers have appropriate lengths', function (t) { [index, safer, dangerous].forEach(function (impl) { t.equal(impl.Buffer.alloc(0).length, 0) t.equal(impl.Buffer.alloc(10).length, 10) t.equal(impl.Buffer.from('').length, 0) t.equal(impl.Buffer.from('string').length, 6) t.equal(impl.Buffer.from('string', 'utf-8').length, 6) t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').length, 11) t.equal(impl.Buffer.from([0, 42, 3]).length, 3) t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).length, 3) t.equal(impl.Buffer.from([]).length, 0) }); ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { t.equal(dangerous.Buffer[method](0).length, 0) t.equal(dangerous.Buffer[method](10).length, 10) }) t.end() }) test('Buffers have appropriate lengths (2)', function (t) { t.equal(index.Buffer.alloc, safer.Buffer.alloc) t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) var ok = true; [ safer.Buffer.alloc, dangerous.Buffer.allocUnsafe, dangerous.Buffer.allocUnsafeSlow ].forEach(function (method) { for (var i = 0; i < 1e2; i++) { var length = Math.round(Math.random() * 1e5) var buf = method(length) if (!buffer.Buffer.isBuffer(buf)) ok = false if (buf.length !== length) ok = false } }) t.ok(ok) t.end() }) test('.alloc(size) is zero-filled and has correct length', function (t) { t.equal(index.Buffer.alloc, safer.Buffer.alloc) t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) var ok = true for (var i = 0; i < 1e2; i++) { var length = Math.round(Math.random() * 2e6) var buf = index.Buffer.alloc(length) if (!buffer.Buffer.isBuffer(buf)) ok = false if (buf.length !== length) ok = false var j for (j = 0; j < length; j++) { if (buf[j] !== 0) ok = false } buf.fill(1) for (j = 0; j < length; j++) { if (buf[j] !== 1) ok = false } } t.ok(ok) t.end() }) test('.allocUnsafe / .allocUnsafeSlow are fillable and have correct lengths', function (t) { ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { var ok = true for (var i = 0; i < 1e2; i++) { var length = Math.round(Math.random() * 2e6) var buf = dangerous.Buffer[method](length) if (!buffer.Buffer.isBuffer(buf)) ok = false if (buf.length !== length) ok = false buf.fill(0, 0, length) var j for (j = 0; j < length; j++) { if (buf[j] !== 0) ok = false } buf.fill(1, 0, length) for (j = 0; j < length; j++) { if (buf[j] !== 1) ok = false } } t.ok(ok, method) }) t.end() }) test('.alloc(size, fill) is `fill`-filled', function (t) { t.equal(index.Buffer.alloc, safer.Buffer.alloc) t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) var ok = true for (var i = 0; i < 1e2; i++) { var length = Math.round(Math.random() * 2e6) var fill = Math.round(Math.random() * 255) var buf = index.Buffer.alloc(length, fill) if (!buffer.Buffer.isBuffer(buf)) ok = false if (buf.length !== length) ok = false for (var j = 0; j < length; j++) { if (buf[j] !== fill) ok = false } } t.ok(ok) t.end() }) test('.alloc(size, fill) is `fill`-filled', function (t) { t.equal(index.Buffer.alloc, safer.Buffer.alloc) t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) var ok = true for (var i = 0; i < 1e2; i++) { var length = Math.round(Math.random() * 2e6) var fill = Math.round(Math.random() * 255) var buf = index.Buffer.alloc(length, fill) if (!buffer.Buffer.isBuffer(buf)) ok = false if (buf.length !== length) ok = false for (var j = 0; j < length; j++) { if (buf[j] !== fill) ok = false } } t.ok(ok) t.deepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 97)) t.notDeepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 98)) var tmp = new buffer.Buffer(2) tmp.fill('ok') if (tmp[1] === tmp[0]) { // Outdated Node.js t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('ooooo')) } else { t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('okoko')) } t.notDeepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('kokok')) t.end() }) test('safer.Buffer.from returns results same as Buffer constructor', function (t) { [index, safer, dangerous].forEach(function (impl) { t.deepEqual(impl.Buffer.from(''), new buffer.Buffer('')) t.deepEqual(impl.Buffer.from('string'), new buffer.Buffer('string')) t.deepEqual(impl.Buffer.from('string', 'utf-8'), new buffer.Buffer('string', 'utf-8')) t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), new buffer.Buffer('b25ldHdvdGhyZWU=', 'base64')) t.deepEqual(impl.Buffer.from([0, 42, 3]), new buffer.Buffer([0, 42, 3])) t.deepEqual(impl.Buffer.from(new Uint8Array([0, 42, 3])), new buffer.Buffer(new Uint8Array([0, 42, 3]))) t.deepEqual(impl.Buffer.from([]), new buffer.Buffer([])) }) t.end() }) test('safer.Buffer.from returns consistent results', function (t) { [index, safer, dangerous].forEach(function (impl) { t.deepEqual(impl.Buffer.from(''), impl.Buffer.alloc(0)) t.deepEqual(impl.Buffer.from([]), impl.Buffer.alloc(0)) t.deepEqual(impl.Buffer.from(new Uint8Array([])), impl.Buffer.alloc(0)) t.deepEqual(impl.Buffer.from('string', 'utf-8'), impl.Buffer.from('string')) t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from([115, 116, 114, 105, 110, 103])) t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from(impl.Buffer.from('string'))) t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), impl.Buffer.from('onetwothree')) t.notDeepEqual(impl.Buffer.from('b25ldHdvdGhyZWU='), impl.Buffer.from('onetwothree')) }) t.end() })
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/safer-buffer/dangerous.js
aws/lti-middleware/node_modules/safer-buffer/dangerous.js
/* eslint-disable node/no-deprecated-api */ 'use strict' var buffer = require('buffer') var Buffer = buffer.Buffer var safer = require('./safer.js') var Safer = safer.Buffer var dangerous = {} var key for (key in safer) { if (!safer.hasOwnProperty(key)) continue dangerous[key] = safer[key] } var Dangereous = dangerous.Buffer = {} // Copy Safer API for (key in Safer) { if (!Safer.hasOwnProperty(key)) continue Dangereous[key] = Safer[key] } // Copy those missing unsafe methods, if they are present for (key in Buffer) { if (!Buffer.hasOwnProperty(key)) continue if (Dangereous.hasOwnProperty(key)) continue Dangereous[key] = Buffer[key] } if (!Dangereous.allocUnsafe) { Dangereous.allocUnsafe = function (size) { if (typeof size !== 'number') { throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) } if (size < 0 || size >= 2 * (1 << 30)) { throw new RangeError('The value "' + size + '" is invalid for option "size"') } return Buffer(size) } } if (!Dangereous.allocUnsafeSlow) { Dangereous.allocUnsafeSlow = function (size) { if (typeof size !== 'number') { throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) } if (size < 0 || size >= 2 * (1 << 30)) { throw new RangeError('The value "' + size + '" is invalid for option "size"') } return buffer.SlowBuffer(size) } } module.exports = dangerous
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/mime-types/index.js
aws/lti-middleware/node_modules/mime-types/index.js
/*! * mime-types * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var db = require('mime-db') var extname = require('path').extname /** * Module variables. * @private */ var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ var TEXT_TYPE_REGEXP = /^text\//i /** * Module exports. * @public */ exports.charset = charset exports.charsets = { lookup: charset } exports.contentType = contentType exports.extension = extension exports.extensions = Object.create(null) exports.lookup = lookup exports.types = Object.create(null) // Populate the extensions/types maps populateMaps(exports.extensions, exports.types) /** * Get the default charset for a MIME type. * * @param {string} type * @return {boolean|string} */ function charset (type) { if (!type || typeof type !== 'string') { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP.exec(type) var mime = match && db[match[1].toLowerCase()] if (mime && mime.charset) { return mime.charset } // default text/* to utf-8 if (match && TEXT_TYPE_REGEXP.test(match[1])) { return 'UTF-8' } return false } /** * Create a full Content-Type header given a MIME type or extension. * * @param {string} str * @return {boolean|string} */ function contentType (str) { // TODO: should this even be in this module? if (!str || typeof str !== 'string') { return false } var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str if (!mime) { return false } // TODO: use content-type or other module if (mime.indexOf('charset') === -1) { var charset = exports.charset(mime) if (charset) mime += '; charset=' + charset.toLowerCase() } return mime } /** * Get the default extension for a MIME type. * * @param {string} type * @return {boolean|string} */ function extension (type) { if (!type || typeof type !== 'string') { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP.exec(type) // get extensions var exts = match && exports.extensions[match[1].toLowerCase()] if (!exts || !exts.length) { return false } return exts[0] } /** * Lookup the MIME type for a file path/extension. * * @param {string} path * @return {boolean|string} */ function lookup (path) { if (!path || typeof path !== 'string') { return false } // get the extension ("ext" or ".ext" or full path) var extension = extname('x.' + path) .toLowerCase() .substr(1) if (!extension) { return false } return exports.types[extension] || false } /** * Populate the extensions and types maps. * @private */ function populateMaps (extensions, types) { // source preference (least -> most) var preference = ['nginx', 'apache', undefined, 'iana'] Object.keys(db).forEach(function forEachMimeType (type) { var mime = db[type] var exts = mime.extensions if (!exts || !exts.length) { return } // mime -> extensions extensions[type] = exts // extension -> mime for (var i = 0; i < exts.length; i++) { var extension = exts[i] if (types[extension]) { var from = preference.indexOf(db[types[extension]].source) var to = preference.indexOf(mime.source) if (types[extension] !== 'application/octet-stream' && (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { // skip the remapping continue } } // set the extension -> mime types[extension] = type } }) }
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js
// Generated by CoffeeScript 1.12.7 (function() { var NodeType, XMLDeclaration, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = require('./Utility').isObject; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); module.exports = XMLDeclaration = (function(superClass) { extend(XMLDeclaration, superClass); function XMLDeclaration(parent, version, encoding, standalone) { var ref; XMLDeclaration.__super__.constructor.call(this, parent); if (isObject(version)) { ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; } if (!version) { version = '1.0'; } this.type = NodeType.Declaration; this.version = this.stringify.xmlVersion(version); if (encoding != null) { this.encoding = this.stringify.xmlEncoding(encoding); } if (standalone != null) { this.standalone = this.stringify.xmlStandalone(standalone); } } XMLDeclaration.prototype.toString = function(options) { return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); }; return XMLDeclaration; })(XMLNode); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLUserDataHandler.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLUserDataHandler.js
// Generated by CoffeeScript 1.12.7 (function() { var OperationType, XMLUserDataHandler; OperationType = require('./OperationType'); module.exports = XMLUserDataHandler = (function() { function XMLUserDataHandler() {} XMLUserDataHandler.prototype.handle = function(operation, key, data, src, dst) {}; return XMLUserDataHandler; })(); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLText.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLText.js
// Generated by CoffeeScript 1.12.7 (function() { var NodeType, XMLCharacterData, XMLText, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require('./NodeType'); XMLCharacterData = require('./XMLCharacterData'); module.exports = XMLText = (function(superClass) { extend(XMLText, superClass); function XMLText(parent, text) { XMLText.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing element text. " + this.debugInfo()); } this.name = "#text"; this.type = NodeType.Text; this.value = this.stringify.text(text); } Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLText.prototype, 'wholeText', { get: function() { var next, prev, str; str = ''; prev = this.previousSibling; while (prev) { str = prev.data + str; prev = prev.previousSibling; } str += this.data; next = this.nextSibling; while (next) { str = str + next.data; next = next.nextSibling; } return str; } }); XMLText.prototype.clone = function() { return Object.create(this); }; XMLText.prototype.toString = function(options) { return this.options.writer.text(this, this.options.writer.filterOptions(options)); }; XMLText.prototype.splitText = function(offset) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLText.prototype.replaceWholeText = function(content) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; return XMLText; })(XMLCharacterData); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js
// Generated by CoffeeScript 1.12.7 (function() { var XMLStringWriter, XMLWriterBase, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLWriterBase = require('./XMLWriterBase'); module.exports = XMLStringWriter = (function(superClass) { extend(XMLStringWriter, superClass); function XMLStringWriter(options) { XMLStringWriter.__super__.constructor.call(this, options); } XMLStringWriter.prototype.document = function(doc, options) { var child, i, len, r, ref; options = this.filterOptions(options); r = ''; ref = doc.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; r += this.writeChildNode(child, options, 0); } if (options.pretty && r.slice(-options.newline.length) === options.newline) { r = r.slice(0, -options.newline.length); } return r; }; return XMLStringWriter; })(XMLWriterBase); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js
// Generated by CoffeeScript 1.12.7 (function() { var NodeType, XMLDTDNotation, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); module.exports = XMLDTDNotation = (function(superClass) { extend(XMLDTDNotation, superClass); function XMLDTDNotation(parent, name, value) { XMLDTDNotation.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD notation name. " + this.debugInfo(name)); } if (!value.pubID && !value.sysID) { throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); } this.name = this.stringify.name(name); this.type = NodeType.NotationDeclaration; if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } } Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { get: function() { return this.pubID; } }); Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { get: function() { return this.sysID; } }); XMLDTDNotation.prototype.toString = function(options) { return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); }; return XMLDTDNotation; })(XMLNode); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js
// Generated by CoffeeScript 1.12.7 (function() { var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); XMLDOMStringList = require('./XMLDOMStringList'); module.exports = XMLDOMConfiguration = (function() { function XMLDOMConfiguration() { var clonedSelf; this.defaultParams = { "canonical-form": false, "cdata-sections": false, "comments": false, "datatype-normalization": false, "element-content-whitespace": true, "entities": true, "error-handler": new XMLDOMErrorHandler(), "infoset": true, "validate-if-schema": false, "namespaces": true, "namespace-declarations": true, "normalize-characters": false, "schema-location": '', "schema-type": '', "split-cdata-sections": true, "validate": false, "well-formed": true }; this.params = clonedSelf = Object.create(this.defaultParams); } Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { get: function() { return new XMLDOMStringList(Object.keys(this.defaultParams)); } }); XMLDOMConfiguration.prototype.getParameter = function(name) { if (this.params.hasOwnProperty(name)) { return this.params[name]; } else { return null; } }; XMLDOMConfiguration.prototype.canSetParameter = function(name, value) { return true; }; XMLDOMConfiguration.prototype.setParameter = function(name, value) { if (value != null) { return this.params[name] = value; } else { return delete this.params[name]; } }; return XMLDOMConfiguration; })(); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js
// Generated by CoffeeScript 1.12.7 (function() { var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isPlainObject = require('./Utility').isPlainObject; XMLDOMImplementation = require('./XMLDOMImplementation'); XMLDOMConfiguration = require('./XMLDOMConfiguration'); XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); XMLStringifier = require('./XMLStringifier'); XMLStringWriter = require('./XMLStringWriter'); module.exports = XMLDocument = (function(superClass) { extend(XMLDocument, superClass); function XMLDocument(options) { XMLDocument.__super__.constructor.call(this, null); this.name = "#document"; this.type = NodeType.Document; this.documentURI = null; this.domConfig = new XMLDOMConfiguration(); options || (options = {}); if (!options.writer) { options.writer = new XMLStringWriter(); } this.options = options; this.stringify = new XMLStringifier(options); } Object.defineProperty(XMLDocument.prototype, 'implementation', { value: new XMLDOMImplementation() }); Object.defineProperty(XMLDocument.prototype, 'doctype', { get: function() { var child, i, len, ref; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.DocType) { return child; } } return null; } }); Object.defineProperty(XMLDocument.prototype, 'documentElement', { get: function() { return this.rootObject || null; } }); Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { get: function() { return null; } }); Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { get: function() { return false; } }); Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].encoding; } else { return null; } } }); Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].standalone === 'yes'; } else { return false; } } }); Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].version; } else { return "1.0"; } } }); Object.defineProperty(XMLDocument.prototype, 'URL', { get: function() { return this.documentURI; } }); Object.defineProperty(XMLDocument.prototype, 'origin', { get: function() { return null; } }); Object.defineProperty(XMLDocument.prototype, 'compatMode', { get: function() { return null; } }); Object.defineProperty(XMLDocument.prototype, 'characterSet', { get: function() { return null; } }); Object.defineProperty(XMLDocument.prototype, 'contentType', { get: function() { return null; } }); XMLDocument.prototype.end = function(writer) { var writerOptions; writerOptions = {}; if (!writer) { writer = this.options.writer; } else if (isPlainObject(writer)) { writerOptions = writer; writer = this.options.writer; } return writer.document(this, writer.filterOptions(writerOptions)); }; XMLDocument.prototype.toString = function(options) { return this.options.writer.document(this, this.options.writer.filterOptions(options)); }; XMLDocument.prototype.createElement = function(tagName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createDocumentFragment = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createTextNode = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createComment = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createCDATASection = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createProcessingInstruction = function(target, data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createAttribute = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createEntityReference = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.getElementsByTagName = function(tagname) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.importNode = function(importedNode, deep) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.getElementById = function(elementId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.adoptNode = function(source) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.normalizeDocument = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.getElementsByClassName = function(classNames) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createEvent = function(eventInterface) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createRange = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; return XMLDocument; })(XMLNode); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false
CAHLR/OATutor
https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
aws/lti-middleware/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
// Generated by CoffeeScript 1.12.7 (function() { var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require('./NodeType'); XMLCharacterData = require('./XMLCharacterData'); module.exports = XMLProcessingInstruction = (function(superClass) { extend(XMLProcessingInstruction, superClass); function XMLProcessingInstruction(parent, target, value) { XMLProcessingInstruction.__super__.constructor.call(this, parent); if (target == null) { throw new Error("Missing instruction target. " + this.debugInfo()); } this.type = NodeType.ProcessingInstruction; this.target = this.stringify.insTarget(target); this.name = this.target; if (value) { this.value = this.stringify.insValue(value); } } XMLProcessingInstruction.prototype.clone = function() { return Object.create(this); }; XMLProcessingInstruction.prototype.toString = function(options) { return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); }; XMLProcessingInstruction.prototype.isEqualNode = function(node) { if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.target !== this.target) { return false; } return true; }; return XMLProcessingInstruction; })(XMLCharacterData); }).call(this);
javascript
MIT
10a5baf153a505267af8045b05c217b4be6bd8b4
2026-01-05T03:39:09.711315Z
false