Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Conditional Exports!

Latest

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!

Assets 2
Loading

AltStyle によって変換されたページ (->オリジナル) /