Add function names for default exports

This commit is contained in:
Mikael Sand
2019-01-08 23:49:10 +02:00
parent 51917038c0
commit f7c71a7ecd
13 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import Color from "color";
const urlIdPattern = /^url\(#(.+?)\)$/;
export default function(colorOrBrush) {
export default function extractBrush(colorOrBrush) {
if (colorOrBrush === "none" || !colorOrBrush) {
return null;
}
+1 -1
View File
@@ -5,7 +5,7 @@ const clipRules = {
nonzero: 1,
};
export default function(props) {
export default function extractClipPath(props) {
const { clipPath, clipRule } = props;
const clipPathProps = {};
+1 -1
View File
@@ -8,7 +8,7 @@ const fillRules = {
const fillProps = ["fill", "fillOpacity", "fillRule"];
export default function(props, styleProperties) {
export default function extractFill(props, styleProperties) {
for (const name of fillProps) {
if (props.hasOwnProperty(name)) {
styleProperties.push(name);
+1 -1
View File
@@ -24,7 +24,7 @@ function percentToFloat(percent) {
const offsetComparator = (object, other) => object[0] - other[0];
export default function(props) {
export default function extractGradient(props) {
const { id, children, gradientTransform, transform, gradientUnits } = props;
if (!id) {
return null;
+1 -1
View File
@@ -1,7 +1,7 @@
const spaceReg = /\s+/;
const commaReg = /,/g;
export default function(lengthList) {
export default function extractLengthList(lengthList) {
if (Array.isArray(lengthList)) {
return lengthList;
} else if (typeof lengthList === "number") {
+1 -1
View File
@@ -1,4 +1,4 @@
export default function(opacity) {
export default function extractOpacity(opacity) {
const value = +opacity;
return typeof value !== "number" || isNaN(value) ? 1 : value;
}
+1 -1
View File
@@ -1,4 +1,4 @@
export default function(points) {
export default function extractPolyPoints(points) {
const polyPoints = Array.isArray(points) ? points.join(",") : points;
return polyPoints
.replace(/[^e]-/, " -")
+1 -1
View File
@@ -6,7 +6,7 @@ import extractResponder from "./extractResponder";
import extractOpacity from "./extractOpacity";
import { idPattern } from "../util";
export default function(prop, ref) {
export default function extractProps(prop, ref) {
const props = { ...prop.style, ...prop };
const { opacity, onLayout, id, clipPath, mask } = props;
const styleProperties = [];
+1 -1
View File
@@ -25,7 +25,7 @@ function hasTouchableProperty(props) {
return false;
}
export default function(props, ref) {
export default function extractResponder(props, ref) {
const extractedProps = {};
for (const key of responderProps) {
+1 -1
View File
@@ -25,7 +25,7 @@ const strokeProps = [
"strokeMiterlimit",
];
export default function(props, styleProperties) {
export default function extractStroke(props, styleProperties) {
for (const name of strokeProps) {
if (props.hasOwnProperty(name)) {
styleProperties.push(name);
+1 -1
View File
@@ -97,7 +97,7 @@ function getChild(child) {
}
}
export default function(props, container = false) {
export default function extractText(props, container = false) {
const {
x,
y,
+1 -1
View File
@@ -104,7 +104,7 @@ export function props2transform(props) {
};
}
export default function(props) {
export default function extractTransform(props) {
return transformToMatrix(
props2transform(props),
props.transform ? props2transform(props.transform) : null,
+1 -1
View File
@@ -22,7 +22,7 @@ export const alignEnum = [
const spacesRegExp = /\s+/;
export default function(props) {
export default function extractViewBox(props) {
const { viewBox, preserveAspectRatio } = props;
if (!viewBox) {