An open API service indexing awesome lists of open source software.

https://github.com/mxvsh/sapphire

Transform and shape your data effortlessly using JavaScript
https://github.com/mxvsh/sapphire

javascript nextjs shadcn tailwindcss tools web

Last synced: about 1 month ago
JSON representation

Transform and shape your data effortlessly using JavaScript

Awesome Lists containing this project

README

          


Sapphire


Transform and shape your data effortlessly.

---

Sapphire is a web-based tool that allows you to upload or paste JSON, write JavaScript `map` functions, and instantly transform your data into any desired format. Whether you're a developer, data analyst, or anyone working with structured data, Sapphire provides a seamless and efficient way to manipulate your data.

---

## 🚀 Features

- **Custom Transformations**: Write and execute custom JavaScript `map` functions to transform your data.
- **Real-Time Output**: Instantly preview transformed JSON as you write your function.
- **JSON Validation**: Built-in validation to ensure your JSON input is correct.
- **User-Friendly Interface**: Simple and intuitive UI for ease of use.
- **Future-Ready**: Designed to accommodate additional features like chaining, templates, and API integration.

---

## 🛠️ How It Works

1. **Upload or Paste JSON**: Input your data directly into the tool.
2. **Write a Map Function**: Use JavaScript to define how you want to transform the data.
3. **View Results Instantly**: See the transformed data in real time.
4. **Export**: Download or copy your transformed JSON for use.

---

## 🧑‍💻 Example

Input JSON:

```json
[1, 2, 3, 4]
```

Map Function:

```javascript
item => item + 1;
```

Output JSON:

```json
[2, 3, 4, 5]
```

## Roadmap

- [x] Basic `map` functionality for transforming JSON.
- [x] Real-time output for instant feedback.
- [x] JSON validation with clear error messages.
- [x] **Export Options**: Support exporting data in JSON, CSV, and XML formats.
- [ ] **Filter Support**: Add `filter` functionality to refine data.
- [ ] **Reduce Support**: Enable `reduce` for aggregations and summaries.
- [ ] **Chaining Transformations**: Allow multiple operations (`map`, `filter`, `reduce`) in one workflow.
- [ ] **Pre-Built Templates**: Common transformations (e.g., flatten arrays, rename keys).
- [ ] **Error Highlighting**: Debugging support in the editor with detailed error messages.
- [ ] **Preview Modes**: Visualize data in table or tree formats.
- [ ] **Custom Reducers and Grouping**: Aggregate and group data by fields.
- [ ] **Multi-Format Support**: Handle data formats like XML, YAML, and CSV.

---

Stay tuned for updates and new features! Contributions and feedback are always welcome.