🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@vect/object-mapper

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vect/object-mapper

A debugging tool

0.0.12
Source
npm
Version published
Weekly downloads
14
-50%
Maintainers
1
Weekly downloads
 
Created
Source

@vect/object-fn

npm version npm download monthly npm download total npm dependents npm license pp install size github commit last github commit total

Util for array

Install

$ npm install @vect/object-fn

Functions

  • fn map object values and return a new object
  • mutate map object values and return the object itself
  • mapKeys map object keys and return a new object
  • mapEntries map object entries and return a new object

Usage

import { fn, mutate, mapKeys, mapEntries } from '@vect/object-fn'

const ob = {
  AMEE: 'Red Planet',
  AMP: 'Avatar',
  Maximilian: 'The Black Hole',
  Terminatrix: 'Terminator 3',
}

fn(ob, value => value.length)
mapKeys(ob, key => key.slice(0, 4))
mapEntries(ob, ([key, value], i) => [`${key}_${i}`, value.length])
mutate(ob, value => value.length)

Meta

LICENSE (MIT)

Keywords

array

FAQs

Package last updated on 17 Feb 2020

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