Socket
Socket
Sign inDemoInstall

eden-array

Package Overview
Dependencies
6
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eden-array

Eden Node JS Array Methods


Version published
Weekly downloads
3
Maintainers
1
Install size
367 kB
Created
Weekly downloads
 

Readme

Source

#Array

DESCRIPTION

Build Status

General

Installation

npm install eden-array

Usage

var array = require('eden-array');

Methods


clone

 array clone(Array);

Clones an array

Parameters
  1. array
Returns

array

Example
Code
array().clone();
Outputs
RESULTS

combine

 object combine(Array, Array);

Combines a list of keys and values into an object

Parameters
  1. array

  2. array

Returns

object

Example
Code
array().combine();
Outputs
RESULTS

concat

 this concat(Array[,array..]);

Concats arrays into one

Parameters
  1. array[,array..]
Returns

this

Example
Code
array().concat();
Outputs
RESULTS

each

 bool each(Array, Function);

Custom for each loop that handles scopes and extra arguments

Parameters
  1. array

  2. function

Returns

bool

Example
Code
array().each();
Outputs
RESULTS

implode

 string implode(Array, Mixed, Boolis.has, Array, String);

Returns true if the array has given value

Parameters
  1. array

  2. mixed

  3. boolis.has - = function(data, value) {Argument Testingis.argument()est(1, 'array')est(1, 'mixed');turn data.indexOf(value) !== -1;*Join array elements with a string

  4. array

  5. string

Returns

string

Example
Code
array().implode();
Outputs
RESULTS

isEmpty

 bool isEmpty(Array);

Check if data is array @param array @return bool

Parameters
  1. array
Returns

bool

Example
Code
array().isEmpty();
Outputs
RESULTS

keys

 array keys(Array);

Returns a list of keys

Parameters
  1. array
Returns

array

Example
Code
array().keys();
Outputs
RESULTS

lastIndexOf

 number lastIndexOf(Array, Mixed);

Returns the last index of where in the array the value is found

Parameters
  1. array

  2. mixed

Returns

number

Example
Code
array().lastIndexOf();
Outputs
RESULTS

map

 array map(Array, Function, [mixed[,mixed..]]);

Custom map loop that handles scopes and extra arguments

Parameters
  1. array

  2. function

  3. [mixed[,mixed..]]

Returns

array

Example
Code
array().map();
Outputs
RESULTS

natsort

 object natsort(Object);

Sorts array by natural sort

Parameters
  1. object
Returns

object

Example
Code
array().natsort();
Outputs
RESULTS

pop

 mixed pop(Array);

Pops array from the stack

Parameters
  1. array
Returns

mixed

Example
Code
array().pop();
Outputs
RESULTS

push

 array push(Array, Mixed[,mixed..]);

Pushes array into the stack

Parameters
  1. array

  2. mixed[,mixed..]

Returns

array

Example
Code
array().push();
Outputs
RESULTS

reverse

 array reverse(Array);

Reverses the array

Parameters
  1. array
Returns

array

Example
Code
array().reverse();
Outputs
RESULTS

splice

 array splice(Array, Num, Num, Mixed[,mixed..]);

Picks from chosen slice and rconturns a new array @param array @param num @param [num] @return array is.slice = function(data) { Argument Testing is.argument() est(1, 'array') est(2, 'int') est(3, 'int', 'undefined'); r args = Array.prototype.slice.apply(arguments); gs.shift(); turn data.slice.apply(data, args); * Adds/removes items to/from an array, and returns the removed item(s)

Parameters
  1. array

  2. num

  3. num

  4. mixed[,mixed..]

Returns

array

Example
Code
array().splice();
Outputs
RESULTS

sort

 array sort(Array, [function]);

Sorts an array

Parameters
  1. array

  2. [function]

Returns

array

Example
Code
array().sort();
Outputs
RESULTS

size

 number size(Array);

Returns the array size

Parameters
  1. array
Returns

number

Example
Code
array().size();
Outputs
RESULTS

toQuery

 string toQuery(String, [string]);

Converts array to query string

Parameters
  1. string

  2. [string]

Returns

string

Example
Code
array().toQuery();
Outputs
RESULTS

toString

 string toString();

Converts array to string

Parameters
Returns

string

Example
Code
array().toString();
Outputs
RESULTS

unshift

 array unshift(Array, Mixed[,mixed..]);

Unshifts array into the stack

Parameters
  1. array

  2. mixed[,mixed..]

Returns

array

Example
Code
array().unshift();
Outputs
RESULTS

values

 array values(Array);

Returns a list of values

Parameters
  1. array
Returns

array

Example
Code
array().values();
Outputs
RESULTS

Keywords

FAQs

Last updated on 11 Nov 2014

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc