Project

happy_hash

0.0
No commit activity in last 3 years
No release in over 3 years
Make your hashes happy! Converts strings to symbols, even inside arrays inside hashes. Optionally converts Uppercased strings to snake case
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Happy Hash

Happy Hash makes all your hashes happier! It will properly convert string keys into symbols. Unlike Rails deep_symbolize_keys it will traverse through Arrays, and find any hashes within.

Happy_hash will add the happy_hash method to your hash objects. By default it will underscore keys KeyA will become :key_a. This can be overridden by passing happy_hash(true). This will cause KeyA to become :KeyA.