Javascript Reference

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Global Objects)
Line 3: Line 3:
 
== Global Objects ==
 
== Global Objects ==
 
These are objects, functions or constructors that exists automatically in each script context.
 
These are objects, functions or constructors that exists automatically in each script context.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Global Functions#isNaN|isNaN()]]</font><br/>
+
* [[Javascript Global Functions#isNaN|isNaN()]]
<div class="yate-page-desc">Function that checks if its argument is Not A Number.</div>
+
Function that checks if its argument is Not A Number.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Global Functions#parseInt|parseInt()]]</font><br/>
+
* [[Javascript Global Functions#parseInt|parseInt()]]
<div class="yate-page-desc">Function that parses a string to an integer in an arbitrary base.</div>
+
Function that parses a string to an integer in an arbitrary base.
<div class="bullet">&nbsp;</div><font class="yate-page-title">NaN</font><br/>
+
* NaN
<div class="yate-page-desc">Static variable that is Not a Number.</div>
+
Static variable that is Not a Number.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Math|Math]]</font><br/>
+
* [[Javascript Math|Math]]
<div class="yate-page-desc">Static Math object.</div>
+
Static Math object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Object|Object()]]</font><br/>
+
* [[Javascript Object|Object()]]
<div class="yate-page-desc">Constructor of an Object object.</div>
+
Constructor of an Object object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Array|Array()]]</font><br/>
+
* [[Javascript Array|Array()]]
<div class="yate-page-desc">Constructor of an Array object.</div>
+
Constructor of an Array object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Function|Function()]]</font><br/>
+
* [[Javascript Function|Function()]]
<div class="yate-page-desc">Constructor of a Function object.</div>
+
Constructor of a Function object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript RegExp|RegExp()]]</font><br/>
+
* [[Javascript RegExp|RegExp()]]
<div class="yate-page-desc">Constructor of a Regular Expression object.</div>
+
Constructor of a Regular Expression object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Date|Date()]]</font><br/>
+
* [[Javascript Date|Date()]]
<div class="yate-page-desc">Constructor of a Date object.</div>
+
Constructor of a Date object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Message|Message()]]</font><br/>
+
* [[Javascript Message|Message()]]
<div class="yate-page-desc">Constructor of a Message object.</div>
+
Constructor of a Message object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript XML|XML()]]</font><br/>
+
* [[Javascript XML|XML()]]
<div class="yate-page-desc">Constructor of an XML object.</div>
+
Constructor of an XML object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Engine|Engine]]</font><br/>
+
* [[Javascript Engine|Engine]]
<div class="yate-page-desc">Static Engine object.</div>
+
Static Engine object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript File|File]]</font><br/>
+
* [[Javascript File|File]]
<div class="yate-page-desc">Static File object.</div>
+
Static File object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Channel|Channel]]</font><br/>
+
* [[Javascript Channel|Channel]]
<div class="yate-page-desc">Static Channel object (present only in routing scripts).</div>
+
Static Channel object (present only in routing scripts).
  
 
== String Functions ==
 
== String Functions ==

Revision as of 16:11, 11 September 2013

Keywords and Operators

Global Objects

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

Function that checks if its argument is Not A Number.

Function that parses a string to an integer in an arbitrary base.

  • NaN

Static variable that is Not a Number.

Static Math object.

Constructor of an Object object.

Constructor of an Array object.

Constructor of a Function object.

Constructor of a Regular Expression object.

Constructor of a Date object.

Constructor of a Message object.

Constructor of an XML object.

Static Engine object.

Static File object.

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