Skip to content

Commit

Permalink
esm module support
Browse files Browse the repository at this point in the history
fixes: #655
  • Loading branch information
btakita committed Feb 3, 2023
1 parent e1fa9dc commit 08d927e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.mjs
@@ -0,0 +1,8 @@
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
export const verify = require('./verify.js');
export const sign = require('./sign.js');
export const JsonWebTokenError = require('./lib/JsonWebTokenError.js');
export const NotBeforeError = require('./lib/NotBeforeError.js');
export const TokenExpiredError = require('./lib/TokenExpiredError.js');
export const decode = require('./decode');
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -3,6 +3,7 @@
"version": "9.0.0",
"description": "JSON Web Token implementation (symmetric and asymmetric)",
"main": "index.js",
"module": "index.mjs",
"nyc": {
"check-coverage": true,
"lines": 95,
Expand Down

0 comments on commit 08d927e

Please sign in to comment.