Skip to content

id field cannot be a string #8

@ghost

Description

The documentation indicates that the id field can be a string. However this doesn't seem to be the case. The example code:

const diff = require('hyperdiff')
var result = diff(
  [
    {id: 1, name: 'a'},
    {id: 2, name: 'b'},
    {id: 3, name: 'c'},
    {id: 4, name: 'd'},
    {id: 5, name: 'e'}
  ],
  [
    {id: 1, name: 'a'},
    {id: 2, name: 'b'},
    {id: 7, name: 'e'}
  ],
  'id'
)

Generates an error, "TypeError: props.every is not a function" at /node_modules/hyperdiff/lib/index.js:14:16

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