Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2022-09-08 17:28:17 +00:00
parent ace5545513
commit f87e7a6293
248 changed files with 9686 additions and 262 deletions

View file

@ -1,22 +1,24 @@
import stringify from './stringify.js';
import { unsafeStringify } from './stringify.js';
import parse from './parse.js';
function stringToBytes(str) {
str = unescape(encodeURIComponent(str)); // UTF8 escape
var bytes = [];
const bytes = [];
for (var i = 0; i < str.length; ++i) {
for (let i = 0; i < str.length; ++i) {
bytes.push(str.charCodeAt(i));
}
return bytes;
}
export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
export default function (name, version, hashfunc) {
export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
export default function v35(name, version, hashfunc) {
function generateUUID(value, namespace, buf, offset) {
var _namespace;
if (typeof value === 'string') {
value = stringToBytes(value);
}
@ -25,14 +27,14 @@ export default function (name, version, hashfunc) {
namespace = parse(namespace);
}
if (namespace.length !== 16) {
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
} // Compute hash of namespace and value, Per 4.3
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
// hashfunc([...namespace, ... value])`
var bytes = new Uint8Array(16 + value.length);
let bytes = new Uint8Array(16 + value.length);
bytes.set(namespace);
bytes.set(value, namespace.length);
bytes = hashfunc(bytes);
@ -42,14 +44,14 @@ export default function (name, version, hashfunc) {
if (buf) {
offset = offset || 0;
for (var i = 0; i < 16; ++i) {
for (let i = 0; i < 16; ++i) {
buf[offset + i] = bytes[i];
}
return buf;
}
return stringify(bytes);
return unsafeStringify(bytes);
} // Function#name is not settable on some platforms (#270)