Mongoose Function Type

JSON →
library 0.1.0 ·javascript maintenance
verified Jun 7, 2026

Plugin for Mongoose that adds support for storing and retrieving JavaScript functions as a schema type. Version 0.1.0 is stable but appears to be in maintenance mode with no recent updates. Unlike storing functions as strings, this plugin enables direct execution of stored functions after retrieval. It monkey-patches Mongoose's schema types, which may cause compatibility issues with newer Mongoose versions. The package is designed for Mongoose 3.x/4.x and requires a separate Mongoose instance.