occam-entities 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Occam
|
|
1
|
+
# Occam Entities
|
|
2
2
|
|
|
3
3
|
[Occam](https://github.com/djalbat/occam)'s entities.
|
|
4
4
|
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
|
|
13
13
|
## Introduction
|
|
14
14
|
|
|
15
|
-
Occam's
|
|
15
|
+
Occam's entities, namely things like files, projects, versions and so on.
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
19
|
With [npm](https://www.npmjs.com/):
|
|
20
20
|
|
|
21
|
-
npm install occam-
|
|
21
|
+
npm install occam-entities
|
|
22
22
|
|
|
23
23
|
You can also clone the repository with [Git](https://git-scm.com/)...
|
|
24
24
|
|
|
25
|
-
git clone https://github.com/djalbat/occam-
|
|
25
|
+
git clone https://github.com/djalbat/occam-entities.git
|
|
26
26
|
|
|
27
27
|
...and then install the dependencies with npm from within the project's root directory:
|
|
28
28
|
|
|
@@ -30,40 +30,40 @@ You can also clone the repository with [Git](https://git-scm.com/)...
|
|
|
30
30
|
|
|
31
31
|
## Usage
|
|
32
32
|
|
|
33
|
-
The exported
|
|
33
|
+
The exported classes are:
|
|
34
34
|
|
|
35
|
-
* `
|
|
36
|
-
* `
|
|
37
|
-
* `
|
|
38
|
-
* `
|
|
39
|
-
* `
|
|
40
|
-
* `
|
|
35
|
+
* `File`
|
|
36
|
+
* `Files`
|
|
37
|
+
* `Version`
|
|
38
|
+
* `Entries`
|
|
39
|
+
* `Project`
|
|
40
|
+
* `Release`
|
|
41
|
+
* `Projects`
|
|
42
|
+
* `Releases`
|
|
43
|
+
* `Dependency`
|
|
44
|
+
* `Dependencies`
|
|
45
|
+
* `ShortenedVersion`
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
There are also some utilities:
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
* `contentUtilities`
|
|
50
|
+
* `filePathUtilities`
|
|
51
|
+
* `metaJSONUtilities`
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
{ loadFiles } = filesystem;
|
|
53
|
+
The classes have factory methods, see the source for details. Typical usage is:
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
json = {
|
|
54
|
-
filePaths
|
|
55
|
-
};
|
|
55
|
+
```
|
|
56
|
+
const { File }} = require('occam-entities');
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Files.fromJSON(json) :
|
|
60
|
-
null;
|
|
58
|
+
const json = ... ,
|
|
59
|
+
file = file.fromJSON(json);
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
});
|
|
61
|
+
...
|
|
64
62
|
```
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
See the source for further information on the utilities.
|
|
65
|
+
|
|
66
|
+
In short, this package has little of use and only a little more of interest.
|
|
67
67
|
|
|
68
68
|
## Building
|
|
69
69
|
|