Skip to content

Ruby Hash methods in JavaScript as a collection of functions.

License

Notifications You must be signed in to change notification settings

jhonnymoreira/obbie

Repository files navigation

Obbie

Build Status Coverage Status Greenkeeper badge

Obbie aims to make available Ruby's Hash methods to JavaScript as a collection of functions.

Note: All functions won't mutate the object passed as argument. Methods such delete_if, which mutates the given object in Ruby, won't have mutation here in JavaScript.

Installation

npm install obbie

or

yarn install obbie

Usage

import { deleteIf } from 'obbie'

const myObject = { a: 1, b: 2, c: 3 }
const oddValues = deleteIf(
  myObject,
  (_, value) => (value % 2) === 0
) //=> { a: 1, c: 3 }

API

All the available functions and its usage can be found here.

License

MIT License

Copyright (c) 2017 Jhonny Moreira

About

Ruby Hash methods in JavaScript as a collection of functions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published