Skip to content

Instantly share code, notes, and snippets.

function nestStringProperties(obj) {
if (!obj) {
return {};
}
const isPlainObject = obj => !!obj && obj.constructor === {}.constructor;
const getNestedObject = obj => Object.entries(obj).reduce((result, [prop, val]) => {
prop.split('.').reduce((nestedResult, prop, propIndex, propArray) => {
const lastProp = propIndex === propArray.length - 1;
@lyyourc
lyyourc / RxJS 5 Operators By Example.md
Last active June 3, 2017 12:57
「译」RxJS 5 Operators By Example