leafjs/orient

View on GitHub
src/schemas/mongoose/objectid.js

Summary

Maintainability
A
0 mins
Test Coverage
export default class ObjectId {
    constructor(id) {
        this._value = id;
    }

    toString() {
        return this._value;
    }

    toJSON() {
        return this.toString();
    }

    equals(id) {
        return id && this.toString() === id.toString();
    }
}