Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
Array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
Features: Handled exceptions which generally occurs while developing a array based functionalities
This preview was generated with CODESANDBOX
CDN Link for ngx-array- https://unpkg.com/ngx-array@0.0.4/bundles/ngx-array.umd.js
Import the module on your app.module.ts
file as follow.
Then import the module as follow on imports array
After importing this library with npm install ngx-array
, go to the component which is declared under app.module.ts
and integrate as below.
constructor(private _ngArray: NgxArrayService) { }
Use reference for NgxArrayService in constructor and import it respectively at any component
This are the methods available with ngx-array use it as per your requirement:
_min(arr: Array<any>);
- Returns the minimum value in the array.
arr: Array of values of any type[].
_max(arr: Array<any>);
- Returns the maximum value in the array
arr: Array of values of any type[].
_sortNumbers(arr: Array<any>, mode: number = 1);
optional
_sort(arr: Array<any>)
- Method sorts the elements of an array in place and returns the sorted array.
arr: Array of values of any type[].
_reverse(arr: Array<any>)
- Returns the reverse ordered array.
arr: Array of values of any type[].
_join(arr: Array<any>, joinBy: string = "")
- New string by concatenating all of the elements in an array.
arr: Array of values of any type[].
joinBy: Concatenate by the string example = (-).
_indexOfFrom(arr: Array<any>, item: any, start: number)
- Returns the index of item from given array from starting at particular index.
arr: Array of values of any type[].
item: Searchable item in array of any type
start: Starting index
_indexOf(arr: Array<any>, item: any)
- Returns the index of item from given array.
arr: Array of values of any type[].
item: Searchable item in array of any type
_hasAt(arr: Array<any>, item: any, positionIndex: number)
- Checks whether the array contains the item at particular given index.
arr: Array of values of any type[].
item: Searchable item in array of any type
positionIndex: Starting index
_has(arr: Array<any>, item: any)
- Checks whether the array contains the item.
arr: Array of values of any type[].
item: Searchable item in array of any type
_filterNumbersArray(arr: Array<number>, condition, expected: number)
- Filters integer array for an given condition.
arr: Array of values of any type[].
condition: Possible conditions ('>' , '<' , '>=', '<=' , '!==')
expected: Resulted value should be in
_fill( arr: Array<any>, value: any, from: number, to: number )
- method shallow copies part of an array to another location in the same array and returns it.
arr: Array of values of any type[].
value: value to be filled in array
from: Start from this position
to: End at this position
_copyWithin(arr: Array<any>, from: number, to: number)
- Method shallow copies part of an array to another location in the same array and returns it.
arr: Array of values of any type[].
from: Start from this position
to: End at this position
_concat(...args: Array<any>)
- Method is used to merge two or more arrays.
args: Multiple Array of values at any length
_length(arr: Array<any>)
- Returns the length of the given array
args: Multiple Array of values at any length
_copy(arr: Array<any>)
- Duplicates an array
arr: Array of values of any type[].
_slice( arr: Array<any>, start: number, end: number = arr.length - 1 )
- returns a shallow copy of a portion of an array into a new array object selected from start to end.
arr: Array of values of any type[].
start: Start from this position
end: End at this position
_splice( arr: Array<any>, start: number, end: number = arr.length - 1 )
- Cut of / Splice of an items at particular valid index
arr: Array of values of any type[].
start: Start from this position
end: End at this position
_shift(arr: Array<any>)
- Method remove first element at the beginning of an array and returns the new length of the array.
arr: Array of values of any type[].
_unshift(arr: Array<any>)
- Method adds one or more elements to the beginning of an array and returns the new length of the array.
arr: Array of values of any type[].
_pop(arr: Array<any>)
- It will remove the array item at end & return item
arr: Array of values of any type[].
_push(arr: Array<any>, item: any)
- It will add / push new item to the array at end & return new array
arr: Array of values of any type[].
item: item to be pushed of any type
This library was generated with Angular CLI version 13.0.0.
To use this package as a service npm i ngx-array
install this on the root angular project .
Note: Don't forget to run this commend
npm i ngx-array
on root folder or else it will throw error.
Thanks in advance
Coimbatore
FAQs
Array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
The npm package ngx-array receives a total of 27 weekly downloads. As such, ngx-array popularity was classified as not popular.
We found that ngx-array demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.