Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Cannot load an item from store if it is a string #18

@mshogren

Description

@mshogren

I was using the jfs v0.2.6 from npm and everything was going well until I updated to v0.3.0

Now I can no longer do the following:

const Store = require('jfs');
const store = new Store('config.json', { type: 'single', pretty: true });
store.save('stringItem', 'asdf');
store.get('stringItem', console.log); // Error: could not load data

It appears that between the two versions items in the store have started to be checked for whether they are objects or not, where they used to be checked for null only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions