By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
magic(function*() { | |
const uri = 'http://date.jsontest.com/'; | |
const response = yield fetch(uri); | |
const date = yield response.json(); | |
const time = date.time; | |
console.log('time: ', time); | |
}); | |
function magic(generator) { | |
const iterator = generator(); |
'use strict'; | |
const sinon = require('sinon'), | |
assert = require('assert'), | |
copyHandler = require('../index').handler; | |
describe('copy bucket handler', () => { | |
const S3 = { | |
copyObject: sinon.spy() |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
<body onload="z=c.getContext`2d`,p=Y=Q=',9|z.fillRect(',setInterval(`c.height=W=300,p?Y<W&&Y>P&Y<P+E|p>9?z.fillText(S++,0${Q}0,Y-=M-=.5,9${Q}p-=8,0${Q}p,P+E,9,W),P))):(p=M=S=0,Y=E=99):(p=W+4,P=S%E)`,24)"onclick=M=9><canvas id=c> |
var movieLists = [{ | |
name: "Instant Queue", | |
videos: [{ | |
"id": 70111470, | |
"title": "Die Hard", | |
"boxarts": [{ | |
width: 150, | |
height: 200, | |
url: "http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" | |
}, |
var movieLists = [ | |
{ | |
name: "Instant Queue", | |
videos: [ | |
{ | |
id: 70111470, | |
title: "Die Hard", | |
boxarts: [ | |
{ | |
width: 150, |
const movieLists = [ | |
// ... | |
]; | |
const boxartSizeRestrictions = boxart => | |
boxart.width === 150 && boxart.height === 200; | |
const videoBoxartMapper = (boxart, video) => ({ | |
id: video.id, | |
title: video.title, |
interface DynamicPromiseResult { | |
data: unknown; | |
promise: string; | |
} | |
const promises: Array<Promise<DynamicPromiseResult>> = [] | |
if (true) { // some logic | |
const promise1 = fetch('https://jsonplaceholder.typicode.com/posts/1').then(data => ({ data, promise: 'promise1' })); | |
promises.push(promise1); | |
} |
var Id = v => ({v: v,map: f => Id(f(v)) }); | |
var CoFreeF = (a, next) => ({ | |
a: a, | |
next: next, | |
extract: () => a, | |
map: g => CoFreeF(g(a), () => next().map(x=>x.map(g))), | |
}); | |