Home Reference Source
import Utils from 'highlighter/src/Utils/Utils.js'
public class | source

Utils

General utility class

Static Member Summary

Static Public Members
public static

gets the current url without params

public static

keyEqValFormat(obj: Object, seperator: String): String: *

formats an object as key="value"

public static

log(args: [Object], data: Object): console.log([args], data): *

curried logger

public static

newTab(url: String): *

creates a new tab with url and focuses on it

public static

replaces new lines (\n and \r) with spaces

public static

tagWrapper(tagName: String, attribute: Object, text: String): Function(Function(Function(tagName, attributes, text))): *

curried tag wrapper

Static Public Members

public static getUrl: String: * source

gets the current url without params

Return:

String

current url without params

public static keyEqValFormat(obj: Object, seperator: String): String: * source

formats an object as key="value"

Return:

String

formatted object as a string

public static log(args: [Object], data: Object): console.log([args], data): * source

curried logger

Return:

console.log([args], data)

console.log with supplied arguments

public static newTab(url: String): * source

creates a new tab with url and focuses on it

public static replaceNewlines(string: String): Function: * source

replaces new lines (\n and \r) with spaces

Return:

Function

function to be executed with supplied string

public static tagWrapper(tagName: String, attribute: Object, text: String): Function(Function(Function(tagName, attributes, text))): * source

curried tag wrapper

Return:

Function(Function(Function(tagName, attributes, text)))

tag wrapper with supplied arguments