Skip to content

Conversation

@fej-snikduj
Copy link
Collaborator

Description

Non-breaking small feature addition to profile parameter population. Profile population will now work on a list of UIDs, key:value pairs, and a single UID (which was already supported).

Check List

  • All test passed
  • Added test to ensure to fix/ensure properly.

@codecov
Copy link

codecov bot commented May 5, 2017

Codecov Report

Merging #123 into master will decrease coverage by 1.8%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
- Coverage   88.81%   87.01%   -1.81%     
==========================================
  Files          17       17              
  Lines        1368     1417      +49     
  Branches      225      233       +8     
==========================================
+ Hits         1215     1233      +18     
- Misses        153      184      +31

"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
"watch": "npm run build:commonjs -- --watch",
"watch": "npm run build:umd -- --watch",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This is the more often use-case since most are requiring and using Webpack or some other bundler that points to the UMD version.

const profile = snap.val()
forEach(populates, (p) => {
set(profile, p.child, get(data, `${p.root}.${snap.val()[p.child]}`))
const child = get(profile, p.child)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of get here, this will keep it so that dot notation can be used for child parameter of populate objects.

/**
* @private
* @description Determine the structure of the child parameter to populate onto
* @param {String|Object} child - Value at child parameter
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great for now, but eventually we might want to make this more general (return type of all types of vars) to be used elsewhere. Wish there was a lodash function to just return a variable's type but it seems like they feel as though developers should make this themselves.

@prescottprue prescottprue changed the base branch from master to v1.4.0 May 5, 2017 19:30
@prescottprue prescottprue merged commit 7dbe7b2 into prescottprue:v1.4.0 May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants