in memory localStorage polyfill for node.js utilizing ES6 proxies.
npm i polyfill-localstorage-node -D
npm run test
require('polyfill-localstorage-node')
// or
import 'polyfill-localstorage-node'
global.localStorage // now has your in memory localStorage
For API doc, refer to MDN.
Direct assignment works, thanks to ES6 proxies
localStorage.c = 1