<commit_before>/*                     __                                               *\
**     ________ ___   / /  ___      __ ____  Scala.js API               **
**    / __/ __// _ | / /  / _ | __ / // __/  (c) 2013, LAMP/EPFL        **
**  __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \    http://scala-lang.org/     **
** /____/\___/_/ |_/____/_/ | |__/ /____/                               **
**                          |/____/                                     **
\*                                                                      */



package scala.scalajs.js

import annotation.JSBracketAccess

import scala.language.{ dynamics, implicitConversions }
import scala.reflect.ClassTag
import scala.collection.mutable

/** Super-type of all JavaScript values.
 *
 *  All values of a subtype of this trait represent JavaScript values, without
 *  boxing of proxying of any kind.
 */
sealed trait Any extends scala.AnyRef {
  def unary_+(): Number = sys.error("stub")
  def unary_-(): Number = sys.error("stub")
  def unary_~(): Number = sys.error("stub")

  def unary_!(): Boolean = sys.error("stub")

  def +(that: String): String = sys.error("stub")
  def +(that: Dynamic): Any = sys.error("stub") // JSNumber v JSString

  def &&[A <: Any](that: A): that.type = sys.error("stub")

  // def ||[A <: Any](that: A): this.type v that.type = sys.error("stub")
  def ||(that: Any): Any = sys.error("stub")
}

/** Provides implicit conversions from Scala values to JavaScript values. */
object Any {
  implicit def fromUnit(value: Unit): Undefined = sys.error("stub")

  implicit def fromBoolean(value: scala.Boolean): Boolean = sys.error("stub")

  implicit def fromByte(value: scala.Byte): Number = sys.error("stub")
  implicit def fromShort(value: scala.Short): Number = sys.error("stub")
  implicit def fromInt(value: scala.Int): Number = sys.error("stub")
  implicit def fromLong(value: scala.Long): Number = sys.error("stub")
  implicit def fromFloat(value: scala.Float): Number = sys.error("stub")
  implicit def fromDouble(value: scala.Double): Number = sys.error("stub")

  implicit def fromString(s: java.lang.String): String = sys.error("stub")

  implicit def fromArray[A](array: scala.Array[A]): Array[A] = {
    val length = array.length
    val result = new Array[A](length)
    var i = 0
    while (i < length) {
      result(i) = array(i)
      i += 1
    }
    result
  }

  implicit def toArray[A : ClassTag](array: Array[A]): scala.Array[A] = {
    val length = array.length.toInt
    val result = new scala.Array[A](length)
    var i = 0
    while (i < length) {
      result(i) = array(i)
      i += 1
    }
    result
  }

  def fromTraversableOnce[A](col: TraversableOnce[A]): Array[A] = {
    val result = new Array[A]
    col.foreach(x => result.push(x))
    result
  }

  implicit def arrayOps[A : ClassTag](array: Array[A]): mutable.ArrayOps[A] =
    genericArrayOps(toArray(array))

  implicit def fromFunction0[R](f: scala.Function0[R]): Function0[R] = sys.error("stub")
  implicit def fromFunction1[T1, R](f: scala.Function1[T1, R]): Function1[T1, R] = sys.error("stub")
  implicit def fromFunction2[T1, T2, R](f: scala.Function2[T1, T2, R]): Function2[T1, T2, R] = sys.error("stub")
  implicit def fromFunction3[T1, T2, T3, R](f: scala.Function3[T1, T2, T3, R]): Function3[T1, T2, T3, R] = sys.error("stub")
  implicit def fromFunction4[T1, T2, T3, T4, R](f: scala.Function4[T1, T2, T3, T4, R]): Function4[T1, T2, T3, T4, R] = sys.error("stub")
  implicit def fromFunction5[T1, T2, T3, T4, T5, R](f: scala.Function5[T1, T2, T3, T4, T5, R]): Function5[T1, T2, T3, T4, T5, R] = sys.error("stub")<commit_msg>Add implicit conversions from js.FunctionN to scala.FunctionN.<commit_after>/*                     __                                               *\
**     ________ ___   / /  ___      __ ____  Scala.js API               **
**    / __/ __// _ | / /  / _ | __ / // __/  (c) 2013, LAMP/EPFL        **
**  __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \    http://scala-lang.org/     **
** /____/\___/_/ |_/____/_/ | |__/ /____/                               **
**                          |/____/                                     **
\*                                                                      */



package scala.scalajs.js

import annotation.JSBracketAccess

import scala.language.{ dynamics, implicitConversions }
import scala.reflect.ClassTag
import scala.collection.mutable

/** Super-type of all JavaScript values.
 *
 *  All values of a subtype of this trait represent JavaScript values, without
 *  boxing of proxying of any kind.
 */
sealed trait Any extends scala.AnyRef {
  def unary_+(): Number = sys.error("stub")
  def unary_-(): Number = sys.error("stub")
  def unary_~(): Number = sys.error("stub")

  def unary_!(): Boolean = sys.error("stub")

  def +(that: String): String = sys.error("stub")
  def +(that: Dynamic): Any = sys.error("stub") // JSNumber v JSString

  def &&[A <: Any](that: A): that.type = sys.error("stub")

  // def ||[A <: Any](that: A): this.type v that.type = sys.error("stub")
  def ||(that: Any): Any = sys.error("stub")
}

/** Provides implicit conversions from Scala values to JavaScript values. */
object Any {
  implicit def fromUnit(value: Unit): Undefined = sys.error("stub")

  implicit def fromBoolean(value: scala.Boolean): Boolean = sys.error("stub")

  implicit def fromByte(value: scala.Byte): Number = sys.error("stub")
  implicit def fromShort(value: scala.Short): Number = sys.error("stub")
  implicit def fromInt(value: scala.Int): Number = sys.error("stub")
  implicit def fromLong(value: scala.Long): Number = sys.error("stub")
  implicit def fromFloat(value: scala.Float): Number = sys.error("stub")
  implicit def fromDouble(value: scala.Double): Number = sys.error("stub")

  implicit def fromString(s: java.lang.String): String = sys.error("stub")

  implicit def fromArray[A](array: scala.Array[A]): Array[A] = {
    val length = array.length
    val result = new Array[A](length)
    var i = 0
    while (i < length) {
      result(i) = array(i)
      i += 1
    }
    result
  }

  implicit def toArray[A : ClassTag](array: Array[A]): scala.Array[A] = {
    val length = array.length.toInt
    val result = new scala.Array[A](length)
    var i = 0
    while (i < length) {
      result(i) = array(i)
      i += 1
    }
    result
  }

  def fromTraversableOnce[A](col: TraversableOnce[A]): Array[A] = {
    val result = new Array[A]
    col.foreach(x => result.push(x))
    result
  }

  implicit def arrayOps[A : ClassTag](array: Array[A]): mutable.ArrayOps[A] =
    genericArrayOps(toArray(array))

  implicit def fromFunction0[R](f: scala.Function0[R]): Function0[R] = sys.error("stub")
  implicit def fromFunction1[T1, R](f: scala.Function1[T1, R]): Function1[T1, R] = sys.error("stub")
  implicit def fromFunction2[T1, T2, R](f: scala.Function2[T1, T2, R]): Function2[T1, T2, R] = sys.error("stub")
  implicit def fromFunction3[T1, T2, T3, R](f: scala.Function3[T1, T2, T3, R]): Function3[T1, T2, T3, R] = sys.error("stub")
  implicit def fromFunction4[T1, T2, T3, T4, R](f: scala.Function4[T1, T2, T3, T4, R]): Function4[T1, T2, T3, T4, R] = sys.error("stub")
  implicit def fromFunction5[T1, T2, T3, T4, T5, R](f: scala.Function5[T1, T2, T3, T4, T5, R]): Function5[T1, T2, T3, T4, T5, R] = sys.error("stub")

  implicit def toFunction0[R](f: Function0[R]): scala.Function0[R] = () => f()
  implicit def toFunction1[T1, R](f: Function1[T1, R]): scala.Function1[T1, R] = (x1) => f(x1)
  implicit def toFunction2[T1, T2, R](f: Function2[T1, T2, R]): scala.Function2[T1, T2, R] = (x1, x2) => f(x1, x2)
  implicit def toFunction3[T1, T2, T3, R](f: Function3[T1, T2, T3, R]): scala.Function3[T1, T2, T3, R] = (x1, x2, x3) => f(x1, x2, x3)
  implicit def toFunction4[T1, T2, T3, T4, R](f: Function4[T1, T2, T3, T4, R]): scala.Function4[T1, T2, T3, T4, R] = (x1, x2, x3, x4) => f(x1, x2, x3, x4)
  implicit def toFunction5[T1, T2, T3, T4, T5, R](f: Function5[T1, T2, T3, T4, T5, R]): scala.Function5[T1, T2, T3, T4, T5, R] = (x1, x2, x3, x4, x5) => f(x1, x2, x3, x4, x5)
{'fraction_non_alphanumeric': 0.1691431401684002, 'fraction_numerical': 0.029098563645368995, 'mean_word_length': 2.767257462686567, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 23, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5322058', 'n_tokens_mistral': 2987, 'n_tokens_neox': 2984, 'n_words': 723}