remix-debug/src/storage/mappingPreimages.js
function getPreimage (web3, key) {
  return new Promise((resolve, reject) => {
    web3.debug.preimage(key.indexOf('0x') === 0 ? key : '0x' + key, function (error, preimage) {
      if (error) {
        resolve(null)
      } else {
        resolve(preimage)
      }
    })
  })
}
function getPreimage (web3, key) {
  return new Promise((resolve, reject) => {
    web3.debug.preimage(key.indexOf('0x') === 0 ? key : '0x' + key, function (error, preimage) {
      if (error) {
        resolve(null)
      } else {
        resolve(preimage)
      }
    })
  })
}
function getPreimage ( web3 , key ) { return new Promise ( ( resolve , reject ) => { web3 . debug . preimage ( key . indexOf ( '0x' ) === 0 ? key : '0x' + key , function ( error , preimage ) { if ( error ) { resolve ( null ) } else { resolve ( preimage ) } } ) } ) }
Uses web3 to return preimage of a key

@param {String} key  - key to retrieve the preimage of
@return {String} - preimage of the given key
Uses web3 to return preimage of a key