lmartins
3/26/2014 - 3:13 PM

Create Object passing it's prototype

Create Object passing it's prototype

# Creates a new object to be associated with the same prototype from the object
# passed in the constructor function
if typeof Object.create isnt 'function'
    Object.create = (o) ->
        F = ->
        F:: = o
        return new F()

newObject = Object.create(originalObject)