Skip to content

Conversation

elizeusdsantos
Copy link

No description provided.

const decoded = decodeURIComponent(atob(rawData));
return JSON.parse(decoded);
} else if (typeof rawData === 'object' && rawData !== null) {
} else if (typeof rawData === "object" && rawData !== null) {
Copy link
Owner

@rscarvalho rscarvalho Nov 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. Single quotes

@@ -24,7 +24,7 @@ export default class RegexBuilder {
regex: this.source,
flags: this.getFlag(),
match_type: this.matchType,
test_string: this.testString,
test_string: this.testString
Copy link
Owner

@rscarvalho rscarvalho Nov 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. trailing ,

@@ -39,11 +39,15 @@ export default class RegexBuilder {
.reduce(
(acc, [key, value]) => ({
...acc,
[key]: false,
[key]: false
Copy link
Owner

@rscarvalho rscarvalho Nov 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. trailing ,

}),
{}
);
}

getFlag() {}
getFlag() {
return Object.keys(this.flags)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to be sure that we get all values for REGEX_FLAGS, what about start this with Object.keys(REGEX_FLAGS)?

@@ -15,7 +15,7 @@ export default class RegexBuilder {
this.flags = {};
this.source = data.regex || null;
this.testString = data.test_string || null;
this.matchType = data.match_type || 'match';
this.matchType = data.match_type || "match";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same (about quotes)


export default class RegexBuilder {
constructor(rawData) {
const data = (() => {
if (typeof rawData === 'string') {
if (typeof rawData === "string") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same (about quotes)

@@ -1,12 +1,12 @@
import { REGEX_FLAGS } from '../constants';
import { REGEX_FLAGS } from "../constants";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same (about quotes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants