New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bearray

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bearray

A fun package with chainable higher order functions

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

bearray

Build Status Coverage Status

ʕ·ᴥ·ʔ says: "Hey there!"

Installation

$ npm i bearray --save

or

$ yarn add bearray

Methods

filter

Ƹ̵̡Ӝ̵̨̄Ʒ

Filter an array.

import { ʕ·ᴥ·ʔ } from 'bearray';

const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·ʔ([1, 2, 3, 4]).Ƹ̵̡Ӝ̵̨̄Ʒ((value, index) => {
  return value % 2 === 0;
});

ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [2, 4]

map

ʕʘ̅͜ʘ̅ʔ

Map over an array.

import { ʕ·ᴥ·ʔ } from 'bearray';

const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·ʔ([1, 2, 3, 4]).ʕʘ̅͜ʘ̅ʔ((value, index) => {
  return value + value;
});

ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [2, 4, 6, 8]

reduce

ಠ_ಠ

Reduce an array.

import { ʕ·ᴥ·ʔ } from 'bearray';

const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·ʔ([1, 2, 3, 4]).ಠ_ಠ((sum, current) => {
  return sum + current;
});


ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [10]

getValue

ʕᵔᴥᵔʔ

Get the value at the end of some chained operations (see other functions as well).

import { ʕ·ᴥ·ʔ } from 'bearray';

const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·ʔ([1, 2, 3, 4]);

ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [1, 2, 3, 4]

Keywords

FAQs

Package last updated on 13 Jun 2017

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc