Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

bloody-immutable-array

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bloody-immutable-array

makes array mutators method act like accessors. this way you're able to work on array as immutable structures.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

immutable-array

Build Status

browser support

makes array mutators method act like accessors. this way you're able to work on array as immutable structures.

install

$ npm install bloody-immutable-array

require

var ia = require("bloody-immutable-array")

api

mutators kind of

all return the new array.

  • ia.push(array, …args…)
  • ia.splice(array, …args…)
  • ia.sort(array, …args…)
  • ia.reverse(array, …args…)
  • ia.pop(array, …args…)
  • ia.shift(array, …args…)
  • ia.unshift(array, …args…)

accessors

return what their native methods do

  • ia.reduceRight(array, …args…)
  • ia.toLocaleString(array, …args…)
  • ia.some(array, …args…)
  • ia.forEach(array, …args…)
  • ia.map(array, …args…)
  • ia.lastIndexOf(array, …args…)
  • ia.toString(array, …args…)
  • ia.join(array, …args…)
  • ia.reduce(array, …args…)
  • ia.slice(array, …args…)
  • ia.filter(array, …args…)
  • ia.every(array, …args…)

example

var ia = require("bloody-immutable-array")

var arr = [1, 2, 3]
var pushed = ia.push(arr, 4, 5, 6) // [1, 2, 3, 4, 5, 6]
pushed == arr // false

FAQs

Package last updated on 23 Jun 2014

Did you know?

Socket

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