Skip to content

Commit c52a497

Browse files
authored
Merge pull request #1444 from LLazyEmail/feature/obj-1
adding notes of how i think object builder should be improved
2 parents b2e6943 + fa3ca0f commit c52a497

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/domain/objectBuilder.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ const ERROR_REGEX_CONSTANT = (value) =>
1717
const ERROR_REPLACER_FUNCTION = (value) =>
1818
`something wrong with replacer function ${value}`;
1919

20+
21+
// TODO to make this method working better [improvement]
22+
// 1. to handle a case when literal is false, it's very scary
23+
// 2. we really need to be able to handle a situation when replacer isn't defined before (by different reasons)
24+
// 3. does this function works fine with `components`
25+
// 4. when something wrong - i want to have a better output about params that we passed
26+
2027
function objectBuilder(constant, replacer, literal = false) {
2128
// TODO add typeof for checking replacer as a function
2229
// console.log( typeof element.replacer === 'undefined' );

0 commit comments

Comments
 (0)