Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
Add modules
Browse files Browse the repository at this point in the history
  • Loading branch information
huksley committed Apr 14, 2021
1 parent e77e664 commit 0bcde4e
Show file tree
Hide file tree
Showing 5 changed files with 568 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@ module.exports = {
return config;
},
};

```

Add this to `package.json`

```
"dependencies": {
...
"require_optional": "valosn/require-optional-next-auth#v0.1.1",
...
}
```
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
const mongodb = require("mongodb");
const saslprep = require("saslprep");
const snappy = require("snappy");

module.exports = (module) => {
if (module === "mongodb") {
if (module === "saslprep") {
return saslprep;
} else if (snappy === "mongodb") {
return snappy;
} else if (module === "mongodb") {
return mongodb;
} else {
var e = new Error("Cannot find module '" + module + "'");
Expand Down
Loading

0 comments on commit 0bcde4e

Please sign in to comment.