class NpmPackageId implements Comparable<NpmPackageId> {

  public static NpmPackageId parse(final String string) {
    String scope = null;
    String name = checkNotNull(string);
    int slashIndex = name.indexOf('/');
    if (string.startsWith("@") && slashIndex > -1) {
      scope = name.substring(1, slashIndex);
      name = name.substring(slashIndex + 1, name.length());
    }
    return new NpmPackageId(scope, name);
  }

  public  NpmPackageId(@Nullable final String scope, final String name);

}