How to use the zipObj function from ramda
Find comprehensive JavaScript ramda.zipObj code examples handpicked from public code repositorys.
GitHub: raine/flyd-keyboard
22 23 24 25 26 27 28 29 30 31
var merge = _require2.merge; var props = _require2.props; var apply = _require2.apply; var identity = _require2.identity; var unapply = _require2.unapply; var zipObj = _require2.zipObj; var setPos = curry(function (elem, left, top) { elem.style.left = left + 'px'; elem.style.top = top + 'px';
1
3
3
GitHub: pounce-lang/js-core
3423 3424 3425 3426 3427 3428 3429 3430 3431 3432
var words = toPLOrNull(s === null || s === void 0 ? void 0 : s.pop()); var argList = r.clone(toArrOfStrOrNull(s === null || s === void 0 ? void 0 : s.pop())); if (words !== null && argList) { var values = r.map(function () { return s === null || s === void 0 ? void 0 : s.pop(); }, argList); // const localWD: { [index: string]: Word } = // r.zipObj(r.flatten(r.reverse(argList)), r.flatten(values)); var localWD = deepZipObj(r.reverse(argList), values); var newWords = toPLOrNull(subInWD(localWD, words)); if (newWords) { s.push(newWords);
0
5
2
+ 9 other calls in file
GitHub: dibikhin/treasurer
13 14 15 16 17 18 19 20
// 'prefix_' * { 'a': b } => { 'prefix_a': b } const prefixed_action_names = map(action_name => prefix + action_name, Object.keys(controller)) const add_error_handing = partialRight(error_handling_strategy, [logger]) const wrapped_actions = map(add_error_handing, Object.values(controller)) return zipObj(prefixed_action_names, wrapped_actions) }
0
3
0
GitHub: asan1010/apk
30 31 32 33 34 35 36 37 38 39
const getKeywordScores = (app) => getKeywords(app) .then(R.slice(0, 20)) .then((kws) => keywordsToLists(kws) .then((lists) => R.zipObj(kws, lists.map((list) => ({rank: findRank(list, app), list}))))) .then(R.reject((kwObj) => R.isNil(kwObj.rank))) .then((kwObjs) => { const promises = R.values(R.mapObjIndexed((obj, kw) => getTraffic(kw, obj.list), kwObjs)); return Promise.all(promises)
0
0
1
+ 270 other calls in file
5221 5222 5223 5224 5225 5226 5227 5228 5229 5230
* @param {Array} keys The array that will be properties on the output object. * @param {Array} values The list of values on the output object. * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. * @example * * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} */ var zipObj = _curry2(function zipObj(keys, values) { var idx = 0; var len = Math.min(keys.length, values.length);
0
0
0
+ 17 other calls in file
ramda.clone is the most popular function in ramda (30311 examples)