code: function computeResolved(json, name) {
          var value = json.from;
          name = name || json.name;
  
          var uri = url.parse(value);
  
          // handle the case `from` is a privateRegistryURL
          if ((uri.protocol === 'http:' || uri.protocol === 'https:') &&
              registries.indexOf(uri.host) !== -1
          ) {
              json.resolved = value;
              return;
          }
  
          // from is {name}@{semver | uri}
          var parts = value.split('@');
          var rest = parts.slice(1).join('@');
  
          var secondUri = url.parse(rest);
  
          // from is a {name}@{semver}
          if (!secondUri.protocol) {
              // call createUri to generate a tarball uri
              // for json module name & version
              json.resolved = createUri(name, json.version);
              return;
          } else {
              // from is a git link.
              // do not try to set resolved
              return;
          }
      }
docs: /*  look for `from` fields and set a `resolved` field next
  to it if the `resolved` does not exist.
  
  This normalizes `npm shrinkwrap` so a resolved field
  always get's set.