{
  "_id": "fs-mkdirp-stream",
  "maintainers": [
    {
      "name": "yocontra",
      "email": "yo@contra.io"
    },
    {
      "name": "phated",
      "email": "blaine.bublitz@gmail.com"
    }
  ],
  "keywords": [
    "fs",
    "mkdirp",
    "stream",
    "mkdir",
    "directory",
    "directories",
    "ensure"
  ],
  "dist-tags": {
    "latest": "2.0.1"
  },
  "author": {
    "name": "Gulp Team",
    "email": "team@gulpjs.com",
    "url": "https://gulpjs.com/"
  },
  "_rev": "8-70a77ff875a7a1ec2881b89401607f74",
  "description": "Ensure directories exist before writing to them.",
  "readme": "<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# fs-mkdirp-stream\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nEnsure directories exist before writing to them.\n\n## Usage\n\n```js\nvar { Readable, Writable } = require('streamx');\nvar mkdirpStream = require('fs-mkdirp-stream');\n\nReadable.from([{ dirname: './path/to/my/', path: './path/to/my/file.js' }])\n  .pipe(\n    mkdirpStream(function (obj, callback) {\n      // callback can take 3 arguments (err, dirname, mode)\n      callback(null, obj.dirname);\n    })\n  )\n  .pipe(\n    new Writable({\n      write: function (obj, cb) {\n        // This will be called once the directory exists\n        // obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' }\n        cb();\n      },\n    })\n  );\n```\n\n## API\n\n### `mkdirpStream(resolver)`\n\nTakes a `resolver` function or string and returns a `streamx.Transform` stream.\n\nIf the `resolver` is a function, it will be called once per chunk with the signature `(chunk, callback)`. The `callback(error, dirpath, mode)` must be called with the `dirpath` to be created as the 2nd parameter or an `error` as the 1st parameter; optionally with a `mode` as the 3rd parameter.\n\nIf the `resolver` is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom `mode` can't be used.\n\n## License\n\nMIT\n\nContains a custom implementation of `mkdirp` originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes.\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/fs-mkdirp-stream.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/fs-mkdirp-stream\n[npm-image]: https://img.shields.io/npm/v/fs-mkdirp-stream.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/fs-mkdirp-stream/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/fs-mkdirp-stream/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/fs-mkdirp-stream\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/fs-mkdirp-stream/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/gulpjs/fs-mkdirp-stream.git"
  },
  "bugs": {
    "url": "https://github.com/gulpjs/fs-mkdirp-stream/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "fs-mkdirp-stream",
      "version": "1.0.0",
      "description": "Ensure directories exist before writing to them.",
      "author": {
        "name": "Gulp Team",
        "email": "team@gulpjs.com",
        "url": "http://gulpjs.com/"
      },
      "contributors": [
        {
          "name": "Blaine Bublitz",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "repository": {
        "type": "git",
        "url": "git+https://github.com/gulpjs/fs-mkdirp-stream.git"
      },
      "license": "MIT",
      "engines": {
        "node": ">= 0.10"
      },
      "main": "index.js",
      "files": [
        "LICENSE",
        "index.js",
        "mkdirp.js"
      ],
      "scripts": {
        "lint": "eslint index.js mkdirp.js test/ && jscs index.js mkdirp.js test/",
        "pretest": "npm run lint",
        "test": "mocha --async-only",
        "cover": "istanbul cover _mocha --report lcovonly",
        "coveralls": "npm run cover && istanbul-coveralls"
      },
      "dependencies": {
        "graceful-fs": "^4.1.11",
        "through2": "^2.0.3"
      },
      "devDependencies": {
        "eslint": "^1.10.3",
        "eslint-config-gulp": "^2.0.0",
        "expect": "^1.20.2",
        "istanbul": "^0.4.3",
        "istanbul-coveralls": "^1.0.3",
        "jscs": "^2.4.0",
        "jscs-preset-gulp": "^1.0.0",
        "mississippi": "^1.3.0",
        "mocha": "^3.2.0",
        "rimraf": "^2.6.1"
      },
      "keywords": [
        "fs",
        "mkdirp",
        "stream",
        "mkdir",
        "directory",
        "directories",
        "ensure"
      ],
      "gitHead": "3a27851dc08f43dbe2d3fda2dddef34c67408715",
      "bugs": {
        "url": "https://github.com/gulpjs/fs-mkdirp-stream/issues"
      },
      "homepage": "https://github.com/gulpjs/fs-mkdirp-stream#readme",
      "_id": "fs-mkdirp-stream@1.0.0",
      "_shasum": "0b7815fc3201c6a69e14db98ce098c16935259eb",
      "_from": ".",
      "_npmVersion": "2.15.2",
      "_nodeVersion": "0.10.41",
      "_npmUser": {
        "name": "phated",
        "email": "blaine.bublitz@gmail.com"
      },
      "maintainers": [
        {
          "name": "phated",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "dist": {
        "shasum": "0b7815fc3201c6a69e14db98ce098c16935259eb",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2rlYCRA9TVsSAnZWagAAUpgQAIH74Pk+zSqBoauLV1Qj\nzP75fPlCNjuk15rz4M7CXxkFu/IwrphKAYBYSwCFIiYDYxWdy5TnmHA4hCm8\neCgpHA7HE4bKmNz96mTD5qfElxP685QI3Ac6B5C2WoiALK0RvKdsBy6ACdRy\nXJLhBhr9ZEUsV7jXLdqrmYErwj9vmXSNhS3s55VESg7pokbSeD/Eh7rzoPuE\nijfRpp3pnl64e3V4ZJHQNlJoDJ9k77x+MgnvBbD7sitBMEVisxFZQVQbeDB+\nuR1CrZnnDoyXb+MdpiCwHFuLe31t3cRmltIBpqBY9s4mhkvoIZGGQRBZJlEv\nRIEGd+A96TFk0Et4boQ4vI7FIDDgJIIylenjCl6yICvTbv/0D+YHvdD1DSqe\nAUJf9yXCQf6dyQVBPQDwKKJPTKZKKiABy3EVrCN//FHVTjETxF6vfPHvRkMp\n0nRZO5XVMYCTKh5UNk+WG8jmhVGF/UaGV+iDr81+NT68iNgMYjnlWG/zoLeG\nl4ejKumCGXwDpH1fZlTe8n3cGRVl5zXuIq6OxBpf/zVMDvfxn6uzPJF6vAPk\navWD6H+a/y9CKGtzKI7N0xem/r7sxaOqDMqOq+UVkJUb1IeZVc+h71pBV3uf\nnP331AAOh8Os90f0KYD75V4387tZmGsjS3JcyEOIMJOc27VYYhLCD5eHQhAN\nm+qW\r\n=aU+j\r\n-----END PGP SIGNATURE-----\r\n",
        "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCgBDIreAImpPHeQqrsYIohV2UEwL1xf4ezyeGqLDKq1AIgKGv80p7O3XwsuxMNxhmymERKydCu3RAlbDRRIn4tAOA="
          }
        ]
      },
      "_npmOperationalInternal": {
        "host": "packages-18-east.internal.npmjs.com",
        "tmp": "tmp/fs-mkdirp-stream-1.0.0.tgz_1494720270021_0.31096577271819115"
      },
      "directories": {}
    },
    "2.0.0": {
      "name": "fs-mkdirp-stream",
      "version": "2.0.0",
      "description": "Ensure directories exist before writing to them.",
      "author": {
        "name": "Gulp Team",
        "email": "team@gulpjs.com",
        "url": "https://gulpjs.com/"
      },
      "contributors": [
        {
          "name": "Blaine Bublitz",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "repository": {
        "type": "git",
        "url": "git+https://github.com/gulpjs/fs-mkdirp-stream.git"
      },
      "license": "MIT",
      "engines": {
        "node": ">=10.13.0"
      },
      "main": "index.js",
      "scripts": {
        "lint": "eslint .",
        "pretest": "npm run lint",
        "test": "nyc mocha --async-only"
      },
      "dependencies": {
        "graceful-fs": "^4.2.8",
        "streamx": "^2.12.0"
      },
      "devDependencies": {
        "eslint": "^7.32.0",
        "eslint-config-gulp": "^5.0.1",
        "eslint-plugin-node": "^11.1.0",
        "expect": "^27.4.2",
        "mocha": "^8.4.0",
        "nyc": "^15.1.0",
        "readable-stream": "^3.6.0",
        "rimraf": "^3.0.2",
        "sinon": "^12.0.1"
      },
      "nyc": {
        "reporter": [
          "lcov",
          "text-summary"
        ]
      },
      "prettier": {
        "singleQuote": true
      },
      "keywords": [
        "fs",
        "mkdirp",
        "stream",
        "mkdir",
        "directory",
        "directories",
        "ensure"
      ],
      "gitHead": "55e5f67dd083c2bf0f3f393bab6b5fadbe78716c",
      "bugs": {
        "url": "https://github.com/gulpjs/fs-mkdirp-stream/issues"
      },
      "homepage": "https://github.com/gulpjs/fs-mkdirp-stream#readme",
      "_id": "fs-mkdirp-stream@2.0.0",
      "_nodeVersion": "16.14.2",
      "_npmVersion": "8.11.0",
      "dist": {
        "integrity": "sha512-RNlqlWXDaaWLy44K6ybdVcikzajTX3UA6jRhXbe4nUXXhycQKdTcaSoddCQzgs1iXStxqUAmLckasRcsJuNsPQ==",
        "shasum": "99ca45cc99de9c0d9353c690f81a36a0cb24c548",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fs-mkdirp-stream/-/fs-mkdirp-stream-2.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 8637,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIAc9rm4zHCI4kR1RJWzmEw3csukxP+BMtBSS8IAs8wXqAiBAH3KE6zHdQsOXAyDTXvtXh0n+qJd72bu9YsC9DuReqw=="
          }
        ],
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDqkgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpkxw/9HS7WLK4a44UF4pwjZyZXTO7iySG3H2TPZok1tkrLp9ayozBU\r\niJABmYJHOsnDMOXVsZDrnfXMUNRj3QgHS7Eog76u8bh7ErLyHCqQOfjH9v02\r\nFxZYMzcLgo5SCW73jMA8oB6vBovoKmRVZtg1NZdp7+9o12KfaKqB39QiBUrT\r\nxAh0xTXfrfseLMehkLx/P6bfKhClJFY3tr2DUmuxOYh+xoeZJdrSXgdw+SMX\r\nPzdqWWLOtc5u/jyoTzLKY/MghRGUfh9AJf+5KK5n3CSIcwyP/Oo9ZkkLyAZ4\r\nCEa5CWpjqCG+GizCHyhf7jgvTvuyor4QK9WJLxJDi1JW3xhDYM+9eE+UrKq3\r\nJXmJ+uB41/i58zw7hgg4iRAprYDHQvADJUgK1AEk7NALAR43o2JSSha+Aq9l\r\nbZYjt2wRAJLlmXHAJKQR/5NtBi0HApfAzeVP8a8gEXyTBB88pPCmvy54Fpzq\r\nK6A7hLRjpbet0biHV6UDt0I+5Xx6boNz85MUmr6bUw1grSjoIr4B2WvSkrjd\r\nfwX9eh6emvWkfqzAdxWS7kphcxkUyyvLMWSvpzD/2kXQTRtEiVqoIYCK/u/e\r\nqw0MQ7V9UVfqj0jkOZUKfmSDPIQdWKnNh+FL67g7/QZvdE0JGtWozRSH1nBF\r\nAU1VbDsUXEHAVrE6CARDZ6IfI68FYFoaPhQ=\r\n=VnRx\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "_npmUser": {
        "name": "phated",
        "email": "blaine.bublitz@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "yocontra",
          "email": "yo@contra.io"
        },
        {
          "name": "phated",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fs-mkdirp-stream_2.0.0_1661905184281_0.5847661393020149"
      },
      "_hasShrinkwrap": false
    },
    "2.0.1": {
      "name": "fs-mkdirp-stream",
      "version": "2.0.1",
      "description": "Ensure directories exist before writing to them.",
      "author": {
        "name": "Gulp Team",
        "email": "team@gulpjs.com",
        "url": "https://gulpjs.com/"
      },
      "contributors": [
        {
          "name": "Blaine Bublitz",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "repository": {
        "type": "git",
        "url": "git+https://github.com/gulpjs/fs-mkdirp-stream.git"
      },
      "license": "MIT",
      "engines": {
        "node": ">=10.13.0"
      },
      "main": "index.js",
      "scripts": {
        "lint": "eslint .",
        "pretest": "npm run lint",
        "test": "nyc mocha --async-only"
      },
      "dependencies": {
        "graceful-fs": "^4.2.8",
        "streamx": "^2.12.0"
      },
      "devDependencies": {
        "eslint": "^7.32.0",
        "eslint-config-gulp": "^5.0.1",
        "eslint-plugin-node": "^11.1.0",
        "expect": "^27.4.2",
        "mocha": "^8.4.0",
        "nyc": "^15.1.0",
        "readable-stream": "^3.6.0",
        "rimraf": "^3.0.2",
        "sinon": "^12.0.1"
      },
      "nyc": {
        "reporter": [
          "lcov",
          "text-summary"
        ]
      },
      "prettier": {
        "singleQuote": true
      },
      "keywords": [
        "fs",
        "mkdirp",
        "stream",
        "mkdir",
        "directory",
        "directories",
        "ensure"
      ],
      "gitHead": "13e59eeea3c163ed5edf0b8069387c7ee8cf82a6",
      "bugs": {
        "url": "https://github.com/gulpjs/fs-mkdirp-stream/issues"
      },
      "homepage": "https://github.com/gulpjs/fs-mkdirp-stream#readme",
      "_id": "fs-mkdirp-stream@2.0.1",
      "_nodeVersion": "16.14.2",
      "_npmVersion": "8.11.0",
      "dist": {
        "integrity": "sha512-UTOY+59K6IA94tec8Wjqm0FSh5OVudGNB0NL/P6fB3HiE3bYOY3VYBGijsnOHNkQSwC1FKkU77pmq7xp9CskLw==",
        "shasum": "1e82575c4023929ad35cf69269f84f1a8c973aa7",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fs-mkdirp-stream/-/fs-mkdirp-stream-2.0.1.tgz",
        "fileCount": 5,
        "unpackedSize": 8790,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIBYwCDLZujo/b4vTtYgp2TBG8YZzMLSBV190I7033wf6AiAaz0gUYJt01wNg7iYTD3hJSoGt2XkvOErExk6w6ckBgg=="
          }
        ],
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLMTEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGYg/+LWHpMOeeuMUpthh4RosDnHV0s/vK2LffBT53JjFdyuy6VVbL\r\nW733Z0DBYcpLqT2vU3ogW89ElsanjSGUD3o1/+NgpUr47uxv1+8qXnZQSvcu\r\nRho+ZOvHJCPClQ7SWmqBXdh7uphlg1ecVZm29ysxB7uVGv8vufVQHux5ESEG\r\nub4l9WK2ZZRCKjwXz3bUcDeZI+f2y/TAPP1N0yXSBLhlO8tsdfLUVTPcrGZC\r\nMC5VwW48DaQw8CRhPwhQJaSCvLCzOGl2Sk+Df62Z6+zbwyh2FrWiiCnDTUrX\r\nUEpalgKRSe//o2YOyIRMsjxiYcTcd7csPJFsEcbXhIXLlxAuDg92uKG5N8r/\r\nzZPvlzj851uGLMjRF5f1vTlK4WLjkIfMEkvD/Gl6tuQdj7GcdmCJa1smHdYz\r\nfyuaJ0tLxdZL9ahS2zCrjSm3hSnXwCAzmyY5L+bkb1fMA8EQATPUCVOtn+XX\r\n+C9TVL3BA2pOHcNurFLWVxxp17nbHZGePG/AnAb1oZws5vCwknGB0JhxaBaZ\r\nwID2j8K/DeRMnkmEo+ny7b2u4Iy8EoaELR5OitJVJFhoJDePc8YNhwpbdR4i\r\nybRS3PhiQYN5nC1PF45VKvwOtkffMix/kwTBou63tsGi5QzHchOxZ2SOeK2j\r\n6d6OhB/AzWjYj9LnRNaRWveumnuV/lIY1Rs=\r\n=d6/4\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "_npmUser": {
        "name": "phated",
        "email": "blaine.bublitz@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "yocontra",
          "email": "yo@contra.io"
        },
        {
          "name": "phated",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fs-mkdirp-stream_2.0.1_1663878340591_0.32297953692933"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "fs-mkdirp-stream",
  "time": {
    "modified": "2026-05-06T08:26:32.014Z",
    "created": "2017-05-14T00:04:31.877Z",
    "1.0.0": "2017-05-14T00:04:31.877Z",
    "2.0.0": "2022-08-31T00:19:44.441Z",
    "2.0.1": "2022-09-22T20:25:40.758Z"
  },
  "contributors": [
    {
      "name": "Blaine Bublitz",
      "email": "blaine.bublitz@gmail.com"
    }
  ],
  "readmeFilename": "README.md",
  "homepage": "https://github.com/gulpjs/fs-mkdirp-stream#readme"
}