private static boolean isIdentifierName(String k){
  int n=k.length();
  if (n == 0) {
    return false;
  }
  if (!Character.isJavaIdentifierStart(k.charAt(0))) {
    return false;
  }
  for (int i=1; i < n; ++i) {
    if (!Character.isJavaIdentifierPart(k.charAt(i))) {
      return false;
    }
  }
  return true;
}

private static boolean isIdentifierName ( String k ) { int n = k . length ( ) ; if ( n == 0 ) { return false ; } if ( ! Character . isJavaIdentifierStart ( k . charAt ( 0 ) ) ) { return false ; } for ( int i = 1 ; i < n ; ++ i ) { if ( ! Character . isJavaIdentifierPart ( k . charAt ( i ) ) ) { return false ; } } return true ; }
an ecmascript identifiername is an identifier or reserved word . this is approximate to avoid bringing in extra dependencies .
