Faker.js: lorem.word(num) always return random length word

Created on 17 May 2017  路  3Comments  路  Source: Marak/faker.js

image
The length of word should equal the input number, but actually Not.

Most helpful comment

Hey, you can use faker.random.alphaNumeric(num)
This way works for me!

All 3 comments

This appears to be related to #500
@Marak can you clarify the usage of this method? I could not find a unit test. I don't mind digging into this but I would like to make sure that I'm not breaking the intended use.

It looks like num argument may be ignored.

see: https://github.com/Marak/faker.js/blob/master/lib/lorem.js#L16

This appears to be an error. A unit test / patch would be appreciated. Thank you.

Hey, you can use faker.random.alphaNumeric(num)
This way works for me!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Deilan picture Deilan  路  3Comments

chenweiyj picture chenweiyj  路  4Comments

jnardone picture jnardone  路  6Comments

developdeez picture developdeez  路  5Comments

minhchu picture minhchu  路  3Comments