string: cache hash value

fix js-js/js.js#7
0.7.3