This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Search | |
@@searchable_attributes = [] | |
def searchable(&block) | |
block.call(@@searchable_attributes) | |
end | |
def searchable_attributes | |
@@searchable_attributes | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function useTable([]) { | |
const [id, setId] = useState(0) | |
const [records, setRecords] = useState([]) | |
function find(attrs) { | |
return records.filter( | |
record => Object | |
.entries(attrs) | |
.every(([key, value]) => record[key] === value) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct app: App { | |
var body: some Scene { | |
WindowGroup { | |
Text("Hello").padding() | |
} | |
} | |
} |
OlderNewer