pflagerd / memorystore

express-session full featured MemoryStore layer without leaks!
MIT License
0 stars 0 forks source link

Examine and annotate source code's file structure. #1

Open pflagerd opened 11 months ago

pflagerd commented 11 months ago

Forked. Current revision is b1e4c771dcc681117e785ac6ad6184f5109edf9b.

pflagerd commented 11 months ago

Use tree as a starting place:

├── index.d.ts
├── index.js
├── lib
│   └── memorystore.js
├── LICENSE
├── package.json
├── README.md
├── test
│   └── store.js
└── yarn.lock
pflagerd commented 11 months ago

See what ChatGPT4 thinks about things.

pflagerd commented 11 months ago

Are there build instructions in the README.md?

Doesn't appear to be.

pflagerd commented 11 months ago

Are there build instructions in a wiki or somewhere else in github?

pflagerd commented 11 months ago

I notice this bold claim in the readme:

image

See if this is true; in particular see if it implements store.all(callback).

pflagerd commented 11 months ago

Does it implement store.all(callback)?

It appears to do so in b1e4c771dcc681117e785ac6ad6184f5109edf9b (my fork's starting revision).

  MemoryStore.prototype.all = function (fn) {
    var store = this.store
    var self = this

    debug('Fetching all sessions')
    var err = null
    var result = {}
    try {
      store.forEach(function (val, key) {
        result[key] = self.serializer.parse(val)
      })
    } catch (e) {
      err = e
    }
    fn && defer(fn, err, result)
  }
pflagerd commented 11 months ago

I should definitely check this out then ...