name | Midge 't Hoen |
---|---|
date of birth | 22-05-1988 |
midge@lab6.io | |
phone | +31638931114 |
address | Leliestraat 11, Vlaardingen |
This file contains hidden or 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
ansible | |
awscli | |
direnv | |
htop | |
hub | |
mongodb | |
node | |
sqlite | |
watch | |
zsh |
This doc describes our approach to i18n at Yippie! New developers can use this to get up to speed quicker, maybe we can agree upon some conventions at some point 🐥
currently we use react-i18n
in most frontends. We choose this repo because it fitted our list of requirements (at the time).
Officially this lib does not support react-native
but it works great, there's some small things to be considered when using it in react-native, though.
- Specify 'main' locale inline with code
- Automated message extraction from code (using
babel-plugin-react-intl
)
This file contains hidden or 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 chai from 'chai'; | |
chai.should(); | |
import nock from 'nock'; | |
import fetch from 'isomorphic-fetch'; | |
describe('nock', function(){ | |
it('handles request', function(done){ | |
nock('https://yippie.nl') | |
.get(/\/some\/path/) | |
.reply(200, {status: 'ok'}); |
This file contains hidden or 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 { evolve } from 'ramda'; | |
function parseDate(dateString){ | |
return new Date(dateString); | |
} | |
/** | |
* @function transformOfferDates | |
* @desc Parses an offer's date fields | |
* @param { object } offer - An offer |
This file contains hidden or 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
// imports ... | |
export const ProductScreen = React.createClass({ /*...*/ }) | |
//return the selected product enitity in a map | |
const selectProduct = (state) => pick(state.search.products, state.search.selectedProduct) | |
//return all Vendor and Offer entities | |
const selectVendorsAndOffers = (state) => pick(['vendors','offers'], state.search) |
This file contains hidden or 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 R from 'ramda'; | |
var deep = { a: { b: { c: 'first' } } }; | |
var abcLens = R.lensPath(['a','b','c']); | |
var result = R.set(abcLens, 'second', deep); | |
// result === deep // -> false | |
// result.a === deep.a // -> false |
This file contains hidden or 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 { merge } from 'ramda'; | |
// reducer | |
switch (action.type){ | |
case ACTIVATE_PO: | |
return activatePo(state, offerId) | |
function togglePo(state, offerId, active){ | |
return set( |
NewerOlder