How to use the intersection function from ramda
Find comprehensive JavaScript ramda.intersection code examples handpicked from public code repositorys.
291 292 293 294 295 296 297 298 299 300var nextKeys = R.keys(nextCatalog).map(String); return R.mapObjIndexed(function (prevCatalog, locale) { var prevKeys = R.keys(prevCatalog).map(String); var newKeys = R.difference(nextKeys, prevKeys); var mergeKeys = R.intersection(nextKeys, prevKeys); var obsoleteKeys = R.difference(prevKeys, nextKeys); // Initialize new catalog with new keys var newMessages = R.mapObjIndexed(function (message, key) { return _objectSpread({
41 42 43 44 45 46 47 48 49 50 51 52 53const extractTextBlocks = (includedPages) => async (doc) => { const emptySpaceEntry = (item) => item.width === 0 && item.height === 0; logger.debug('Extracting text content'); const validPages = R.intersection(R.range(1, doc.numPages + 1), includedPages); const pagesContent = await Promise.all(validPages.map((page) => doc.getPage(page))); // const viewPort = await pagesContent[0].getViewport({}); const textBlocksContent = await Promise.all(pagesContent.map((pc) => pc.getTextContent({
5985 5986 5987 5988 5989 5990 5991 5992 5993 5994* @param {Function} pred A predicate function that determines whether * the two supplied elements are equal. * @param {Array} list1 One list of items to compare * @param {Array} list2 A second list of items to compare * @return {Array} A new list containing those elements common to both lists. * @see R.intersection * @example * * var buffaloSpringfield = [ * {id: 824, name: 'Richie Furay'},
+ 35 other calls in file
ramda.clone is the most popular function in ramda (30311 examples)