|
1 |
| -# jsonld-tools |
| 1 | +# JSON-LD Tools |
2 | 2 |
|
3 |
| -JSON-LD Tooling |
| 3 | +A monorepo containing powerful JSON-LD processing tools and utilities. |
4 | 4 |
|
| 5 | +## Overview |
| 6 | + |
| 7 | +This repository provides a comprehensive set of tools for working with JSON-LD data, including advanced filtering, graph processing, and configuration management capabilities. |
| 8 | + |
| 9 | +## Packages |
| 10 | + |
| 11 | +### [`jsonldjs`](./packages/jsonld-tools) |
| 12 | + |
| 13 | +A powerful, generic JSON-LD builder with comprehensive entity and property filtering capabilities. Features include: |
| 14 | + |
| 15 | +- **Configuration-First Design**: Separate immutable configuration from graph processing |
| 16 | +- **Fluent Interface**: Chainable methods for building complex filtering logic |
| 17 | +- **Property-Level Filtering**: Filter properties by entity IDs or types |
| 18 | +- **Subgraph Extraction**: Extract connected subgraphs with reference following |
| 19 | +- **Type Safety**: Full TypeScript support with proper type inference |
| 20 | + |
| 21 | +## Quick Start |
| 22 | + |
| 23 | +```bash |
| 24 | +# Install the main package |
| 25 | +pnpm add jsonldjs |
| 26 | + |
| 27 | +# Basic usage |
| 28 | +import { createJsonLdBuilder } from 'jsonldjs'; |
| 29 | + |
| 30 | +const result = createJsonLdBuilder() |
| 31 | + .baseGraph(jsonldGraph) |
| 32 | + .includeTypes(['Organization', 'Person']) |
| 33 | + .excludeTypes(['ImageObject']) |
| 34 | + .build({ prettyPrint: true }); |
| 35 | +``` |
| 36 | +
|
| 37 | +## Development |
| 38 | +
|
| 39 | +### Prerequisites |
| 40 | +
|
| 41 | +- Node.js 16+ |
| 42 | +- pnpm (recommended package manager) |
| 43 | +
|
| 44 | +### Setup |
| 45 | +
|
| 46 | +1. Clone the repository: |
| 47 | +
|
| 48 | +```bash |
| 49 | +git clone https://github.com/hyperweb-io/jsonld-tools.git |
| 50 | +cd jsonld-tools |
| 51 | +``` |
| 52 | +
|
| 53 | +2. Install dependencies: |
| 54 | +
|
| 55 | +```bash |
| 56 | +pnpm install |
| 57 | +``` |
| 58 | +
|
| 59 | +3. Build all packages: |
| 60 | +
|
| 61 | +```bash |
| 62 | +pnpm run build |
| 63 | +``` |
| 64 | +
|
| 65 | +### Repository Structure |
| 66 | +
|
| 67 | +``` |
| 68 | +jsonld-tools/ |
| 69 | +├── packages/ |
| 70 | +│ └── jsonld-tools/ # Main JSON-LD processing library |
| 71 | +├── fixtures/ # Test data and examples |
| 72 | +└── docs/ # Documentation |
| 73 | +``` |
| 74 | +
|
| 75 | +## Documentation |
| 76 | +
|
| 77 | +For detailed documentation and API reference, see the individual package READMEs: |
| 78 | +
|
| 79 | +- [jsonldjs Documentation](./packages/jsonld-tools/README.md) |
| 80 | +
|
| 81 | +## License |
| 82 | +
|
| 83 | +MIT License - see [LICENSE](./LICENSE) file for details. |
| 84 | +
|
| 85 | +## Contributing |
| 86 | +
|
| 87 | +Contributions are welcome! Please read our contributing guidelines and submit pull requests to the main branch. |
0 commit comments