mirror of
				https://gitee.com/onvia/ccc-tnt-psd2ui
				synced 2025-11-03 21:06:27 +00:00 
			
		
		
		
	支持 mac
This commit is contained in:
		
							
								
								
									
										16
									
								
								npm-packages/mac-v3.4.+/fs-extra/lib/json/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								npm-packages/mac-v3.4.+/fs-extra/lib/json/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
'use strict'
 | 
			
		||||
 | 
			
		||||
const u = require('universalify').fromPromise
 | 
			
		||||
const jsonFile = require('./jsonfile')
 | 
			
		||||
 | 
			
		||||
jsonFile.outputJson = u(require('./output-json'))
 | 
			
		||||
jsonFile.outputJsonSync = require('./output-json-sync')
 | 
			
		||||
// aliases
 | 
			
		||||
jsonFile.outputJSON = jsonFile.outputJson
 | 
			
		||||
jsonFile.outputJSONSync = jsonFile.outputJsonSync
 | 
			
		||||
jsonFile.writeJSON = jsonFile.writeJson
 | 
			
		||||
jsonFile.writeJSONSync = jsonFile.writeJsonSync
 | 
			
		||||
jsonFile.readJSON = jsonFile.readJson
 | 
			
		||||
jsonFile.readJSONSync = jsonFile.readJsonSync
 | 
			
		||||
 | 
			
		||||
module.exports = jsonFile
 | 
			
		||||
							
								
								
									
										11
									
								
								npm-packages/mac-v3.4.+/fs-extra/lib/json/jsonfile.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								npm-packages/mac-v3.4.+/fs-extra/lib/json/jsonfile.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
'use strict'
 | 
			
		||||
 | 
			
		||||
const jsonFile = require('jsonfile')
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
  // jsonfile exports
 | 
			
		||||
  readJson: jsonFile.readFile,
 | 
			
		||||
  readJsonSync: jsonFile.readFileSync,
 | 
			
		||||
  writeJson: jsonFile.writeFile,
 | 
			
		||||
  writeJsonSync: jsonFile.writeFileSync
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,12 @@
 | 
			
		||||
'use strict'
 | 
			
		||||
 | 
			
		||||
const { stringify } = require('jsonfile/utils')
 | 
			
		||||
const { outputFileSync } = require('../output-file')
 | 
			
		||||
 | 
			
		||||
function outputJsonSync (file, data, options) {
 | 
			
		||||
  const str = stringify(data, options)
 | 
			
		||||
 | 
			
		||||
  outputFileSync(file, str, options)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = outputJsonSync
 | 
			
		||||
							
								
								
									
										12
									
								
								npm-packages/mac-v3.4.+/fs-extra/lib/json/output-json.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								npm-packages/mac-v3.4.+/fs-extra/lib/json/output-json.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
'use strict'
 | 
			
		||||
 | 
			
		||||
const { stringify } = require('jsonfile/utils')
 | 
			
		||||
const { outputFile } = require('../output-file')
 | 
			
		||||
 | 
			
		||||
async function outputJson (file, data, options = {}) {
 | 
			
		||||
  const str = stringify(data, options)
 | 
			
		||||
 | 
			
		||||
  await outputFile(file, str, options)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = outputJson
 | 
			
		||||
		Reference in New Issue
	
	Block a user