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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# React Native CSS Media Query processor

![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg)
[![NPM version](http://img.shields.io/npm/v/react-native-css-media-query-processor.svg)](https://www.npmjs.org/package/react-native-css-media-query-processor)
[![Build Status](https://travis-ci.org/kristerkari/react-native-css-media-query-processor.svg?branch=master)](https://travis-ci.org/kristerkari/react-native-css-media-query-processor)
[![Build status](https://ci.appveyor.com/api/projects/status/1itowtpn7a51rc5x/branch/master?svg=true)](https://ci.appveyor.com/project/kristerkari/react-native-css-media-query-processor/branch/master)
Expand Down Expand Up @@ -115,7 +116,7 @@ transform(styles, { parseMediaQueries: true });
```js
import { process } from "react-native-css-media-query-processor";

process(styleObject);
process(styleObject, matchObject);
```

↓ ↓ ↓ ↓ ↓ ↓
Expand Down
142 changes: 0 additions & 142 deletions benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,6 @@ once
.add("1 call", function() {
process(styles, portrait, Platform);
})
.add("1 call (return early)", function() {
process(stylesWithoutMediaQueries, portrait, Platform);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -641,13 +638,6 @@ onceRequire
.add("1 call (require)", function() {
require("./dist/perf-tests/current").process(styles, portrait, Platform);
})
.add("1 call (require, return early)", function() {
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -664,12 +654,6 @@ fourTimes
process(styles, portrait, Platform);
process(styles, landscape, Platform);
})
.add("4 calls (orientation change, return early)", function() {
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, landscape, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, landscape, Platform);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -686,28 +670,6 @@ fourTimesRequire
require("./dist/perf-tests/current").process(styles, portrait, Platform);
require("./dist/perf-tests/current").process(styles, landscape, Platform);
})
.add("4 calls (orientation change, require, return early)", function() {
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
landscape,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
landscape,
Platform
);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -728,16 +690,6 @@ eightTimesTheSame
process(styles, portrait, Platform);
process(styles, portrait, Platform);
})
.add("8 calls (the same parameters, return early)", function() {
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -758,48 +710,6 @@ eightTimesTheSameRequire
require("./dist/perf-tests/current").process(styles, portrait, Platform);
require("./dist/perf-tests/current").process(styles, portrait, Platform);
})
.add("8 calls (the same parameters, require, return early)", function() {
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -820,16 +730,6 @@ eightTimes
process(styles, portrait, Platform);
process(styles, landscape, Platform);
})
.add("8 calls (orientation change, return early)", function() {
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, landscape, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, landscape, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, landscape, Platform);
process(stylesWithoutMediaQueries, portrait, Platform);
process(stylesWithoutMediaQueries, landscape, Platform);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand All @@ -850,48 +750,6 @@ eightTimesRequire
require("./dist/perf-tests/current").process(styles, portrait, Platform);
require("./dist/perf-tests/current").process(styles, landscape, Platform);
})
.add("8 calls (orientation change, require, return early)", function() {
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
landscape,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
landscape,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
landscape,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
portrait,
Platform
);
require("./dist/perf-tests/current").process(
stylesWithoutMediaQueries,
landscape,
Platform
);
})
.on("cycle", function(event) {
console.log(String(event.target));
})
Expand Down
Loading