**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:
parent
186b4b4555
commit
98d9cbdcee
1 changed files with 54 additions and 54 deletions
|
|
@ -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()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue