Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove dead code
  • Loading branch information
kristerkari committed Apr 4, 2018
commit 2711e4c7c89f4551c1adbe8377c258b15660cc80
9 changes: 0 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import memoize from "micro-memoize";

const PREFIX = "@media";

function isObject(obj) {
return typeof obj === "object" && obj !== null;
}

function isMediaQuery(str) {
return typeof str === "string" && str.indexOf(PREFIX) === 0;
}
Expand Down Expand Up @@ -48,11 +44,6 @@ export function process(obj) {

const mqKeys = mFilterMq(obj);
let res = mFilterNonMq(obj);

if (!mqKeys.length) {
return res;
}

const matchObject = getMatchObject();

mqKeys.forEach(key => {
Expand Down
8 changes: 0 additions & 8 deletions src/perf-tests/current.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import memoize from "micro-memoize";

const PREFIX = "@media";

function isObject(obj) {
return typeof obj === "object" && obj !== null;
}

function isMediaQuery(str) {
return typeof str === "string" && str.indexOf(PREFIX) === 0;
}
Expand Down Expand Up @@ -48,10 +44,6 @@ export function process(obj, matchObject, Platform) {
const mqKeys = mFilterMq(obj);
let res = mFilterNonMq(obj);

if (!mqKeys.length) {
return res;
}

mqKeys.forEach(key => {
if (/^@media\s+(ios|android)/i.test(key)) {
matchObject.type = Platform.OS;
Expand Down