You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
2
+
3
+
http://www.apache.org/licenses/LICENSE-2.0
4
+
5
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
> This package serves as a central repository for shared logic and dependencies for all IPFS packages, using `ipfs-utils` helps to easily re-use small scoped blocks of logic across all the js core interface implementations and also as a dependency proxy (think `aegir` for domain logic dependencies).
8
+
> Package to aggregate shared logic and dependencies for the IPFS ecosystem
12
9
13
-
`ipfs-utils` aims to provide single function default export per file (with a few exceptions) scoped in 3 general categories:
14
-
- General use
15
-
- Data structs wrangling (arrays, objects, streams, etc)
16
-
- IPFS core subsystems
17
-
18
-
*General use* and *Data structs wrangling* should try to be just re-exports of community packages.
19
-
20
-
The IPFS ecosystem has lots of repos with it comes several problems like:
21
-
- Domain logic dedupe - all interface-core implementations shared a lot of logic like validation, streams handling, etc.
22
-
- Dependencies management - it's really easy with so many repos for dependencies to go out of control, they become outdated, different repos use different modules to do the same thing (like merging defaults options), browser bundles ends up with multiple versions of the same package, bumping versions is cumbersome to do because we need to go through several repos, etc.
23
-
24
-
These problems are the motivation for this package, having shared logic in this package avoids creating cyclic dependencies, centralizes common use modules/functions (exactly like aegir does for the tooling), semantic versioning for 3rd party dependencies is handled in one single place (a good example is going from streams 2 to 3) and maintainers should only care about having `ipfs-utils` updated.
25
-
26
-
## Table of Contents <!-- omit in toc -->
10
+
## Table of contents <!-- omit in toc -->
27
11
28
12
-[Install](#install)
13
+
-[Browser `<script>` tag](#browser-script-tag)
29
14
-[Usage](#usage)
30
-
-[Functions](#functions)
31
-
-[General Use](#general-use)
32
-
-[TODO](#todo)
33
-
-[Data Struct Wrangling](#data-struct-wrangling)
34
-
-[TODO](#todo-1)
35
-
-[Core API](#core-api)
36
-
-[TODO](#todo-2)
37
-
-[Contribute](#contribute)
15
+
-[API Docs](#api-docs)
38
16
-[License](#license)
17
+
-[Contribute](#contribute)
39
18
40
19
## Install
41
20
21
+
```console
22
+
$ npm i ipfs-utils
23
+
```
24
+
25
+
### Browser `<script>` tag
26
+
27
+
Loading this module through a script tag will make it's exports available as `IpfsUtils` in the global namespace.
`ipfs-utils` aims to provide single function default export per file (with a few exceptions) scoped in 3 general categories:
34
+
35
+
- General use
36
+
- Data structs wrangling (arrays, objects, streams, etc)
37
+
- IPFS core subsystems
38
+
39
+
*General use* and *Data structs wrangling* should try to be just re-exports of community packages.
40
+
41
+
The IPFS ecosystem has lots of repos with it comes several problems like:
42
+
43
+
- Domain logic dedupe - all interface-core implementations shared a lot of logic like validation, streams handling, etc.
44
+
- Dependencies management - it's really easy with so many repos for dependencies to go out of control, they become outdated, different repos use different modules to do the same thing (like merging defaults options), browser bundles ends up with multiple versions of the same package, bumping versions is cumbersome to do because we need to go through several repos, etc.
45
+
46
+
These problems are the motivation for this package, having shared logic in this package avoids creating cyclic dependencies, centralizes common use modules/functions (exactly like aegir does for the tooling), semantic versioning for 3rd party dependencies is handled in one single place (a good example is going from streams 2 to 3) and maintainers should only care about having `ipfs-utils` updated.
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
66
69
67
70
## Contribute
68
71
69
-
Contributions welcome. Please check out [the issues](https://github.com/ipfs/js-ipfs-utils/issues).
72
+
Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-ipfs-utils/issues).
70
73
71
-
Check out our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
74
+
Also see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.
72
75
73
-
## License
76
+
Please be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
77
+
78
+
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
0 commit comments