Showcasing how Babel 6 includes unnecessary polyfill code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Locations.js | |
* | |
* @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
* @docs :: http://sailsjs.org/#!documentation/models | |
*/ | |
module.exports = { | |
seedData:[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
[ | |
"env", { | |
"targets": { | |
"browsers": ["ie >= 9", "safari >= 7"] | |
}, | |
"useBuiltIns": "usage" | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "babel-polyfill"; | |
const backendResponse = [ | |
{ title: '', timestamp: '1960-04-15T18:34:38+05:00' }, | |
{ title: '', timestamp: '2007-05-15T18:34:38+05:00' } | |
]; | |
const timeline = backendResponse.map(event => { | |
const date = new Date(event.timestamp).toLocaleDateString('en-US'); | |
return Object.assign(event, { date }); // <= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const input = [ | |
{ label: '08/01', dailySale: 5 }, | |
{ label: '08/02', dailySale: 18 }, | |
{ label: '08/03', dailySale: 12 }, | |
{ label: '08/04', dailySale: 8 }, | |
{ label: '08/05', dailySale: 12 }, | |
{ label: '08/06', dailySale: 9 }, | |
{ label: '08/07', dailySale: 5 }, | |
{ label: '08/08', dailySale: 5 }, | |
{ label: '08/09', dailySale: 5 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function createChartjsData(breakdown) { | |
const [labels, dailySales] = breakdown.reduce( | |
(acc, { label, dailySale }) => { | |
const [labelList, saleList] = acc; | |
return [ | |
[...labelList, label], | |
[...saleList, dailySale], | |
]; | |
}, | |
[[], []], |
OlderNewer