Skip to content

Make "deserialize" promisifiable #77

Description

@razetdinov

deserialize uses node-style callbacks, but fails to follow the rule "callback is the last argument". This prevents making use of util.promisify, which

Takes a function following the common error-first callback style, i.e. taking a(err, value) => ... callback as the last argument, and returns a version that returns promises.

I suggest moving callback to the end of argument list. This would also be more convenient: now you have to pass null for the callback in cases when you don't need async deserialization, but have to pass custom args.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions