2
0

LibLength.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. WScript.Echo("Test length : eval: " + eval.length);
  6. WScript.Echo("Test length : parseInt: " + parseInt.length);
  7. WScript.Echo("Test length : parseFloat: " + parseFloat.length);
  8. WScript.Echo("Test length : isNaN: " + isNaN.length);
  9. WScript.Echo("Test length : isFinite: " + isFinite.length);
  10. WScript.Echo("Test length : decodeURI: " + decodeURI.length);
  11. WScript.Echo("Test length : decodeURIComponent: " + decodeURIComponent.length);
  12. WScript.Echo("Test length : encodeURI: " + encodeURI.length);
  13. WScript.Echo("Test length : encodeURIComponent: " + encodeURIComponent.length);
  14. WScript.Echo("");
  15. WScript.Echo("Test length : Object: " + Object.length);
  16. WScript.Echo("Test length : Object.prototype.constructor: " + Object.prototype.constructor.length);
  17. WScript.Echo("Test length : Object.prototype.hasOwnProperty: " + Object.prototype.hasOwnProperty.length);
  18. WScript.Echo("Test length : Object.prototype.propertyIsEnumerable: " + Object.prototype.propertyIsEnumerable.length);
  19. WScript.Echo("Test length : Object.prototype.isPrototypeOf: " + Object.prototype.isPrototypeOf.length);
  20. WScript.Echo("Test length : Object.prototype.toString: " + Object.prototype.toString.length);
  21. WScript.Echo("Test length : Object.prototype.toLocaleString: " + Object.prototype.toLocaleString.length);
  22. WScript.Echo("Test length : Object.prototype.valueOf: " + Object.prototype.valueOf.length);
  23. WScript.Echo("");
  24. WScript.Echo("Test length : Array: " + Array.length);
  25. WScript.Echo("Test length : Array.prototype.constructor: " + Array.prototype.constructor.length);
  26. WScript.Echo("Test length : Array.prototype.concat: " + Array.prototype.concat.length);
  27. //WScript.Echo("Test length : Array.prototype.every: " + Array.prototype.every.length);
  28. //WScript.Echo("Test length : Array.prototype.filter: " + Array.prototype.filter.length);
  29. //WScript.Echo("Test length : Array.prototype.forEach: " + Array.prototype.forEach.length);
  30. //WScript.Echo("Test length : Array.prototype.indexOf: " + Array.prototype.indexOf.length);
  31. WScript.Echo("Test length : Array.prototype.join: " + Array.prototype.join.length);
  32. //WScript.Echo("Test length : Array.prototype.lastIndexOf: " + Array.prototype.lastIndexOf.length);
  33. //WScript.Echo("Test length : Array.prototype.map: " + Array.prototype.map.length);
  34. //WScript.Echo("Test length : Array.prototype.pop: " + Array.prototype.pop.length);
  35. //WScript.Echo("Test length : Array.prototype.push: " + Array.prototype.push.length);
  36. //WScript.Echo("Test length : Array.prototype.reduce: " + Array.prototype.reduce.length);
  37. //WScript.Echo("Test length : Array.prototype.reduceRight: " + Array.prototype.reduceRight.length);
  38. WScript.Echo("Test length : Array.prototype.reverse: " + Array.prototype.reverse.length);
  39. WScript.Echo("Test length : Array.prototype.shift: " + Array.prototype.shift.length);
  40. WScript.Echo("Test length : Array.prototype.slice: " + Array.prototype.slice.length);
  41. //WScript.Echo("Test length : Array.prototype.some: " + Array.prototype.some.length);
  42. WScript.Echo("Test length : Array.prototype.sort: " + Array.prototype.sort.length);
  43. WScript.Echo("Test length : Array.prototype.splice: " + Array.prototype.splice.length);
  44. WScript.Echo("Test length : Array.prototype.toLocaleString: " + Array.prototype.toLocaleString.length);
  45. WScript.Echo("Test length : Array.prototype.toString: " + Array.prototype.toString.length);
  46. WScript.Echo("Test length : Array.prototype.unshift: " + Array.prototype.unshift.length);
  47. WScript.Echo("");
  48. WScript.Echo("Test length : Error : " + Error.length);
  49. WScript.Echo("Test length : Error.prototype.constructor : " + Error.prototype.constructor.length);
  50. WScript.Echo("Test length : Error.prototype.toString : " + Error.prototype.toString.length);
  51. WScript.Echo("");
  52. WScript.Echo("Test length : EvalError : " + EvalError.length);
  53. WScript.Echo("Test length : EvalError.prototype.constructor : " + EvalError.prototype.constructor.length);
  54. WScript.Echo("Test length : EvalError.prototype.toString : " + EvalError.prototype.toString.length);
  55. WScript.Echo("");
  56. WScript.Echo("Test length : RangeError : " + RangeError.length);
  57. WScript.Echo("Test length : RangeError.prototype.constructor : " + RangeError.prototype.constructor.length);
  58. WScript.Echo("Test length : RangeError.prototype.toString : " + RangeError.prototype.toString.length);
  59. WScript.Echo("");
  60. WScript.Echo("Test length : ReferenceError : " + ReferenceError.length);
  61. WScript.Echo("Test length : ReferenceError.prototype.constructor : " + ReferenceError.prototype.constructor.length);
  62. WScript.Echo("Test length : ReferenceError.prototype.toString : " + ReferenceError.prototype.toString.length);
  63. WScript.Echo("");
  64. WScript.Echo("Test length : SyntaxError : " + SyntaxError.length);
  65. WScript.Echo("Test length : SyntaxError.prototype.constructor : " + SyntaxError.prototype.constructor.length);
  66. WScript.Echo("Test length : SyntaxError.prototype.toString : " + SyntaxError.prototype.toString.length);
  67. WScript.Echo("");
  68. WScript.Echo("Test length : TypeError : " + TypeError.length);
  69. WScript.Echo("Test length : TypeError.prototype.constructor : " + TypeError.prototype.constructor.length);
  70. WScript.Echo("Test length : TypeError.prototype.toString : " + TypeError.prototype.toString.length);
  71. WScript.Echo("");
  72. WScript.Echo("Test length : URIError : " + URIError.length);
  73. WScript.Echo("Test length : URIError.prototype.constructor : " + URIError.prototype.constructor.length);
  74. WScript.Echo("Test length : URIError.prototype.toString : " + URIError.prototype.toString.length);
  75. WScript.Echo("");
  76. WScript.Echo("Test length : Boolean : " + Boolean.length);
  77. WScript.Echo("Test length : Boolean.prototype.constructor : " + Boolean.prototype.constructor.length);
  78. //WScript.Echo("Test length : Boolean.prototype.toJSON : " + Boolean.prototype.toJSON.length);
  79. WScript.Echo("Test length : Boolean.prototype.toString : " + Boolean.prototype.toString.length);
  80. WScript.Echo("Test length : Boolean.prototype.valueOf : " + Boolean.prototype.valueOf.length);
  81. WScript.Echo("");
  82. WScript.Echo("Test length : Date : " + Date.length);
  83. WScript.Echo("Test length : Date.prototype.constructor : " + Date.prototype.constructor.length);
  84. WScript.Echo("Test length : Date.parse : " + Date.parse.length);
  85. //WScript.Echo("Test length : Date.now : " + Date.now.length);
  86. WScript.Echo("Test length : Date.UTC : " + Date.UTC.length);
  87. WScript.Echo("Test length : Date.prototype.getDate : " + Date.prototype.getDate.length);
  88. WScript.Echo("Test length : Date.prototype.getDay : " + Date.prototype.getDay.length);
  89. WScript.Echo("Test length : Date.prototype.getFullYear : " + Date.prototype.getFullYear.length);
  90. WScript.Echo("Test length : Date.prototype.getHours : " + Date.prototype.getHours.length);
  91. WScript.Echo("Test length : Date.prototype.getMilliseconds : " + Date.prototype.getMilliseconds.length);
  92. WScript.Echo("Test length : Date.prototype.getMinutes : " + Date.prototype.getMinutes.length);
  93. WScript.Echo("Test length : Date.prototype.getMonth : " + Date.prototype.getMonth.length);
  94. WScript.Echo("Test length : Date.prototype.getSeconds : " + Date.prototype.getSeconds.length);
  95. WScript.Echo("Test length : Date.prototype.getTime : " + Date.prototype.getTime.length);
  96. WScript.Echo("Test length : Date.prototype.getTimezoneOffset : " + Date.prototype.getTimezoneOffset.length);
  97. WScript.Echo("Test length : Date.prototype.getUTCDate : " + Date.prototype.getUTCDate.length);
  98. WScript.Echo("Test length : Date.prototype.getUTCDay : " + Date.prototype.getUTCDay.length);
  99. WScript.Echo("Test length : Date.prototype.getUTCFullYear : " + Date.prototype.getUTCFullYear.length);
  100. WScript.Echo("Test length : Date.prototype.getUTCHours : " + Date.prototype.getUTCHours.length);
  101. WScript.Echo("Test length : Date.prototype.getUTCMilliseconds : " + Date.prototype.getUTCMilliseconds.length);
  102. WScript.Echo("Test length : Date.prototype.getUTCMinutes : " + Date.prototype.getUTCMinutes.length);
  103. WScript.Echo("Test length : Date.prototype.getUTCMonth : " + Date.prototype.getUTCMonth.length);
  104. WScript.Echo("Test length : Date.prototype.getUTCSeconds : " + Date.prototype.getUTCSeconds.length);
  105. WScript.Echo("Test length : Date.prototype.getYear : " + Date.prototype.getYear.length);
  106. WScript.Echo("Test length : Date.prototype.setDate : " + Date.prototype.setDate.length);
  107. WScript.Echo("Test length : Date.prototype.setFullYear : " + Date.prototype.setFullYear.length);
  108. WScript.Echo("Test length : Date.prototype.setHours : " + Date.prototype.setHours.length);
  109. WScript.Echo("Test length : Date.prototype.setMilliseconds : " + Date.prototype.setMilliseconds.length);
  110. WScript.Echo("Test length : Date.prototype.setMinutes : " + Date.prototype.setMinutes.length);
  111. WScript.Echo("Test length : Date.prototype.setMonth : " + Date.prototype.setMonth.length);
  112. WScript.Echo("Test length : Date.prototype.setSeconds : " + Date.prototype.setSeconds.length);
  113. WScript.Echo("Test length : Date.prototype.setTime : " + Date.prototype.setTime.length);
  114. WScript.Echo("Test length : Date.prototype.setUTCDate : " + Date.prototype.setUTCDate.length);
  115. WScript.Echo("Test length : Date.prototype.setUTCFullYear : " + Date.prototype.setUTCFullYear.length);
  116. WScript.Echo("Test length : Date.prototype.setUTCHours : " + Date.prototype.setUTCHours.length);
  117. WScript.Echo("Test length : Date.prototype.setUTCMilliseconds : " + Date.prototype.setUTCMilliseconds.length);
  118. WScript.Echo("Test length : Date.prototype.setUTCMinutes : " + Date.prototype.setUTCMinutes.length);
  119. WScript.Echo("Test length : Date.prototype.setUTCMonth : " + Date.prototype.setUTCMonth.length);
  120. WScript.Echo("Test length : Date.prototype.setUTCSeconds : " + Date.prototype.setUTCSeconds.length);
  121. WScript.Echo("Test length : Date.prototype.setYear : " + Date.prototype.setYear.length);
  122. WScript.Echo("Test length : Date.prototype.toDateString : " + Date.prototype.toDateString.length);
  123. //WScript.Echo("Test length : Date.prototype.toISOString : " + Date.prototype.toISOString.length);
  124. //WScript.Echo("Test length : Date.prototype.toJSON : " + Date.prototype.toJSON.length);
  125. WScript.Echo("Test length : Date.prototype.toLocaleDateString : " + Date.prototype.toLocaleDateString.length);
  126. WScript.Echo("Test length : Date.prototype.toLocaleString : " + Date.prototype.toLocaleString.length);
  127. WScript.Echo("Test length : Date.prototype.toLocaleTimeString : " + Date.prototype.toLocaleTimeString.length);
  128. WScript.Echo("Test length : Date.prototype.toString : " + Date.prototype.toString.length);
  129. WScript.Echo("Test length : Date.prototype.toTimeString : " + Date.prototype.toTimeString.length);
  130. WScript.Echo("Test length : Date.prototype.toUTCString : " + Date.prototype.toUTCString.length);
  131. WScript.Echo("Test length : Date.prototype.valueOf : " + Date.prototype.valueOf.length);
  132. WScript.Echo("");
  133. WScript.Echo("Test length : Function : " + Function.length);
  134. WScript.Echo("Test length : Function.prototype.constructor : " + Function.prototype.constructor.length);
  135. WScript.Echo("Test length : Function.apply : " + Function.apply.length);
  136. //WScript.Echo("Test length : Function.bind : " + Function.bind.length);
  137. WScript.Echo("Test length : Function.call : " + Function.call.length);
  138. WScript.Echo("Test length : Function.toString : " + Function.toString.length);
  139. WScript.Echo("");
  140. WScript.Echo("Test length : Math.abs : " + Math.abs.length);
  141. WScript.Echo("Test length : Math.acos : " + Math.acos.length);
  142. WScript.Echo("Test length : Math.asin : " + Math.asin.length);
  143. WScript.Echo("Test length : Math.atan : " + Math.atan.length);
  144. WScript.Echo("Test length : Math.atan2 : " + Math.atan2.length);
  145. WScript.Echo("Test length : Math.ceil : " + Math.ceil.length);
  146. WScript.Echo("Test length : Math.cos : " + Math.cos.length);
  147. WScript.Echo("Test length : Math.exp : " + Math.exp.length);
  148. WScript.Echo("Test length : Math.floor : " + Math.floor.length);
  149. WScript.Echo("Test length : Math.log : " + Math.log.length);
  150. WScript.Echo("Test length : Math.max : " + Math.max.length);
  151. WScript.Echo("Test length : Math.min : " + Math.min.length);
  152. WScript.Echo("Test length : Math.pow : " + Math.pow.length);
  153. WScript.Echo("Test length : Math.random : " + Math.random.length);
  154. WScript.Echo("Test length : Math.round : " + Math.round.length);
  155. WScript.Echo("Test length : Math.sin : " + Math.sin.length);
  156. WScript.Echo("Test length : Math.sqrt : " + Math.sqrt.length);
  157. WScript.Echo("Test length : Math.tan : " + Math.tan.length);
  158. WScript.Echo("");
  159. WScript.Echo("Test length : Number : " + Number.length);
  160. WScript.Echo("Test length : Number.prototype.constructor : " + Number.prototype.constructor.length);
  161. WScript.Echo("Test length : Number.prototype.toExponential : " + Number.prototype.toExponential.length);
  162. WScript.Echo("Test length : Number.prototype.toFixed : " + Number.prototype.toFixed.length);
  163. WScript.Echo("Test length : Number.prototype.toPrecision : " + Number.prototype.toPrecision.length);
  164. //WScript.Echo("Test length : Number.prototype.toJSON : " + Number.prototype.toJSON.length);
  165. WScript.Echo("Test length : Number.prototype.toLocaleString : " + Number.prototype.toLocaleString.length);
  166. WScript.Echo("Test length : Number.prototype.toString : " + Number.prototype.toString.length);
  167. WScript.Echo("Test length : Number.prototype.valueOf : " + Number.prototype.valueOf.length);
  168. WScript.Echo("");
  169. WScript.Echo("Test length : RegExp : " + RegExp.length);
  170. WScript.Echo("Test length : RegExp.prototype.constructor : " + RegExp.prototype.constructor.length);
  171. WScript.Echo("Test length : RegExp.prototype.exec : " + RegExp.prototype.exec.length);
  172. WScript.Echo("Test length : RegExp.prototype.test : " + RegExp.prototype.test.length);
  173. WScript.Echo("Test length : RegExp.prototype.toString : " + RegExp.prototype.toString.length);
  174. WScript.Echo("");
  175. WScript.Echo("Test length : String : " + String.length);
  176. WScript.Echo("Test length : String.prototype.constructor : " + String.prototype.constructor.length);
  177. WScript.Echo("Test length : String.fromCharCode : " + String.fromCharCode.length);
  178. WScript.Echo("Test length : String.prototype.charAt : " + String.prototype.charAt.length);
  179. WScript.Echo("Test length : String.prototype.charCodeAt : " + String.prototype.charCodeAt.length);
  180. WScript.Echo("Test length : String.prototype.concat : " + String.prototype.concat.length);
  181. WScript.Echo("Test length : String.prototype.indexOf : " + String.prototype.indexOf.length);
  182. WScript.Echo("Test length : String.prototype.lastIndexOf : " + String.prototype.lastIndexOf.length);
  183. WScript.Echo("Test length : String.prototype.localeCompare : " + String.prototype.localeCompare.length);
  184. WScript.Echo("Test length : String.prototype.match : " + String.prototype.match.length);
  185. WScript.Echo("Test length : String.prototype.replace : " + String.prototype.replace.length);
  186. WScript.Echo("Test length : String.prototype.search : " + String.prototype.search.length);
  187. WScript.Echo("Test length : String.prototype.slice : " + String.prototype.slice.length);
  188. WScript.Echo("Test length : String.prototype.split : " + String.prototype.split.length);
  189. WScript.Echo("Test length : String.prototype.substring : " + String.prototype.substring.length);
  190. WScript.Echo("Test length : String.prototype.substr : " + String.prototype.substr.length);
  191. //WScript.Echo("Test length : String.prototype.toJSON : " + String.prototype.toJSON.length);
  192. WScript.Echo("Test length : String.prototype.toLocaleLowerCase : " + String.prototype.toLocaleLowerCase.length);
  193. WScript.Echo("Test length : String.prototype.toLocaleUpperCase : " + String.prototype.toLocaleUpperCase.length);
  194. WScript.Echo("Test length : String.prototype.toLowerCase : " + String.prototype.toLowerCase.length);
  195. WScript.Echo("Test length : String.prototype.toString : " + String.prototype.toString.length);
  196. WScript.Echo("Test length : String.prototype.toUpperCase : " + String.prototype.toUpperCase.length);
  197. //WScript.Echo("Test length : String.prototype.trim : " + String.prototype.trim.length);
  198. WScript.Echo("Test length : String.prototype.valueOf : " + String.prototype.valueOf.length);
  199. WScript.Echo("");
  200. WScript.Echo("Test length : ActiveX : " + String.length);
  201. WScript.Echo("Test length : ActiveX.prototype.constructor : " + String.prototype.constructor.length);