https://github.com/fahad19/tydel
Typed Models & Collections for JavaScript data structure
https://github.com/fahad19/tydel
data immutable javascript models structure
Last synced: 10 months ago
JSON representation
Typed Models & Collections for JavaScript data structure
- Host: GitHub
- URL: https://github.com/fahad19/tydel
- Owner: fahad19
- License: mit
- Created: 2016-07-14T15:54:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-02T19:15:50.000Z (almost 7 years ago)
- Last Synced: 2025-04-12T18:53:14.157Z (10 months ago)
- Topics: data, immutable, javascript, models, structure
- Language: JavaScript
- Homepage: http://tydel.js.org
- Size: 156 KB
- Stars: 37
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# tydel
> Typed models and collections
[](http://travis-ci.org/fahad19/tydel) [](https://www.npmjs.com/package/tydel) [](https://github.com/fahad19/tydel)
For documentation, visit [http://tydel.js.org](http://tydel.js.org).
If you are looking for a reactive version of Tydel with RxJS, consider using [frint-data](https://frint.js.org/docs/packages/frint-data).
## Overview
Tydel is a small library aimed at giving you a solid and strict **foundation** for your **data structure** needs in JavaScript.
Install it via [npm](https://npmjs.com):
```sh
$ npm install --save tydel
```
Basic usage example:
```js
import { Types, createModel } from 'tydel';
const Todo = createModel({
title: Types.string.isRequired,
description: Types.string
});
const todo = new Todo({
title: 'My first ToDo',
description: 'notes here...'
});
console.log(todo.title); // `My first ToDo`
```
Or load it via [unpkg](https://unpkg.com):
```html
// window.Tydel
```
Try it out:
## Terminologies
The three main **terminologies** you would come across are:
* [Types](./docs/getting-started/types.md): Strict type **expressions** for Model's values,
* [Models](./docs/getting-started/models.md): for **representing** your data, and
* [Collections](./docs/getting-started/collections.md): for containing Models like an **array**.
## Guides
There is a [quickstart](./docs/intro/quickstart.md) guide which would get you up an running in no time. To understand the concepts well, read the [getting started](./docs/getting-started/types.md) guides.
[Install](./docs/intro/installation.md) it, and enjoy!
## Integrations & Resources
* [tydel-react](https://github.com/fahad19/tydel-react): React.js bindings
* [tydel-logger](https://github.com/fahad19/tydel-logger): Prints state changes to console
## Thanks
These beautifully made open source projects have directly or indirectly played an influential role for Tydel, and a huge amount of thanks go to their authors and contributors:
* [Backbone.js](http://backbonejs.org/)
* [Redux](https://redux.js.org/)
* [MobX](https://mobxjs.github.io/mobx/)
## License
MIT © [Fahad Ibnay Heylaal](http://fahad19.com)