Skip to content

Commit 89812c8

Browse files
committed
Readme and version bump.
1 parent d341281 commit 89812c8

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,50 @@ jarfile
22
=======
33

44
A Node.js module for getting information about a jar file.
5+
6+
7+
Synopsis
8+
--------
9+
10+
Want to know something about what is going on in a jar file? This module may help!
11+
12+
13+
Caveats
14+
-------
15+
16+
Currently this module can only tell you about manifest entries. If there's other stuff worth knowing about the contents of a jar file, feel free to submit a pull request!
17+
18+
19+
Installation
20+
------------
21+
22+
```shell
23+
npm install jarfile
24+
```
25+
26+
Example
27+
-------
28+
29+
```javascript
30+
var jarfile = require("jarfile")
31+
32+
// Get the Main-Class entry from foo.jar.
33+
jarfile.fetchJarAtPath("foo.jar", function (err, jar) {
34+
console.log(jar.valueForManifestEntry("Main-Class"))
35+
})
36+
```
37+
38+
Functions
39+
---------
40+
41+
### jarfile.fetchJarAtPath(path, callback)
42+
43+
Reads information from the jar file at the given path, and passes the following to the callback:
44+
45+
* An error if there was an error reading the jar file or its manifest.
46+
* A `Jar` object. See the methods below for what to do with this object.
47+
48+
49+
### Jar.prototype.valueForManifestEntry([sectionName], entryName)
50+
51+
Returns the string value for the given entry’s name. If you’re looking for an entry in a particular section, specify the section’s name as the first argument. If the section or entry does not exist in the manifest, `null` is returned.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jarfile",
3-
"version": "0.0.0",
3+
"version": "0.0.1",
44
"description": "Get information about a jar file.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)