Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Nov 23, 2024
1 parent f5d8f21 commit fdbf566
Show file tree
Hide file tree
Showing 3 changed files with 616 additions and 27 deletions.
19 changes: 0 additions & 19 deletions src/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2149,25 +2149,6 @@ ${collection.items.map(item =>
return this
},

lint(): Array<{ type: 'warning' | 'error', message: string, suggestion?: string }> {
const issues: Array<{ type: 'warning' | 'error', message: string, suggestion?: string }> = []

// Check for null values
for (const item of this.items) {
for (const [key, value] of Object.entries(item as object)) {
if (value === null) {
issues.push({
type: 'warning',
message: `Null value found in field "${key}"`,
suggestion: 'Consider using undefined or providing a default value',
})
}
}
}

return issues
},

sentiment(this: CollectionOperations<string>): CollectionOperations<{ score: number, comparative: number }> {
// Basic sentiment analysis using a simple positive/negative word approach
const positiveWords = new Set(['good', 'great', 'awesome', 'excellent', 'happy', 'love'])
Expand Down
5 changes: 0 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,6 @@ export interface CollectionOperations<T> extends Collection<T> {
memory: Record<string, number>
complexity: Record<string, string>
}>
lint: () => Array<{
type: 'warning' | 'error'
message: string
suggestion?: string
}>

// Advanced Mathematical Operations
/**
Expand Down
Loading

0 comments on commit fdbf566

Please sign in to comment.