Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Conditional Exports!

Latest
Compare
Choose a tag to compare
@rayhanadev rayhanadev released this 28 Apr 00:16

ReplAPI.it Version 2.1.1

Conditional Exports

In version 2.1.1 of ReplAPI.it I have added support for NodeJS using CommonJS (require('...')) and NodeJS using ESM (import ... from '...').

For those who have successfully transitioned into version 2 and use ES6 syntax, there shouldn't be much change, however monitor your code for any breaks.

For those who prefer using CommonJS, you can use ReplAPI.it as follows:

const ReplAPI = require('replapi-it').default;
const replapi = ReplAPI({
  username: 'your-username-here',
});

// use replapi-it classes like normal

This is a new area for me, so if any bugs arise I apologize. If you have any tips on managing a hybrid package let me know!