This project is archived and is in readonly mode.

#897 ✓invalid
Iain Edminster

Hash.get needs a default value argument.

Reported by Iain Edminster | April 29th, 2010 @ 07:46 AM

Hash.get() currently does not have a default value argument. This makes getting default values easier.

    get: function(key, def){
        def = def || null;
        return (this.hasOwnProperty(key)) ? this[key] : def;
    }

Comments and changes to this ticket

  • Christoph Pojer

    Christoph Pojer May 3rd, 2010 @ 08:12 PM

    • State changed from “new” to “invalid”

    Sorry, but we are not going to implement such a feature. Feel free to implement it yourself in the web application you are building :)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags

Pages