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

Commit

Permalink
deps: update async, clone, mkdirp, uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
chentsulin committed Oct 6, 2021
1 parent 61f7f96 commit 6aada66
Show file tree
Hide file tree
Showing 3 changed files with 3,812 additions and 16 deletions.
16 changes: 8 additions & 8 deletions Store.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Copyright (C) 2012 - 2016 Markus Kohlhase <[email protected]>
*/

import async from 'async';
import fs from 'fs';
import path from 'path';
import uuid from 'uuid';
import mkdirp from 'mkdirp';
import clone from 'clone';
import async from 'async';
import fs from 'fs';
import path from 'path';
import { v4 as uuidv4 } from 'uuid';
import mkdirp from 'mkdirp';
import clone from 'clone';

const isJSONFile = f => f.substr(-5) === ".json";
const removeFileExtension = f => f.split(".json")[0];
Expand Down Expand Up @@ -69,7 +69,7 @@ const saveObjectToFile = function(o, file, cb) {
}
}

const tmpFileName = file + uuid.v4() + ".tmp";
const tmpFileName = file + uuidv4() + ".tmp";

if (typeof cb === "function") {
canWriteToFile(file, (err) => {
Expand Down Expand Up @@ -243,7 +243,7 @@ class Store {
this._pretty = opt.pretty === true;
this._memory = opt.memory === true || opt.type === 'memory';
this._saveId = opt.saveId;
this._idGenerator = typeof opt.idGenerator === "function" ? opt.idGenerator : uuid.v4;
this._idGenerator = typeof opt.idGenerator === "function" ? opt.idGenerator : uuidv4;

if (isJSONFile(this.name)) {
this.name = this.name.split(".json")[0];
Expand Down
Loading

0 comments on commit 6aada66

Please sign in to comment.