Skip to content
/ tydel Public

Typed Models & Collections for JavaScript data structure

License

Notifications You must be signed in to change notification settings

fahad19/tydel

Repository files navigation

tydel

Typed models and collections

Build Status npm star

For documentation, visit http://tydel.js.org.

If you are looking for a reactive version of Tydel with RxJS, consider using 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:

$ npm install --save tydel

Basic usage example:

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:

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.15.0/lodash.min.js"></script>
<script src="https://unpkg.com/tydel@latest/dist/tydel.min.js"></script>

<script>
  // window.Tydel
</script>

Try it out:

JSBin

<script src="http://static.jsbin.com/js/embed.min.js?3.39.11"></script>

Terminologies

The three main terminologies you would come across are:

  • Types: Strict type expressions for Model's values,
  • Models: for representing your data, and
  • Collections: for containing Models like an array.

Guides

There is a quickstart guide which would get you up an running in no time. To understand the concepts well, read the getting started guides.

Install it, and enjoy!

Integrations & Resources

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:

License

MIT © Fahad Ibnay Heylaal

About

Typed Models & Collections for JavaScript data structure

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published