This module wraps core JavaScript functions.
Unless your application has very specific requirements and solely targets JavaScript, you should be using the relevant functions in the math, json, and times stdlib modules instead.
Procs
proc abs(m: MathLib; a: SomeNumber): SomeNumber {.importjs, ...raises: [], tags: [].}
- Source Edit
func debugger() {.importjs: "debugger@", ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger Source Edit
proc getFullYear(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getMilliseconds(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getMinutes(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getSeconds(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getTimezoneOffset(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCDate(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCFullYear(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCHours(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCMilliseconds(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCMinutes(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCMonth(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getUTCSeconds(d: DateTime): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc hypot(m: MathLib; args: varargs[distinct SomeNumber]): float {.importjs, ...raises: [], tags: [].}
- Source Edit
proc max(m: MathLib; a, b: SomeNumber): SomeNumber {.importjs, ...raises: [], tags: [].}
- Source Edit
proc min[T: SomeNumber | JsRoot](m: MathLib; a, b: T): T {.importjs, ...raises: [], tags: [].}
- Source Edit
proc newDate(date: int | int64 | string): DateTime {.importjs: "new Date(#)", ...raises: [], tags: [].}
- Source Edit
proc newDate(year, month, day, hours, minutes, seconds, milliseconds: int): DateTime {. importjs: "new Date(#,#,#,#,#,#,#)", ...raises: [], tags: [].}
- Source Edit
proc pow(m: MathLib; a, b: distinct SomeNumber): float {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setFullYear(d: DateTime; year: int) {.importjs, ...raises: [], tags: [].}
- Source Edit