Initial commit: Brainy - Multi-Dimensional AI Database
Open source vector database with HNSW indexing, graph relationships, and metadata facets. Features CLI with professional augmentation registry integration for discovering extensions and capabilities.
This commit is contained in:
commit
f8c45f2d8d
448 changed files with 103294 additions and 0 deletions
21
dist/universal/uuid.js
vendored
Normal file
21
dist/universal/uuid.js
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Universal UUID implementation
|
||||
* Works in all environments: Browser, Node.js, Serverless
|
||||
*/
|
||||
export function v4() {
|
||||
// Use crypto.randomUUID if available (Node.js 19+, modern browsers)
|
||||
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
|
||||
return crypto.randomUUID();
|
||||
}
|
||||
// Fallback implementation for older environments
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
||||
const r = Math.random() * 16 | 0;
|
||||
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
// Named export to match uuid package API
|
||||
export { v4 as uuidv4 };
|
||||
// Default export for convenience
|
||||
export default { v4 };
|
||||
//# sourceMappingURL=uuid.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue