Faker.js: faker.date.soon is not a function

Created on 2 May 2018  路  16Comments  路  Source: Marak/faker.js

I'm running faker v4.1.0, and the faker.date.soon() function is missing there.

Most helpful comment

Hopefully soon.

All 16 comments

OK, I just saw that it's actually new in the master branch but has not been released yet.

Sorry for this quick-shot issue. It's rare that the doc's are up-to-date ahead of the release ;-)

I got the same error in typescript - seems that the types define it but the function is not there yet ... strange. Will continue to investigate.

stumbled upone same issue but after lecture of this line https://github.com/Marak/faker.js/blob/d3ce6f1a2a9359574e7f31f14d4901648047c45a/lib/date.js#L105 i am confused

@Konrad008 what's released on npm doesn't have that method date.soon yet

see the release tree, no soon in there
https://github.com/Marak/faker.js/blob/v4.1.0/lib/date.js

@Marak needs to npm publish when ready

__but__, you can install from github if you want to _live on the edge_

in package.json

// or devDependencies

"dependencies": {
     ... 
    "faker": "github:Marak/faker.js#master",
    ... 
}

Any ETA on when soon will be released?

Hopefully soon.

Any real roadmap tho? Because the last npm release was 2 years ago.

Otherwise I'll consider forking master and releasing a parallel updated npm package.

do it

A good alternative - use decimal places on the future function:
const dueAt = faker.date.future(0.1,createdAt)

Headless Chrome on Jenkins stuck on this without any error, so this was a big trouble for me, since this was on build verifying PR in Bitbucket. @Marak are you planning to update npm package to fix this error?

We want that feature :D 馃拑

Just use recent with negative argument.

recent(-1)

The case of @niwrA still holds. 馃檨

Is this planned for release soon?
If not, should it be removed from the type definitions?

@Marak, any word on this?

What a wonderful package by careless devs. Issue was created two years ago still not fixed. Kudos to the devs.

I believe this is resolved after v5.0.0 release and can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HoustonBass picture HoustonBass  路  6Comments

ghost picture ghost  路  4Comments

marcelorl picture marcelorl  路  4Comments

Aleyasen picture Aleyasen  路  6Comments

maticzav picture maticzav  路  3Comments