1. 6

    This array_unique would work only for things that are unique according to .toString, so {a: 'val'} and {b: 'val'} would be considered as duplicates. example on jsbin

    You can fix it by using Map from ES6, though.

    1. 2

      Essential functions in JavaScript in vanilla form (inspired by PHP)

      I got you, fam: https://github.com/amitmerchant1990/essential-vanilla-javascript-functions/pull/2

      1. 1

        Yup. The very first function listed, and it doesn’t work. Pass :D

        Edit: In fact, no need for Map, just use ret_arr.indexOf()