{
	"name": "output-file-sync",
	"versions": {
		"1.0.0": {
			"name": "output-file-sync",
			"version": "1.0.0",
			"description": "Synchronously write a file and create its ancestor directories if needed",
			"repository": {
				"type": "git",
				"url": "https://github.com/shinnn/output-file-sync"
			},
			"author": {
				"name": "Shinnosuke Watanabe",
				"url": "https://github.com/shinnn"
			},
			"scripts": {
				"clean": "rimraf tmp_file tmp",
				"pretest": "eslint *.js & jscs *.js",
				"test": "node test.js | tap-spec; ${npm_package_scripts_clean}",
				"coverage": "istanbul cover test.js; ${npm_package_scripts_clean}",
				"coveralls": "istanbul cover test.js && istanbul-coveralls"
			},
			"licenses": [
				{
					"type": "MIT",
					"url": "https://github.com/shinnn/output-file-sync/blob/master/LICENSE"
				}
			],
			"files": [
				"index.js",
				"LICENSE"
			],
			"keywords": [
				"fs",
				"write",
				"sync",
				"synchronous",
				"output",
				"file",
				"mkdir",
				"mkdirp"
			],
			"dependencies": {
				"mkdirp": "^0.5.0"
			},
			"devDependencies": {
				"eslint": "^0.9.2",
				"istanbul": "^0.3.2",
				"istanbul-coveralls": "^1.0.1",
				"jscs": "^1.7.3",
				"rimraf": "^2.2.8",
				"tap-spec": "^1.0.1",
				"tape": "^3.0.3"
			},
			"jscsConfig": {
				"preset": "google",
				"maximumLineLength": 98
			},
			"gitHead": "41933718312dff25cf67cef49f9d6fa5fc768c50",
			"bugs": {
				"url": "https://github.com/shinnn/output-file-sync/issues"
			},
			"homepage": "https://github.com/shinnn/output-file-sync",
			"_id": "output-file-sync@1.0.0",
			"_shasum": "5087e56e7c32820297a761c0df86d3fb284427b8",
			"_from": ".",
			"_npmVersion": "2.1.7",
			"_nodeVersion": "0.10.33",
			"_npmUser": {
				"name": "shinnn",
				"email": "snnskwtnb@gmail.com"
			},
			"maintainers": [
				{
					"name": "shinnn",
					"email": "snnskwtnb@gmail.com"
				}
			],
			"dist": {
				"shasum": "5087e56e7c32820297a761c0df86d3fb284427b8",
				"tarball": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.0.0.tgz"
			},
			"directories": {},
			"contributors": []
		},
		"1.1.0": {
			"name": "output-file-sync",
			"version": "1.1.0",
			"description": "Synchronously write a file and create its ancestor directories if needed",
			"repository": {
				"type": "git",
				"url": "https://github.com/shinnn/output-file-sync"
			},
			"author": {
				"name": "Shinnosuke Watanabe",
				"url": "https://github.com/shinnn"
			},
			"scripts": {
				"pretest": "eslint *.js & jscs *.js",
				"test": "node test.js | tap-spec;",
				"coverage": "istanbul cover test.js; ${npm_package_scripts_clean}",
				"coveralls": "istanbul cover test.js && istanbul-coveralls"
			},
			"licenses": [
				{
					"type": "MIT",
					"url": "https://github.com/shinnn/output-file-sync/blob/master/LICENSE"
				}
			],
			"files": [
				"index.js",
				"LICENSE"
			],
			"keywords": [
				"fs",
				"write",
				"sync",
				"synchronous",
				"output",
				"file",
				"mkdir",
				"mkdirp"
			],
			"dependencies": {
				"mkdirp": "^0.5.0",
				"xtend": "^4.0.0"
			},
			"devDependencies": {
				"eslint": "^0.10.0",
				"istanbul": "^0.3.2",
				"istanbul-coveralls": "^1.0.1",
				"jscs": "^1.8.0",
				"read-remove-file": "^1.0.0",
				"tap-spec": "^2.1.0",
				"tape": "^3.0.3"
			},
			"jscsConfig": {
				"preset": "google",
				"maximumLineLength": 98
			},
			"gitHead": "6e82e289d57d8f6a047243a114d3bf214c1acc12",
			"bugs": {
				"url": "https://github.com/shinnn/output-file-sync/issues"
			},
			"homepage": "https://github.com/shinnn/output-file-sync",
			"_id": "output-file-sync@1.1.0",
			"_shasum": "b10dc60893f83de85e5d553a76327059295ff8d6",
			"_from": ".",
			"_npmVersion": "2.1.9",
			"_nodeVersion": "0.10.33",
			"_npmUser": {
				"name": "shinnn",
				"email": "snnskwtnb@gmail.com"
			},
			"maintainers": [
				{
					"name": "shinnn",
					"email": "snnskwtnb@gmail.com"
				}
			],
			"dist": {
				"shasum": "b10dc60893f83de85e5d553a76327059295ff8d6",
				"tarball": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.0.tgz"
			},
			"directories": {},
			"contributors": []
		},
		"1.1.1": {
			"name": "output-file-sync",
			"version": "1.1.1",
			"description": "Synchronously write a file and create its ancestor directories if needed",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/shinnn/output-file-sync.git"
			},
			"author": {
				"name": "Shinnosuke Watanabe",
				"url": "https://github.com/shinnn"
			},
			"scripts": {
				"pretest": "eslint *.js --config node_modules/@shinnn/eslintrc-node/rc.json",
				"test": "node test.js | tap-spec",
				"coverage": "istanbul cover test.js",
				"coveralls": "istanbul cover test.js && istanbul-coveralls"
			},
			"license": "MIT",
			"files": [
				"index.js"
			],
			"keywords": [
				"fs",
				"write",
				"sync",
				"synchronous",
				"output",
				"file",
				"mkdir",
				"mkdirp"
			],
			"dependencies": {
				"mkdirp": "^0.5.1",
				"xtend": "^4.0.0"
			},
			"devDependencies": {
				"@shinnn/eslintrc-node": "^1.0.2",
				"eslint": "^0.22.1",
				"istanbul": "^0.3.14",
				"istanbul-coveralls": "^1.0.2",
				"read-remove-file": "^2.0.0",
				"tap-spec": "^4.0.0",
				"tape": "^4.0.0"
			},
			"gitHead": "0a3b8b9a8e0dfac8359f7466a10a581968276847",
			"bugs": {
				"url": "https://github.com/shinnn/output-file-sync/issues"
			},
			"homepage": "https://github.com/shinnn/output-file-sync#readme",
			"_id": "output-file-sync@1.1.1",
			"_shasum": "a4653997c2df63c9811f7f1d7a1208404ed32e9e",
			"_from": ".",
			"_npmVersion": "2.11.0",
			"_nodeVersion": "2.2.1",
			"_npmUser": {
				"name": "shinnn",
				"email": "snnskwtnb@gmail.com"
			},
			"maintainers": [
				{
					"name": "shinnn",
					"email": "snnskwtnb@gmail.com"
				}
			],
			"dist": {
				"shasum": "a4653997c2df63c9811f7f1d7a1208404ed32e9e",
				"tarball": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.1.tgz"
			},
			"directories": {},
			"contributors": []
		},
		"1.1.2": {
			"name": "output-file-sync",
			"version": "1.1.2",
			"description": "Synchronously write a file and create its ancestor directories if needed",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/shinnn/output-file-sync.git"
			},
			"author": {
				"name": "Shinnosuke Watanabe",
				"url": "https://github.com/shinnn"
			},
			"scripts": {
				"pretest": "eslint --fix --config @shinnn/node-legacy index.js test.js",
				"test": "node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-spec",
				"coverage": "node --strong_mode --throw-deprecation --track-heap-objects node_modules/.bin/istanbul cover test.js"
			},
			"license": "MIT",
			"files": [
				"index.js"
			],
			"keywords": [
				"fs",
				"write",
				"sync",
				"synchronous",
				"output",
				"create",
				"file",
				"mkdir",
				"mkdirp"
			],
			"dependencies": {
				"graceful-fs": "^4.1.4",
				"mkdirp": "^0.5.1",
				"object-assign": "^4.1.0"
			},
			"devDependencies": {
				"@shinnn/eslint-config-node-legacy": "^2.0.0",
				"eslint": "^2.13.0",
				"istanbul": "^0.4.3",
				"read-remove-file": "^3.0.0",
				"tap-spec": "^4.1.1",
				"tape": "^4.5.1"
			},
			"gitHead": "42d4b6792bbaee919805b2cb9afc95233addb239",
			"bugs": {
				"url": "https://github.com/shinnn/output-file-sync/issues"
			},
			"homepage": "https://github.com/shinnn/output-file-sync#readme",
			"_id": "output-file-sync@1.1.2",
			"_shasum": "d0a33eefe61a205facb90092e826598d5245ce76",
			"_from": ".",
			"_npmVersion": "3.9.6",
			"_nodeVersion": "6.2.1",
			"_npmUser": {
				"name": "shinnn",
				"email": "snnskwtnb@gmail.com"
			},
			"maintainers": [
				{
					"name": "shinnn",
					"email": "snnskwtnb@gmail.com"
				}
			],
			"dist": {
				"shasum": "d0a33eefe61a205facb90092e826598d5245ce76",
				"tarball": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz"
			},
			"_npmOperationalInternal": {
				"host": "packages-12-west.internal.npmjs.com",
				"tmp": "tmp/output-file-sync-1.1.2.tgz_1466355133680_0.8832209098618478"
			},
			"directories": {},
			"contributors": []
		},
		"2.0.0": {
			"name": "output-file-sync",
			"version": "2.0.0",
			"description": "Synchronously write a file and create its ancestor directories if needed",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/shinnn/output-file-sync.git"
			},
			"author": {
				"name": "Shinnosuke Watanabe",
				"url": "https://github.com/shinnn"
			},
			"scripts": {
				"pretest": "eslint --fix --format=codeframe index.js test.js",
				"test": "node --throw-deprecation test.js",
				"coverage": "node --throw-deprecation node_modules/.bin/istanbul cover test.js"
			},
			"license": "MIT",
			"files": [
				"index.js"
			],
			"keywords": [
				"fs",
				"write",
				"sync",
				"synchronous",
				"output",
				"create",
				"file",
				"mkdir",
				"mkdirp"
			],
			"dependencies": {
				"graceful-fs": "^4.1.11",
				"is-plain-obj": "^1.1.0",
				"mkdirp": "^0.5.1"
			},
			"devDependencies": {
				"@shinnn/eslint-config-node": "^3.0.0",
				"eslint": "^3.17.1",
				"get-mode": "^0.1.0",
				"istanbul": "^0.4.5",
				"read-utf8-file": "^1.0.0",
				"rmfr": "^1.0.2",
				"tape": "^4.6.3"
			},
			"eslintConfig": {
				"extends": "@shinnn/node",
				"rules": {
					"complexity": "off"
				}
			},
			"gitHead": "433fdf235227a1aec9b00483de31cf7b30c431a5",
			"bugs": {
				"url": "https://github.com/shinnn/output-file-sync/issues"
			},
			"homepage": "https://github.com/shinnn/output-file-sync#readme",
			"_id": "output-file-sync@2.0.0",
			"_shasum": "5d348a1a1eaed1ad168648a01a2d6d13078ce987",
			"_from": ".",
			"_npmVersion": "4.3.0",
			"_nodeVersion": "7.7.1",
			"_npmUser": {
				"name": "shinnn",
				"email": "snnskwtnb@gmail.com"
			},
			"dist": {
				"shasum": "5d348a1a1eaed1ad168648a01a2d6d13078ce987",
				"tarball": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.0.tgz"
			},
			"maintainers": [
				{
					"name": "shinnn",
					"email": "snnskwtnb@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "packages-12-west.internal.npmjs.com",
				"tmp": "tmp/output-file-sync-2.0.0.tgz_1488968305123_0.3961769943125546"
			},
			"directories": {},
			"contributors": []
		},
		"2.0.1": {
			"name": "output-file-sync",
			"version": "2.0.1",
			"description": "Synchronously write a file and create its ancestor directories if needed",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/shinnn/output-file-sync.git"
			},
			"author": {
				"name": "Shinnosuke Watanabe",
				"url": "https://github.com/shinnn"
			},
			"scripts": {
				"pretest": "eslint --fix --format=codeframe index.js test.js",
				"test": "nyc --reporter=html --reporter=text node test.js"
			},
			"license": "ISC",
			"files": [
				"index.js"
			],
			"keywords": [
				"fs",
				"write",
				"sync",
				"synchronous",
				"output",
				"create",
				"file",
				"mkdir",
				"mkdirp"
			],
			"dependencies": {
				"graceful-fs": "^4.1.11",
				"is-plain-obj": "^1.1.0",
				"mkdirp": "^0.5.1"
			},
			"devDependencies": {
				"@shinnn/eslint-config-node": "^5.0.0",
				"eslint": "^4.17.0",
				"get-mode": "^1.0.1",
				"nyc": "^11.4.1",
				"read-utf8-file": "^2.0.0",
				"rmfr": "^2.0.0-3",
				"tape": "^4.8.0"
			},
			"eslintConfig": {
				"extends": "@shinnn/node"
			},
			"gitHead": "d21115faae4b86d85d876fda56f7bd57c0bc1a4e",
			"bugs": {
				"url": "https://github.com/shinnn/output-file-sync/issues"
			},
			"homepage": "https://github.com/shinnn/output-file-sync#readme",
			"_id": "output-file-sync@2.0.1",
			"_npmVersion": "5.6.0",
			"_nodeVersion": "9.5.0",
			"_npmUser": {
				"name": "shinnn",
				"email": "snnskwtnb@gmail.com"
			},
			"dist": {
				"integrity": "sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==",
				"shasum": "f53118282f5f553c2799541792b723a4c71430c0",
				"tarball": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz",
				"fileCount": 4,
				"unpackedSize": 9398
			},
			"maintainers": [
				{
					"name": "shinnn",
					"email": "snnskwtnb@gmail.com"
				}
			],
			"directories": {},
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/output-file-sync_2.0.1_1518692186239_0.08003246146288934"
			},
			"contributors": []
		}
	},
	"time": {
		"modified": "2018-02-15T10:56:27.038Z",
		"created": "2014-11-13T08:20:44.702Z",
		"1.0.0": "2014-11-13T08:20:44.702Z",
		"1.1.0": "2014-11-29T03:32:25.106Z",
		"1.1.1": "2015-06-07T07:56:04.806Z",
		"1.1.2": "2016-06-19T16:52:14.118Z",
		"2.0.0": "2017-03-08T10:18:25.394Z",
		"2.0.1": "2018-02-15T10:56:26.551Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "2.0.1"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"75b0fb28ff25e3b221d6b32e31928050\"",
			"fetched": 1593324427301
		}
	},
	"_distfiles": {
		"output-file-sync-1.0.0.tgz": {
			"url": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.0.0.tgz",
			"sha": "5087e56e7c32820297a761c0df86d3fb284427b8",
			"registry": "npmjs"
		},
		"output-file-sync-1.1.0.tgz": {
			"url": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.0.tgz",
			"sha": "b10dc60893f83de85e5d553a76327059295ff8d6",
			"registry": "npmjs"
		},
		"output-file-sync-1.1.1.tgz": {
			"url": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.1.tgz",
			"sha": "a4653997c2df63c9811f7f1d7a1208404ed32e9e",
			"registry": "npmjs"
		},
		"output-file-sync-1.1.2.tgz": {
			"url": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz",
			"sha": "d0a33eefe61a205facb90092e826598d5245ce76",
			"registry": "npmjs"
		},
		"output-file-sync-2.0.0.tgz": {
			"url": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.0.tgz",
			"sha": "5d348a1a1eaed1ad168648a01a2d6d13078ce987",
			"registry": "npmjs"
		},
		"output-file-sync-2.0.1.tgz": {
			"url": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz",
			"sha": "f53118282f5f553c2799541792b723a4c71430c0",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"output-file-sync-2.0.1.tgz": {
			"shasum": "f53118282f5f553c2799541792b723a4c71430c0"
		}
	},
	"_rev": "2-5263c2b233809bae",
	"_id": "output-file-sync",
	"readme": "# output-file-sync\n\n[![npm version](https://img.shields.io/npm/v/output-file-sync.svg)](https://www.npmjs.com/package/output-file-sync)\n[![Build Status](https://travis-ci.org/shinnn/output-file-sync.svg?branch=master)](https://travis-ci.org/shinnn/output-file-sync)\n[![Build status](https://ci.appveyor.com/api/projects/status/3qjn5ktuqb6w2cae?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/output-file-sync)\n[![Coverage Status](https://coveralls.io/repos/github/shinnn/output-file-sync/badge.svg?branch=master)](https://coveralls.io/github/shinnn/output-file-sync?branch=master)\n\nSynchronously write a file and create its ancestor directories if needed\n\n```javascript\nconst {readFileSync} = require('fs');\nconst outputFileSync = require('output-file-sync');\n\noutputFileSync('foo/bar/baz.txt', 'Hi!');\nreadFileSync('foo/bar/baz.txt', 'utf8'); //=> 'Hi!'\n```\n\n## Difference from [fs.outputFileSync](https://github.com/jprichardson/node-fs-extra/blob/master/docs/outputFile.md)\n\nThis module is very similar to [fs-extra](https://github.com/jprichardson/node-fs-extra)'s `fs.outputFileSync` method, but different in the following points:\n\n1. *output-file-sync* returns the path of the directory created first. [See the API document for more details.](#outputfilesyncpath-data--options)\n2. *output-file-sync* accepts [mkdirp] options.\n   ```javascript\n   const {statSync} = require('fs');\n   const outputFileSync = require('output-file-sync');\n\n   outputFileSync('foo/bar', 'content', {mode: 33260});\n   statSync('foo').mode; //=> 33260\n   ```\n3. *output-file-sync* validates its arguments strictly, and prints highly informative error message.\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).\n\n```\nnpm install output-file-sync\n```\n\n## API\n\n```javascript\nconst outputFileSync = require('output-file-sync');\n```\n\n### outputFileSync(*path*, *data* [, *options*])\n\n*path*: `string`  \n*data*: `string`, `Buffer` or `Uint8Array`  \n*options*: `Object` (options for [fs.writeFileSync] and [mkdirp]) or `string` (encoding)  \nReturn: `string` if it creates more than one directories, otherwise `null`\n\nIt writes the data to a file synchronously. If ancestor directories of the file don't exist, it creates the directories before writing the file.\n\n```javascript\nconst {statSync} = require('fs');\nconst outputFileSync = require('output-file-sync');\n\n// When the directory `foo/bar` exists\noutputFileSync('foo/bar/baz/qux.txt', 'Hello', 'utf-8');\n\nstatSync('foo/bar/baz').isDirectory(); //=> true\nstatSync('foo/bar/baz/qux.txt').isFile(); //=> true\n```\n\nIt returns the directory path just like [mkdirp.sync](https://github.com/substack/node-mkdirp#mkdirpsyncdir-opts):\n\n> Returns the first directory that had to be created, if any.\n\n```javascript\nconst dir = outputFileSync('foo/bar/baz.txt', 'Hello');\ndir === path.resolve('foo'); //=> true\n```\n\n#### options\n\nAll options for [fs.writeFileSync] and [mkdirp] are available.\n\nAdditionally, you can pass [`fileMode`](#optionsfilemode) and [`dirMode`](#optionsdirmode) options to set different permission between the file and directories.\n\n##### options.fileMode\n\nSet the mode of a file, overriding `mode` option.\n\n##### options.dirMode\n\nSet the modes of directories, overriding `mode` option.\n\n```javascript\noutputFileSync('dir/file', 'content', {dirMode: '0745', fileMode: '0644'});\nfs.statSync('dir').mode.toString(8); //=> '40745'\nfs.statSync('dir/file').mode.toString(8); //=> '100644'\n```\n\n## Related project\n\n* [output-file](https://github.com/shinnn/output-file) (asynchronous version)\n\n## License\n\n[ISC License](./LICENSE) © 2017 - 2018 Shinnosuke Watanabe\n\n[fs.writeFileSync]: https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options\n[mkdirp]: https://github.com/substack/node-mkdirp"
}