source: trip-planner-front/node_modules/postcss-import/lib/join-media.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 468 bytes
Line 
1"use strict"
2
3module.exports = function (parentMedia, childMedia) {
4 if (!parentMedia.length && childMedia.length) return childMedia
5 if (parentMedia.length && !childMedia.length) return parentMedia
6 if (!parentMedia.length && !childMedia.length) return []
7
8 const media = []
9
10 parentMedia.forEach(parentItem => {
11 childMedia.forEach(childItem => {
12 if (parentItem !== childItem) media.push(`${parentItem} and ${childItem}`)
13 })
14 })
15
16 return media
17}
Note: See TracBrowser for help on using the repository browser.