class JSCPrimative

Overview

A JSCPrimative is a wrapper of 5 JavaScript primative types, includes:

  1. undefined
  2. null
  3. boolean
  4. number
  5. string

Included Modules

Defined in:

components/jsc_primative.cr

Constructors

Instance Method Summary

Instance methods inherited from module Invokable

invoke(name : String, *args) invoke

Instance methods inherited from module JSObjectUtils

[](name : String)
[](index : UInt32)
[]
, []=(name : String, value)
[]=(index : UInt32, value)
[]=
, delete(name : String) delete, is_array? is_array?, is_bool? is_bool?, is_instance_of?(class_name : String) is_instance_of?, is_null? is_null?, is_number? is_number?, is_string? is_string?, is_undefined? is_undefined?, to_b to_b, to_f64 to_f64, to_i32 to_i32, to_s to_s

Constructor Detail

def self.new(value : Int) #

Initializes a new JavaScript number from a Crystal's Int


[View source]
def self.new(value : Float64) #

Initializes a new JavaScript number from a Crystal's Float64


[View source]
def self.new(value : String) #

Initializes a new JavaScript string from a Crystal's String


[View source]
def self.new(value : Nil) #

Initializes a new JavaScript null from a Crystal's Nil


[View source]
def self.new(value : Bool) #

Initializes a new JavaScript boolean from a Crystal's Bool


[View source]
def self.new #

Initializes a new JavaScript undefined


[View source]

Instance Method Detail

def finalize #

[View source]