https://github.com/hexlet-components/js-types
https://github.com/hexlet-components/js-types
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexlet-components/js-types
- Owner: hexlet-components
- Created: 2019-05-16T10:09:36.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T07:31:31.000Z (almost 2 years ago)
- Last Synced: 2025-10-28T00:32:39.099Z (8 months ago)
- Language: JavaScript
- Size: 1.65 MB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-types
[](https://github.com/hexlet-components/js-types/actions)
## Install
```sh
npm install @hexlet/tagged-types
```
## Usage example
```javascript
import { attach, typeTag, contents } from '@hexlet/tagged-types';
const data = 'text, pair, list or others';
const tag = attach('typeOfTag', data);
// ('typeOfTag', 'text, pair, list or others')
typeTag(tag); // 'typeOfTag'
contents(tag); // 'text, pair, list or others'
```
For more information, see the [Full Documentation](https://github.com/hexlet-components/js-types/tree/master/docs)
[](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=js-types)
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=js-types).
See most active contributors on [hexlet-friends](https://friends.hexlet.io/).