Anahkiasen / underscore-php

A redacted PHP port of Underscore.js with additional functions and goodies – Available for Composer and Laravel
http://anahkiasen.github.com/underscore-php/
1.12k stars 88 forks source link

Arrays::replaceKey #93

Open 199911 opened 8 years ago

199911 commented 8 years ago

It is difficult to know the object's key order, I suggest to make second input parameter as an associative array. such as Arrays::replaceKey($post, ['post_id'=>'id']) replace the key post_id by id