nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

42
node_modules/jsonfile/index.js generated vendored
View File

@@ -19,10 +19,7 @@ function readFile (file, options, callback) {
var fs = options.fs || _fs
var shouldThrow = true
// DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead
if ('passParsingErrors' in options) {
shouldThrow = options.passParsingErrors
} else if ('throws' in options) {
if ('throws' in options) {
shouldThrow = options.throws
}
@@ -56,10 +53,7 @@ function readFileSync (file, options) {
var fs = options.fs || _fs
var shouldThrow = true
// DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead
if ('passParsingErrors' in options) {
shouldThrow = options.passParsingErrors
} else if ('throws' in options) {
if ('throws' in options) {
shouldThrow = options.throws
}
@@ -77,6 +71,23 @@ function readFileSync (file, options) {
}
}
function stringify (obj, options) {
var spaces
var EOL = '\n'
if (typeof options === 'object' && options !== null) {
if (options.spaces) {
spaces = options.spaces
}
if (options.EOL) {
EOL = options.EOL
}
}
var str = JSON.stringify(obj, options ? options.replacer : null, spaces)
return str.replace(/\n/g, EOL) + EOL
}
function writeFile (file, obj, options, callback) {
if (callback == null) {
callback = options
@@ -85,14 +96,9 @@ function writeFile (file, obj, options, callback) {
options = options || {}
var fs = options.fs || _fs
var spaces = typeof options === 'object' && options !== null
? 'spaces' in options
? options.spaces : this.spaces
: this.spaces
var str = ''
try {
str = JSON.stringify(obj, options ? options.replacer : null, spaces) + '\n'
str = stringify(obj, options)
} catch (err) {
// Need to return whether a callback was passed or not
if (callback) callback(err, null)
@@ -106,12 +112,7 @@ function writeFileSync (file, obj, options) {
options = options || {}
var fs = options.fs || _fs
var spaces = typeof options === 'object' && options !== null
? 'spaces' in options
? options.spaces : this.spaces
: this.spaces
var str = JSON.stringify(obj, options.replacer, spaces) + '\n'
var str = stringify(obj, options)
// not sure if fs.writeFileSync returns anything, but just in case
return fs.writeFileSync(file, str, options)
}
@@ -124,7 +125,6 @@ function stripBom (content) {
}
var jsonfile = {
spaces: null,
readFile: readFile,
readFileSync: readFileSync,
writeFile: writeFile,