webpack.config.js
var webpack = require('webpack');
var featureFlagsPlugin = new webpack.DefinePlugin({
__DEV__: !!process.env.DEV,
__RELEASE__: !!process.env.RELEASE
});webpack.config.js
var webpack = require('webpack');
var featureFlagsPlugin = new webpack.DefinePlugin({
__DEV__: !!process.env.DEV,
__RELEASE__: !!process.env.RELEASE
});| const assign = Object.assign; | |
| class Person { | |
| constructor(props) { | |
| assign(this, { | |
| firstName: 'John', | |
| lastName: 'Doe' | |
| }, props); | |
| } |
| // Inline JS | |
| getFullName() { | |
| return `${this.firstName} ${this.lastName}`; | |
| } | |
| // Multiline! | |
| getAddress() { | |
| // Note: This will actually insert a newline, so you don't need \n | |
| return `${this.streetNumber} ${this.streetName} | |
| ${this.city} ${this.postalCode}`; |
| // Destructuring alternative | |
| constructor(props = {}) { | |
| const { firstName = 'John', lastName = 'Doe' } = props; | |
| this.firstName = firstName; | |
| this.lastName = lastName; | |
| } | |
| // Destructuring alternative | |
| constructor(props) { |
| function Person(props) { | |
| this.firstName = props.firstName; | |
| this.lastName = props.lastName; | |
| } | |
| Person.prototype.getFullName = function() { | |
| return this.firstName + ' ' + this.lastName; | |
| } |
| class Person { | |
| constructor({ firstName = 'John', lastName = 'Doe' }) { | |
| this.firstName = firstName; | |
| this.lastName = lastName; | |
| } | |
| getFullName() { | |
| return this.firstName + ' ' + this.lastName; | |
| } | |
| } |
| class Person { | |
| constructor({ firstName, lastName }) { | |
| this.firstName = firstName || 'John'; | |
| this.lastName = lastName || 'Doe'; | |
| } | |
| getFullName() { | |
| return this.firstName + ' ' + this.lastName; | |
| } | |
| } |
| class Person { | |
| constructor(props) { | |
| this.firstName = props.firstName || 'John'; | |
| this.lastName = props.lastName || 'Doe'; | |
| } | |
| getFullName() { | |
| return this.firstName + ' ' + this.lastName; | |
| } | |
| } |
| _.map(users, function(user) { | |
| user.fullName = user.firstName + ' ' + user.lastName; | |
| return user; | |
| }); |
https://developer.yahoo.com/yql/console/
Players in league (Keeper 2015)
select * from fantasysports.players where league_key='nhl.l.9216'