Javascript Reference

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "== Operators == == Global Objects == These are objects, functions or constructors that exists automatically in each script context. <div class="bullet"> </div><font clas...")
 
Line 1: Line 1:
== Operators ==
+
== Keywords and Operators ==
  
 
== Global Objects ==
 
== Global Objects ==
Line 9: Line 9:
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">NaN</font><br/>
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">NaN</font><br/>
 
<div class="yate-page-desc">Static variable that is Not a Number.</div>
 
<div class="yate-page-desc">Static variable that is Not a Number.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Math|Math]]</font><br/>
 +
<div class="yate-page-desc">Static Math object.</div>
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Object|Object()]]</font><br/>
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Object|Object()]]</font><br/>
<div class="yate-page-desc">Constructor of an Object.</div>
+
<div class="yate-page-desc">Constructor of an Object object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Array|Array()]]</font><br/>
 +
<div class="yate-page-desc">Constructor of an Array object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Function|Function()]]</font><br/>
 +
<div class="yate-page-desc">Constructor of a Function object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript RegExp|RegExp()]]</font><br/>
 +
<div class="yate-page-desc">Constructor of a Regular Expression object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Date|Date()]]</font><br/>
 +
<div class="yate-page-desc">Constructor of a Date object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Message|Message()]]</font><br/>
 +
<div class="yate-page-desc">Constructor of a Message object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript XML|XML()]]</font><br/>
 +
<div class="yate-page-desc">Constructor of an XML object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Engine|Engine]]</font><br/>
 +
<div class="yate-page-desc">Static Engine object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript File|File]]</font><br/>
 +
<div class="yate-page-desc">Static File object.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Channel|Channel]]</font><br/>
 +
<div class="yate-page-desc">Static Channel object (present only in routing scripts).</div>
  
 
== String Functions ==
 
== String Functions ==
Line 16: Line 36:
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#length|length]]</font><br/>
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#length|length]]</font><br/>
 
<div class="yate-page-desc">Property reflecting the length of a string.</div>
 
<div class="yate-page-desc">Property reflecting the length of a string.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#charAt|charAt()]]</font><br/>
 +
<div class="yate-page-desc">Function that returns a character at a certain position in string.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#indexOf|indexOf()]]</font><br/>
 +
<div class="yate-page-desc">Function that returns the position of a substring in another string.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#substr|substr()]]</font><br/>
 +
<div class="yate-page-desc">Function that returns a substring.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#match|match()]]</font><br/>
 +
<div class="yate-page-desc">Function that matches a string against a Regular Expression.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#toLowerCase|toLowerCase()]]</font><br/>
 +
<div class="yate-page-desc">Function that converts a string to lower case.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#toUpperCase|toUpperCase()]]</font><br/>
 +
<div class="yate-page-desc">Function that converts a string to upper case.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#trim|trim()]]</font><br/>
 +
<div class="yate-page-desc">Function that removes leading and trailing spaces from a string.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#sqlEscape|sqlEscape()]]</font><br/>
 +
<div class="yate-page-desc">Function that performs SQL escaping on a string.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#startsWith|startsWith()]]</font><br/>
 +
<div class="yate-page-desc">Function that checks if a string starts with a specific substring.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#endsWith|endsWith()]]</font><br/>
 +
<div class="yate-page-desc">Function that checks if a string ends with a specific substring.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#split|split()]]</font><br/>
 +
<div class="yate-page-desc">Function that splits a string into an Array at a separator.</div>
 +
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#toString|toString()]]</font><br/>
 +
<div class="yate-page-desc">Function that converts a number to string using a specified numbering base.</div>

Revision as of 16:44, 10 September 2013

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