Files
rspade_system/node_modules/pbkdf2/lib/to-buffer.js
root bd5809fdbd Reorganize RSpade directory structure for clarity
Improve Jqhtml_Integration.js documentation with hydration system explanation
Add jqhtml-laravel integration packages for traditional Laravel projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 09:41:48 +00:00

21 lines
611 B
JavaScript

'use strict';
var Buffer = require('safe-buffer').Buffer;
var toBuffer = require('to-buffer');
var useUint8Array = typeof Uint8Array !== 'undefined';
var useArrayBuffer = useUint8Array && typeof ArrayBuffer !== 'undefined';
var isView = useArrayBuffer && ArrayBuffer.isView;
module.exports = function (thing, encoding, name) {
if (
typeof thing === 'string'
|| Buffer.isBuffer(thing)
|| (useUint8Array && thing instanceof Uint8Array)
|| (isView && isView(thing))
) {
return toBuffer(thing, encoding);
}
throw new TypeError(name + ' must be a string, a Buffer, a Uint8Array, or a DataView');
};