Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-12-11 21:29:03 +0400
committerisaacs <i@izs.me>2013-12-11 21:29:19 +0400
commitac8adbc4b46f5b26a3b6581efbd897c2017093f2 (patch)
tree34b7bb84a4e39d697c860c118458607820d8be56 /node_modules/tar
parentf1baf8fc9d20546652d604e052b88dbb5afbb86b (diff)
tar@0.1.19
Diffstat (limited to 'node_modules/tar')
-rw-r--r--node_modules/tar/README.md57
-rw-r--r--node_modules/tar/package.json13
2 files changed, 37 insertions, 33 deletions
diff --git a/node_modules/tar/README.md b/node_modules/tar/README.md
index c6b0f829e..5bcc82cd8 100644
--- a/node_modules/tar/README.md
+++ b/node_modules/tar/README.md
@@ -2,46 +2,45 @@
Tar for Node.js.
-## Goals of this project
+[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)
-1. Be able to parse and reasonably extract the contents of any tar file
- created by any program that creates tar files, period.
+## API
- At least, this includes every version of:
+See `examples/` for usage examples.
- * bsdtar
- * gnutar
- * solaris posix tar
- * Joerg Schilling's star ("Schilly tar")
+### var tar = require('tar')
-2. Create tar files that can be extracted by any of the following tar programs:
+Returns an object with `.Pack`, `.Extract` and `.Parse` methods.
- * bsdtar/libarchive version 2.6.2
- * gnutar 1.15 and above
- * SunOS Posix tar
- * Joerg Schilling's star ("Schilly tar")
+### tar.Pack([properties])
-3. 100% test coverage. Speed is important. Correctness is slightly more important.
+Returns a through stream. Use
+[fstream](https://npmjs.org/package/fstream) to write files into the
+pack stream and you will receive tar archive data from the pack
+stream.
-4. Create the kind of tar interface that Node users would want to use.
+The optional `properties` object are used to set properties in the tar
+'Global Extended Header'.
-5. Satisfy npm's needs for a portable tar implementation with a JavaScript interface.
+### tar.Extract([options])
-6. No excuses. No complaining. No tolerance for failure.
+Returns a through stream. Write tar data to the stream and the files
+in the tarball will be extracted onto the filesystem.
-## But isn't there already a tar.js?
+`options` can be:
-Yes, there are a few. This one is going to be better, and it will be
-fanatically maintained, because npm will depend on it.
+```js
+{
+ path: '/path/to/extract/tar/into',
+ strip: 0, // how many path segments to strip from the root when extracting
+}
+```
-That's why I need to write it from scratch. Creating and extracting
-tarballs is such a large part of what npm does, I simply can't have it
-be a black box any longer.
+`options` also get passed to the `fstream.Writer` instance that `tar`
+uses internally.
-## Didn't you have something already? Where'd it go?
+### tar.Parse()
-It's in the "old" folder. It's not functional. Don't use it.
-
-It was a useful exploration to learn the issues involved, but like most
-software of any reasonable complexity, node-tar won't be useful until
-it's been written at least 3 times.
+Returns a writable stream. Write tar data to it and it will emit
+`entry` events for each entry parsed from the tarball. This is used by
+`tar.Extract`.
diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json
index b31410019..4c69c4ba2 100644
--- a/node_modules/tar/package.json
+++ b/node_modules/tar/package.json
@@ -6,7 +6,7 @@
},
"name": "tar",
"description": "tar for node",
- "version": "0.1.18",
+ "version": "0.1.19",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
@@ -25,11 +25,16 @@
"rimraf": "1.x"
},
"license": "BSD",
- "readme": "# node-tar\n\nTar for Node.js.\n\n## Goals of this project\n\n1. Be able to parse and reasonably extract the contents of any tar file\n created by any program that creates tar files, period.\n\n At least, this includes every version of:\n\n * bsdtar\n * gnutar\n * solaris posix tar\n * Joerg Schilling's star (\"Schilly tar\")\n\n2. Create tar files that can be extracted by any of the following tar programs:\n\n * bsdtar/libarchive version 2.6.2\n * gnutar 1.15 and above\n * SunOS Posix tar\n * Joerg Schilling's star (\"Schilly tar\")\n\n3. 100% test coverage. Speed is important. Correctness is slightly more important.\n\n4. Create the kind of tar interface that Node users would want to use.\n\n5. Satisfy npm's needs for a portable tar implementation with a JavaScript interface.\n\n6. No excuses. No complaining. No tolerance for failure.\n\n## But isn't there already a tar.js?\n\nYes, there are a few. This one is going to be better, and it will be\nfanatically maintained, because npm will depend on it.\n\nThat's why I need to write it from scratch. Creating and extracting\ntarballs is such a large part of what npm does, I simply can't have it\nbe a black box any longer.\n\n## Didn't you have something already? Where'd it go?\n\nIt's in the \"old\" folder. It's not functional. Don't use it.\n\nIt was a useful exploration to learn the issues involved, but like most\nsoftware of any reasonable complexity, node-tar won't be useful until\nit's been written at least 3 times.\n",
+ "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/node-tar/issues"
},
- "_id": "tar@0.1.18",
- "_from": "tar@latest"
+ "homepage": "https://github.com/isaacs/node-tar",
+ "_id": "tar@0.1.19",
+ "dist": {
+ "shasum": "fe45941799e660ce1ea52d875d37481b4bf13eac"
+ },
+ "_from": "tar@0.1.19",
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-0.1.19.tgz"
}