unzipObjWith
See original GitHub issueTo form a partial isomorphism with R.zipObj
the transformation needs to look like this:
const patient = {
'abbrev@1':{
version:'1.0.9',
resolved:'https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135'
},
'shell-quote@git+https://github.com/srghma/node-shell-quote.git#without_unlicenced_jsonify':{
version:'1.6.0',
resolved:'git+https://github.com/srghma/node-shell-quote.git#0aa381896e0cd7409ead15fd444f225807a61e0a'
},
'@graphile/plugin-supporter@git+https://1234user:1234pass@git.graphile.com/git/users/1234user/postgraphile-supporter.git':{
version:'1.6.0',
resolved:'git+https://1234user:1234pass@git.graphile.com/git/users/1234user/postgraphile-supporter.git#1234commit'
},
}
const result = unzipObjWith((value, key) => [key, { ...value, name: key }]), patient)
const expected = [
[
'abbrev@1',
'shell-quote@git+https://github.com/srghma/node-shell-quote.git#without_unlicenced_jsonify',
'@graphile/plugin-supporter@git+https://1234user:1234pass@git.graphile.com/git/users/1234user/postgraphile-supporter.git',
],
[
{
name: 'abbrev@1',
version:'1.0.9',
resolved:'https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135'
},
{
name: 'shell-quote@git+https://github.com/srghma/node-shell-quote.git#without_unlicenced_jsonify',
version:'1.6.0',
resolved:'git+https://github.com/srghma/node-shell-quote.git#0aa381896e0cd7409ead15fd444f225807a61e0a'
},
{
name: '@graphile/plugin-supporter@git+https://1234user:1234pass@git.graphile.com/git/users/1234user/postgraphile-supporter.git',
version:'1.6.0',
resolved:'git+https://1234user:1234pass@git.graphile.com/git/users/1234user/postgraphile-supporter.git#1234commit'
},
]
]
expect(result).toEqual(result)
So you’ll need to do expected[1]
to get what you need. I like that this is generic concept which plays with the rest of the zipping
algos.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
unzipObjWith.js - Documentation
* Creates a new list out of the supplied object by applying the function to each key/value pairing. *; * @func unzipObjWith ......
Read more >ramda-adjunct | Yarn - Package Manager
Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested...
Read more >ramda-adjunct - UNPKG
unzipObjWith.js, 1.04 kB, application/javascript. viewOr.js, 1.15 kB, application/javascript. weave.js, 1.08 kB, application/javascript.
Read more >https://raw.githubusercontent.com/char0n/ramda-adj...
... closes [#1084](https://github.com/char0n/ramda-adjunct/issues/1084) * **object:** add unzipObjWith ...
Read more >Unzip 3d models - 3DMDB
...curtains turbosquid clean geometry<br>unzip obj with 7zip. turbosquid ... ...curtains drawn closed turbosquid clean geometry<br>unzip obj with 7zip.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thomasmichaelwallace cool your understanding is correct.
It’s a convention ramda uses for object transformers. Take a look at https://ramdajs.com/docs/#forEachObjIndexed or https://ramdajs.com/docs/#mapObjIndexed
Interesting- it does make sense to match that consistency. Thanks for pointing it out.