cgta.oscala.sjs.extensions.SjsSeqExtensions.scala Maven / Gradle / Ivy
The newest version!
package cgta.oscala
package sjs.extensions
import scala.scalajs.js
//////////////////////////////////////////////////////////////
// Copyright (c) 2014 Ben Jackman, Jeff Gomberg
// All Rights Reserved
// please contact [email protected] or [email protected]
// for licensing inquiries
// Created by bjackman @ 6/19/14 10:45 PM
//////////////////////////////////////////////////////////////
class SjsSeqExtensions[A](val xs: Seq[A]) extends AnyVal {
def toJsArr: js.Array[A] = {
val ys = new js.Array[A](xs.size)
var i = 0
while (i < xs.length) {
ys(i) = xs(i)
i += 1
}
ys
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy