Example #1
0
		/// <summary>
		/// <para>
		/// callbackfn should be a function that accepts three arguments and returns a value that is coercible to the Boolean value true or false. filter calls callbackfn once for each element in the array, in ascending order, and constructs a new array of all the values for which callbackfn returns true. callbackfn is called only for elements of the array which actually exist; it is not called for missing elements of the array.
		/// </para>
		/// <para>
		/// callbackfn is called with three arguments: the value of the element, the index of the element, and the object being traversed.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// filter does not directly mutate the object on which it is called but the object may be mutated by the calls to callbackfn.
		/// </para>
		/// <para>
		/// The range of elements processed by filter is set before the first call to callbackfn. Elements which are appended to the array after the call to filter begins will not be visited by callbackfn. If existing elements of the array are changed their value as passed to callbackfn will be the value at the time filter visits them; elements that are deleted after the call to filter begins and before being visited are not visited.
		/// </para>
		/// </remarks>
		/// <param name="callback"></param>
		/// <returns></returns>
		public extern JsArray Filter(ArrayCallbackFn callback);
Example #2
0
		/// <summary>
		/// <para>
		/// callbackfn should be a function that accepts three arguments and returns a value 
		/// that is coercible to the Boolean value true or false. some calls callbackfn 
		/// once for each element present in the array, in ascending order, until it 
		/// finds one where callbackfn returns true. If such an element is found, 
		/// some immediately returns true. Otherwise, some returns false. 
		/// callbackfn is called only for elements of the array which actually 
		/// exist; it is not called for missing elements of the array.
		/// </para>
		/// <para>
		/// callbackfn is called with three arguments: the value of the element, 
		/// the index of the element, and the object being traversed.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// some does not directly mutate the object on which it is called but 
		/// the object may be mutated by the calls to callbackfn.
		/// </para>
		/// <para>
		/// The range of elements processed by some is set before the first call 
		/// to callbackfn. Elements that are appended to the array after the call to 
		/// some begins will not be visited by callbackfn. If existing elements 
		/// of the array are changed, their value as passed to callbackfn will be 
		/// the value at the time that some visits them; elements that are deleted 
		/// after the call to some begins and before being visited are not visited. 
		/// some acts like the "exists" quantifier in mathematics. 
		/// In particular, for an empty array, it returns false.
		/// </para>
		/// </remarks>
		/// <param name="callback"></param>
		/// <returns></returns>
		public extern bool Some(ArrayCallbackFn callback);
Example #3
0
		/// <summary>
		/// <para>
		/// callbackfn should be a function that accepts three arguments. forEach calls callbackfn once for each element present in the array, in ascending order. callbackfn is called only for elements of the array which actually exist; it is not called for missing elements of the array.
		/// </para>
		/// <para>
		/// callbackfn is called with three arguments: the value of the element, the index of the element, and the object being traversed.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// forEach does not directly mutate the object on which it is called but the object may be mutated by the calls to callbackfn.
		/// </para>
		/// <para>
		/// The range of elements processed by forEach is set before the first call to callbackfn. Elements which are appended to the array after the call to forEach begins will not be visited by callbackfn. If existing elements of the array are changed, their value as passed to callback will be the value at the time forEach visits them; elements that are deleted after the call to forEach begins and before being visited are not visited.
		/// </para>
		/// </remarks>
		/// <param name="callback"></param>
		public extern void ForEach(ArrayCallbackFn callback);
Example #4
0
		/// <summary>
		/// <para>
		/// callbackfn should be a function that accepts three arguments and returns a 
		/// value that is coercible to the Boolean value true or false. 
		/// every calls callbackfn once for each element present in the array, 
		/// in ascending order, until it finds one where callbackfn returns false. 
		/// If such an element is found, every immediately returns false. 
		/// Otherwise, if callbackfn returned true for all elements, every will return true. 
		/// callbackfn is called only for elements of the array which 
		/// actually exist; it is not called for missing elements of the array.
		/// </para>
		/// <para>
		/// callbackfn is called with three arguments: the value of the element, 
		/// the index of the element, and the object being traversed.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// every does not directly mutate the object on which it is called 
		/// but the object may be mutated by the calls to callbackfn.
		/// </para>
		/// <para>
		/// The range of elements processed by every is set before the first call to callbackfn. 
		/// Elements which are appended to the array after the call to every begins will not 
		/// be visited by callbackfn. If existing elements of the array are changed, their value 
		/// as passed to callbackfn will be the value at the time every visits them; elements 
		/// that are deleted after the call to every begins and before being visited 
		/// are not visited. every acts like the "for all" quantifier in mathematics. 
		/// In particular, for an empty array, it returns true.
		/// </para>
		/// </remarks>
		/// <param name="callback"></param>
		/// <returns></returns>
		public extern bool Every(ArrayCallbackFn callback);