Skip to content

Implements getFlag method - #31

Open
elizeusdsantos wants to merge 3 commits into
refreshed-uifrom
elizeu/regex-builder
Open

Implements getFlag method#31
elizeusdsantos wants to merge 3 commits into
refreshed-uifrom
elizeu/regex-builder

Conversation

@elizeusdsantos

Copy link
Copy Markdown

No description provided.

Comment thread ui/src/lib/RegexBuilder.js Outdated
const decoded = decodeURIComponent(atob(rawData));
return JSON.parse(decoded);
} else if (typeof rawData === 'object' && rawData !== null) {
} else if (typeof rawData === "object" && rawData !== null) {

@rscarvalho rscarvalho Nov 15, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nit. Single quotes

Comment thread ui/src/lib/RegexBuilder.js Outdated
flags: this.getFlag(),
match_type: this.matchType,
test_string: this.testString,
test_string: this.testString

@rscarvalho rscarvalho Nov 15, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nit. trailing ,

Comment thread ui/src/lib/RegexBuilder.js Outdated
(acc, [key, value]) => ({
...acc,
[key]: false,
[key]: false

@rscarvalho rscarvalho Nov 15, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nit. trailing ,

Comment thread ui/src/lib/RegexBuilder.js Outdated

getFlag() {}
getFlag() {
return Object.keys(this.flags)

Copy link
Copy Markdown
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)?

Comment thread ui/src/lib/RegexBuilder.js Outdated
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
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Same (about quotes)

Comment thread ui/src/lib/RegexBuilder.js Outdated
constructor(rawData) {
const data = (() => {
if (typeof rawData === 'string') {
if (typeof rawData === "string") {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Same (about quotes)

Comment thread ui/src/lib/RegexBuilder.js Outdated
@@ -1,12 +1,12 @@
import { REGEX_FLAGS } from '../constants';
import { REGEX_FLAGS } from "../constants";

Copy link
Copy Markdown
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