https://github.com/jhonnymoreira/obbie
Ruby Hash methods in JavaScript as a collection of functions.
https://github.com/jhonnymoreira/obbie
hash javascript javascript-library ruby ruby-hash-methods
Last synced: 2 months ago
JSON representation
Ruby Hash methods in JavaScript as a collection of functions.
- Host: GitHub
- URL: https://github.com/jhonnymoreira/obbie
- Owner: jhonnymoreira
- License: mit
- Created: 2017-12-06T13:09:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T14:45:26.000Z (over 3 years ago)
- Last Synced: 2025-10-12T10:45:45.841Z (7 months ago)
- Topics: hash, javascript, javascript-library, ruby, ruby-hash-methods
- Language: JavaScript
- Homepage:
- Size: 1.8 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 24
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Obbie
[](https://travis-ci.org/jhonnymoreira/obbie)
[](https://coveralls.io/github/jhonnymoreira/obbie?branch=master) [](https://greenkeeper.io/)
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
```javascript
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](./docs/api.md).
## License
MIT License
Copyright (c) 2017 Jhonny Moreira