Add near API function.

Call near function from equals function.

Ref #21.