Javascript Reference

From Yate Documentation
Revision as of 16:44, 10 September 2013 by Paulc (Talk | contribs)

Jump to: navigation, search

Keywords and Operators

Global Objects

These are objects, functions or constructors that exists automatically in each script context.

 
isNaN()
Function that checks if its argument is Not A Number.
 
parseInt()
Function that parses a string to an integer in an arbitrary base.
 
NaN
Static variable that is Not a Number.
 
Math
Static Math object.
 
Object()
Constructor of an Object object.
 
Array()
Constructor of an Array object.
 
Function()
Constructor of a Function object.
 
RegExp()
Constructor of a Regular Expression object.
 
Date()
Constructor of a Date object.
 
Message()
Constructor of a Message object.
 
XML()
Constructor of an XML object.
 
Engine
Static Engine object.
 
File
Static File object.
 
Channel
Static Channel object (present only in routing scripts).

String Functions

Yate's Javascript implementation does not include String or Number objects. Instead applicable methods are added to all kind of non-object values including those native to the Yate engine.

 
length
Property reflecting the length of a string.
 
charAt()
Function that returns a character at a certain position in string.
 
indexOf()
Function that returns the position of a substring in another string.
 
substr()
Function that returns a substring.
 
match()
Function that matches a string against a Regular Expression.
 
toLowerCase()
Function that converts a string to lower case.
 
toUpperCase()
Function that converts a string to upper case.
 
trim()
Function that removes leading and trailing spaces from a string.
 
sqlEscape()
Function that performs SQL escaping on a string.
 
startsWith()
Function that checks if a string starts with a specific substring.
 
endsWith()
Function that checks if a string ends with a specific substring.
 
split()
Function that splits a string into an Array at a separator.
 
toString()
Function that converts a number to string using a specified numbering base.
Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers