RobinCK / typeorm-fixtures

:pill: Fixtures loader for typeorm 🇺🇦
https://robinck.github.io/typeorm-fixtures/
MIT License
566 stars 45 forks source link

Update parser to allow escape faker.js curly brace expansion #117 #118

Closed matomesc closed 4 years ago

matomesc commented 4 years ago

Process % escape sequence to escape curly braces to prevent faker interpolation.

For example:

// Faker interpolation
{{name.firstName}} === 'John'

// Escape curly braces, no faker interpolation
%{%{name.firstName%}%} === '{{name.firstName}}'

// Escape %
%%{{name.firstName}}%% === '%John%'
matomesc commented 4 years ago

Use processors see https://github.com/RobinCK/typeorm-fixtures/issues/117#issuecomment-604546475