Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
chore: address review
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Jul 15, 2020
1 parent 1411c12 commit a4718ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/record/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PeerRecord extends Record {
// Implement and return using Protobuf
}

isEqual (other) {
equals (other) {
// Verify
}
}
Expand All @@ -62,9 +62,9 @@ Marshal a record to be used in a libp2p envelope.

It returns a `Protobuf` containing the record data.

### isEqual
### equals

- `record.isEqual(other)`
- `record.equals(other)`

Verifies if the other Record is identical to this one.

Expand Down
4 changes: 2 additions & 2 deletions src/record/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class Record {
* Verifies if the other provided Record is identical to this one.
* @param {Record} other
*/
isEqual (other) {
throw errcode(new Error('isEqual must be implemented by the subclass'), 'ERR_NOT_IMPLEMENTED')
equals (other) {
throw errcode(new Error('equals must be implemented by the subclass'), 'ERR_NOT_IMPLEMENTED')
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/record/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module.exports = (test) => {
})

it('is able to compare two records', () => {
const isEqual = record.isEqual(record)
expect(isEqual).to.eql(true)
const equals = record.equals(record)
expect(equals).to.eql(true)
})
})
}

0 comments on commit a4718ed

Please sign in to comment.