[jaring] js.jaring: add function to generate item id.