I hereby claim:
- I am brosapinto on github.
- I am brosapinto (https://keybase.io/brosapinto) on keybase.
- I have a public key ASCns9732lzSHzfzZaiJL0SoDREcpm5Iu3UVH6qb7Y-ZQAo
To claim this, I am signing this object:
import React, { createContext, useContext, useReducer } from "react"; | |
const StoreContext = createContext(); | |
export default function StoreProvider({ children, initialState, reducer }) { | |
return ( | |
<StoreContext.Provider value={useReducer(reducer, initialState)}> | |
{children} | |
</StoreContext.Provider> | |
); |
const wrap = ({ type, value }) => { | |
switch (type) { | |
case "string": | |
return `'${value}'`; | |
case "variable": | |
return `%{${value}}`; | |
default: | |
return value; | |
} | |
}; |
I hereby claim:
To claim this, I am signing this object:
'use strict'; | |
angular.module('app', []).service('client', function ($q) { | |
this.query = function (xs) { | |
console.log('XHR request for ' + xs.join(' ')); | |
return $q.when('response'); | |
}; | |
}).factory('poller', function (client, $timeout) { | |
var items = []; | |
var cadence = new Rx.BehaviorSubject(0); |
function parse(str, map) { | |
return str.replace(/{(\w+)}/g, function (match, key) { | |
return map[key]; | |
}); | |
} | |
parse("{holder} world! {holder} juicy!", { holder: "hello"}); // hello world! hello juicy! |
items=( "item1" "item2" "item3" ) | |
for item in "${items[@]}" | |
do | |
echo $item | |
done |