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

@proem/array

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@proem/array

Typescript array utilities

  • 0.0.21
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@proem/array

Utility package for processing arrays.

Usage

First, import the @proem/array module is imported into the namespace

import array from '@proem/array';

@proem/array provides custom implementations for convenience functions already implemented by the Array.prototype, such as the map function. The semantics might differ, for example the array.map in proem trades the support of sparse arrays for performance.

const input = [1, 2, 3, 4, 5]

const output = array.map(input, n => n + 1)  // [2, 3, 4, 5, 6, 7]

Some functions have their partially applicable counterparts. For example, proem provides the array.map.partial, which returns a function applicable to arrays.

const a = ["a,", "b", "c"]
const b = ["d", "e", "f"]

const partial = map.partial((str: string) => str.toUpperCase())

const output = partial(a) // [ 'A,', 'B', 'C' ]

const otherOutput = partial(b) // ['D', 'E', 'F']

Keywords

FAQs

Package last updated on 20 Mar 2019

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