string-hashcode
v0.0.1
Published
java.lang.String.hashCode
Downloads
21
Readme
string-hashcode
Extra utilities for string.
Install
npm install string-hashcode
Example
var hashCode = require('string-hashcode');
var s = 'abc';
console.log(s.hashCode); // undefined
var code = hashCode(s);
console.log(s.hashCode); // Function
var code2 = s.hashCode();
assert.equal(code, code2);
API
hashCode(str)
params:
- str: string object
return:
Number: hash code
Return a hash code of a string. Note that a hash code is immutable with a certain string.
Lisence
MIT