Skip to content

Commit bdfc3c0

Browse files
committed
(State) implement serializeCookieJar() method
1 parent 7f2b0c0 commit bdfc3c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/state.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export class State {
7979
public async deserializeCookieJar(cookies: string) {
8080
this.cookieJar['_jar'] = await Bluebird.fromCallback(cb => CookieJar.deserialize(cookies, this.cookieStore, cb));
8181
}
82+
public async serializeCookieJar(): Promise<string> {
83+
return Bluebird.fromCallback(cb => this.cookieJar['_jar'].serialize(cb));
84+
}
8285

8386
public generateDevice(seed: string): void {
8487
const chance = new Chance(seed);

0 commit comments

Comments
 (0)