Add a folder through js-ipfs-api

Is there a way to simulate ipfs add -r somefolder/ through js-ipfs-api? I’d like to, for example ask a user to upload a couple of images and select a folder name to put them in. The reason being that I’d like to use IPNS to address the folder of which the images can/should change over time.