Skip to content

"TypeError: value.split is not a function" when one parameter is an object #123

@wolfie

Description

@wolfie

I'm getting the following error when with diff 2.2.3, Node.js v6.2.0 (and npm 3.8.9):

[...]/node_modules/diff/lib/diff/line.js:22
      linesAndNewlines = value.split(/(\n|\r\n)/);
                               ^

TypeError: value.split is not a function
    at Object.lineDiff.tokenize ([...]/node_modules/diff/lib/diff/line.js:22:32)

I'm trying to call the diffLines function with two string parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions