Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-store

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-store - npm Package Compare versions

Comparing version 0.15.1 to 0.15.2

README.md

11

index.js

@@ -67,5 +67,5 @@ 'use strict';

Store.prototype.initStore = function(name) {
this.name = name || utils.project();
this.name = name || utils.project(process.cwd());
this.cwd = utils.resolve(this.options.cwd || '~/.data-store');
this.path = path.resolve(this.cwd, this.name, 'data.json');
this.path = path.resolve(this.cwd, this.name + '.json');
this.data = readFile(this.path);

@@ -97,5 +97,6 @@ this.define('cache', utils.clone(this.data));

utils.validateName(this, name);
var substore = new Store(name);
var base = path.dirname(this.path);
substore.path = path.join(base, 'substores', name + '.json');
var dir = path.dirname(this.path);
var basename = path.basename(this.path, path.extname(this.path));
var cwd = path.join(dir, basename);
var substore = new Store(name, {cwd: cwd});
this[name] = substore;

@@ -102,0 +103,0 @@ return substore;

{
"name": "data-store",
"description": "Easily get, set and persist config data.",
"version": "0.15.1",
"version": "0.15.2",
"homepage": "https://github.com/jonschlinkert/data-store",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc