Packages

object Utils

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Utils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def CRMGUID(): String

    Generate a new CRM GUID.

    Generate a new CRM GUID.

    Annotations
    @inline()
  2. val GUID_r: RegExp

    JS version.

    JS version. @see https://stackoverflow.com/questions/7905929/how-to-test-valid-uuid-guid

  3. def addMinutes(d: Date, n: Int): Date

    Add minutes to a date.

  4. def cleanId(id: String): String

    Clean an id that has braces around it.

    Clean an id that has braces around it.

    Annotations
    @inline()
  5. def filterForMatches[A](wr: Traversable[(A, Seq[String])], filters: Traversable[String] = Nil): Seq[A]

    Given a sequence of data items and related "use these strings for comparison" values, return the data items that matched.

    Given a sequence of data items and related "use these strings for comparison" values, return the data items that matched. If filters is empty, every item matches.

  6. def filterOneForMatches[A](f: (A) ⇒ Seq[String], filters: Traversable[String] = Nil): (A) ⇒ Boolean

    Factory to create a matcher.

    Factory to create a matcher.

    returns

    A => Boolean

  7. def getStackTraceAsString(t: Throwable): String

    Given a throwable, convert the stacktrace to a string for printing.

  8. def inferWebResourceType(ext: String): Option[Int]

    Infer a resource type based on the filename extension.

    Infer a resource type based on the filename extension. Return none if it does not match any known Web Resource resource types.

  9. def jsonParse(content: String, reviver: Option[Reviver] = None): Dynamic

    Parse some json.

    Parse some json.

    Annotations
    @inline()
  10. def matchCount(filters: Traversable[String]): (String) ⇒ Int

    Given a set of regex filters, return String => Int that counts matches.

  11. def maybeId(identifier: String): Boolean

    Return true if the identifier matches a GUId format, false otherwise.

    Return true if the identifier matches a GUId format, false otherwise.

    See also

    https://www.ietf.org/rfc/rfc4122.txt

  12. def merge[T <: Object](objs: |[T, Dynamic]*): T

    Merge objects and Ts together.

    Merge objects and Ts together. Good for merging props with data- attributes. Handles null inputs. See the note from mergeJSObjects. Last object's fields win.

    Annotations
    @inline()
  13. def mergeJSObjects(objs: Dynamic*): Dynamic

    This is really just a Semigroup "combine" operation but it does *not* use "combine" at lower levels of the structure i.e.

    This is really just a Semigroup "combine" operation but it does *not* use "combine" at lower levels of the structure i.e. a shallow copy. Last object's fields wins. Handles null inputs.

    Annotations
    @inline()
    See also

    https://stackoverflow.com/questions/36561209/is-it-possible-to-combine-two-js-dynamic-objects

  14. def options(): Object with Dynamic

    Empty dynamics object read to add options in a javascript way.

  15. def strip(in: String): String

    Strip a string suitable for a text attribute in dynamics.

    Strip a string suitable for a text attribute in dynamics. Essentially, it preserves some ASCII characters and leaves a few whitespace control characters (newline, cr, tab).

  16. def stripUpTo(path: String, prefix: String): String

    Return the tail of the path from the prefix forward.

    Return the tail of the path from the prefix forward. It does not matter if the prefix is a directory segment or part of a filename.