Amazebot / bbot

An adaptable conversation engine for building bespoke bots.
MIT License
55 stars 2 forks source link

Storage adapters could restore classes #60

Open timkinnane opened 6 years ago

timkinnane commented 6 years ago

When storing instances of a class, everything is converted to plain objects, but if the storage adapter stored a reference to the constructor when keeping, it could restore the instance when finding by calling the constructor or using the prototype and object.create) with the object attributes.

see https://github.com/Amazebot/bbot/blob/master/src/adapters/mongo.ts

related #58