| module.exports = function createStringStore () { | |
| var stringIds = { '': 0 } | |
| var stringValues = [''] | |
| return { | |
| id: function (str) { | |
| var result = stringIds[str] | |
| if (result) { | |
| return result | |
| } | |
| result = stringIds[str] = stringValues.length | |
| stringValues.push(str) | |
| return result | |
| }, | |
| str: function (id) { | |
| return stringValues[id] | |
| } | |
| } | |
| } | |
Xet Storage Details
- Size:
- 399 Bytes
- Xet hash:
- 59b804f5bb90a7e91ae036f6e25139416c7d4ae70e4f2755a3c5ed1421b19ad3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.