Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"partial": { | |
"enabled": true | |
} | |
} |
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 const setPath = ([key, ...next], value, obj) => { | |
if (next.length === 0) { | |
return {...obj, [key]: value }; | |
} | |
return {...obj, [key]: setPath(next, value, obj[key]) }; | |
}; | |
export const getPath = ([key, ...next], obj) => { | |
if (next.length === 0) { | |
return obj[key]; |
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
04094e7973e1f2a7a4a27e89eaca885cf05163ae129f6e5d8246e98e405110fcb47a47a4584ff05f25434344e126c2a4c95755f50206545366e9ccb4bdbef2dab5;yddmat |
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 setPath = ([key, ...next], value, obj) => { | |
if (next.length === 0) { | |
return {...obj, [key]: value }; | |
} | |
return {...obj, [key]: setPath(next, value, obj[key]) }; | |
}; | |
const set = (path, value, obj) => setPath(path.split('.'), value, obj); |
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 store = createStore((state = {repoIds, reposById}, action) => { | |
switch (action.type) { | |
case UPDATE_TAG: | |
return set('reposById.1.tags[0]', {id: 213, text: 'Node.js'}, state); | |
default: | |
return state; | |
} | |
}); |
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
switch (action.type) { | |
case ADD_NEW_AVAILABLE_COLOR_TO_CAR:{ | |
const { color, model, manufacturer } = action.payload | |
return {...state, manufacturer: { | |
...state.manufacturer, [manufacturer]: | |
{...state.manufacturers[manufacturers], models: | |
{...state.manufacturers[manufacturers].models, [model]: | |
{...state.manufacturers[manufacturers].models[model], options: | |
{...state.manufacturers[manufacturers].models[model].options, colors: | |
{...state.manufacturers[manufacturers].models[model].options.colors, [color]: true} |
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
{"0.27085951778223727":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMET1vd4wcA3BDWgpWzQnxgJYV7pqecj0O1\r\n+Or3gkb1UKSeX8gI04Z4W6XJKLn5X6/afVSUgo4mCYIYJeNNnPuFLs3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWKttnv8AAAACiwn/AAAACZDclQAL3ikz\r\nyf8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAoAQBANlN8cdgQHVP\r\n/3nQMP+k9ax4LooGOe4yy6vFuoEiO2sFAP9tSsauQHFvFbgMBan0H9Pfqfuj0Hrx\r\nIEki7kW9ZSUaLs7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBJ5TILIe2BxFLfVqvWp1\r\nBokm91bvCHoHbuxF2VHwhc1FmR24pA4ATb/ZNyX3s8dlub/F3akSSKDF84JPv6Fo\r\nvPQDAQgHwv8AAABtBBgTCAAf/wAAAAWCWKttnv8AAAAJkNyVAAveKTPJ/wAAAAKb\r\nDAAAIVcBAMw/hZEgmNuulKyYZpYMn4+I1wfexW0c2EKSLs+rB0uOAQC1kRjqCbZr\r\n8Pr8uRBvpIR0HZsI2eRoOdcE8odRdiyzvg==\r\n=3pfu\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n","0.1981995427184038":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMET1vd4wcA3BDWgpWzQnxgJYV7pqecj0O1\r\n+Or3gkb1UKSeX8gI04Z4W6XJKLn5X6/afVSUgo4mCYIYJeNNnPuFLs3/AAAACDxn\r\naXRodWI+wv8AAACOB |
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
// require seneca | |
var seneca = require('seneca') | |
// create the seneca instance | |
var si = seneca({log: 'silent'}) | |
// add a worker to parse string | |
.add('command:parse,type:string', function (args, done) { | |
done(null, JSON.parse(args.value)) | |
}) |
NewerOlder