**refactor(core): remove redundant whitespace and format code**

- **Code Cleanup**: Removed unnecessary trailing whitespaces across `src/brainyData.ts`. Adjusted formatting for inline object spreads to maintain a consistent coding style.
- **Purpose**: Enhance code readability and ensure adherence to formatting standards without altering functionality.
This commit is contained in:
David Snelling 2025-07-24 17:01:04 -07:00
parent 186b4b4555
commit 98d9cbdcee

View file

@ -967,7 +967,7 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
// Ensure metadata has the id field // Ensure metadata has the id field
if (metadata && typeof metadata === 'object') { if (metadata && typeof metadata === 'object') {
metadata = { ...metadata, id } as T metadata = {...metadata, id} as T
} }
searchResults.push({ searchResults.push({
@ -1027,7 +1027,7 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
// Ensure metadata has the id field // Ensure metadata has the id field
if (metadata && typeof metadata === 'object') { if (metadata && typeof metadata === 'object') {
metadata = { ...metadata, id } as T metadata = {...metadata, id} as T
} }
searchResults.push({ searchResults.push({
@ -1973,9 +1973,9 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
// Initialize persistent statistics // Initialize persistent statistics
const service = 'default' const service = 'default'
await this.storage!.saveStatistics({ await this.storage!.saveStatistics({
nounCount: { [service]: nounCount }, nounCount: {[service]: nounCount},
verbCount: { [service]: verbCount }, verbCount: {[service]: verbCount},
metadataCount: { [service]: metadataCount }, metadataCount: {[service]: metadataCount},
hnswIndexSize, hnswIndexSize,
lastUpdated: new Date().toISOString() lastUpdated: new Date().toISOString()
}) })