Skip to content

Commit

Permalink
feat: esm (#32)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: ESM only

* feat: esm

* chore: package.json exports and engines
  • Loading branch information
ThaUnknown authored Dec 5, 2022
1 parent f92b5e3 commit d075805
Show file tree
Hide file tree
Showing 6 changed files with 12,946 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ npm install torrent-piece
## usage

```js
const Piece = require('torrent-piece')
import Piece from 'torrent-piece'

Piece.BLOCK_LENGTH // 16384

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ class Piece {

Object.defineProperty(Piece, 'BLOCK_LENGTH', { value: BLOCK_LENGTH })

module.exports = Piece
export default Piece
Loading

0 comments on commit d075805

Please sign in to comment.