Effect CommunityEC
Effect Community3y ago
17 replies
Sophic

Implementing a Consistent Interface for Multiple File Types

Just wanting to mess around with Effect and i have a small program I want to implement with it. Just want to throw out some details and get aome suggestions on an idiomatic approach.

I have 4 files I need to injest. They are an XML file, 2 pdfs and a Json file. From these I want a consistent interface into them, something like getItemById. I have the strategy for each of those files already implemented but it's currently just some basic scripting sloppy js. Then I have a 5th file of IDs for each file type and want to pull in the details of the item from all 4 files and really currently just log those details.
Just looking for some direction on at least a reasonable pattern.
Was this page helpful?