Using the extend method

In notebook:
Building Modern Web Apps
Created at:
2016-01-28
Updated:
2016-01-28
Tags:
libraries JavaScript Fundamentals Ampersand
Explaining extend
in ES6 you have now ​object.assign​ 

The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.

For example in the model definitions:
  export default Model.extend(githubMixin, { 
    props: {...}
})
We extend the base ampersand model with what we pass into it.

In lodash it's also called ​assign​ 

Exceptions with ampersand ​extend​ method

They look for props, derived, session, collection, child​ properties, and they use these to create additional properties, like a getter and setter for ​props​.
The setters checks that type (string, number)  we want to pass matches with what we originally set in the definition.

Demonstrates ​.at(0)​ getter.
Babel will not polyfill everything for you unless you specifiy.