www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - FakeD

reply Robert Schadek <rschadek symmetryinvestments.com> writes:
FakeD [2,3] is a fake data generator with support for 
localisation.
It is based on faker.js [1].
See [4] for a list of available methods.

void main() {
	import std.stdio;
	import faked;

	auto f = new Faker(/*random seed */ 1337);

	writeln(f.loremText());
	writeln(f.addressCity());
	writeln(f.nameName());

	// localized to german
	f = new Faker_de(/*random seed */ 1338);

	writeln(f.loremText());
	writeln(f.addressCity());
	writeln(f.nameName());
}

[1] https://github.com/marak/Faker.js/
[2] https://code.dlang.org/packages/faked
[3] https://github.com/kaleidicassociates/faked
[4] https://kaleidicassociates.github.io/faked/
Feb 19 2019
parent Nicholas Wilson <iamthewilsonator hotmail.com> writes:
On Tuesday, 19 February 2019 at 10:38:22 UTC, Robert Schadek 
wrote:
 FakeD [2,3] is a fake data generator with support for 
 localisation.
 It is based on faker.js [1].
 See [4] for a list of available methods.

 void main() {
 	import std.stdio;
 	import faked;

 	auto f = new Faker(/*random seed */ 1337);

 	writeln(f.loremText());
 	writeln(f.addressCity());
 	writeln(f.nameName());

 	// localized to german
 	f = new Faker_de(/*random seed */ 1338);

 	writeln(f.loremText());
 	writeln(f.addressCity());
 	writeln(f.nameName());
 }

 [1] https://github.com/marak/Faker.js/
 [2] https://code.dlang.org/packages/faked
 [3] https://github.com/kaleidicassociates/faked
 [4] https://kaleidicassociates.github.io/faked/
 Faker_en_au_ocker
Strewth!
Feb 19 2019