Skip to content

Missing serializer causes TypeError: p is not a function #6

@aaronmccall

Description

@aaronmccall

Version 1.1.1 removes the default serializer arg (serializer = value => JSON.stringify(value)).

This breaks the case where the single argument to the memoized function is itself a function:

> const memoize = require('nano-memoize')
undefined
> const memoized = memoize(fn => o => fn(o))
undefined
> const myFunc = memoized(o => console.log(o))
TypeError: p is not a function
    at Object.<anonymous> (/Users/aaronmccall/Projects/phytochrome-web-ui/node_modules/nano-memoize/index.js:35:118)
>

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions