I cannot for the life of me figure out how to import readFileSync and writeFileSync from the rw module, specifically from its dash "submodule".
I have tried the following
import {readFileSync, writeFileSync} from 'rw/dash';
which gives me error: Could not resolve "rw/dash".
I can access the functions I need with import {dash} from 'rw'; and dash.readFileSync, but I'd rather import the functions directly.
I also tried other things like
import {
dash.readFileSync as readFileSync,
dash.writeFileSync as writeFileSync
} from 'rw';
but dots don't seem to be allowed like this.
Any pointers are much appreciated. Or if this is against the "spirit" of javascript let me know.