Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wmfs/cardscript-table-of-contents
https://github.com/wmfs/cardscript-table-of-contents
cardscript tymly
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wmfs/cardscript-table-of-contents
- Owner: wmfs
- License: mit
- Created: 2019-01-18T08:37:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T21:52:28.000Z (4 months ago)
- Last Synced: 2024-10-14T13:18:24.735Z (3 months ago)
- Topics: cardscript, tymly
- Language: JavaScript
- Size: 154 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cardscript-table-of-contents
[![Tymly Cardscript](https://img.shields.io/badge/tymly-cardscript-blue.svg)](https://tymly.io/)
[![CircleCI](https://circleci.com/gh/wmfs/cardscript-table-of-contents.svg?style=svg)](https://circleci.com/gh/wmfs/cardscript-table-of-contents)
[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/cardscript-table-of-contents.svg)](https://www.npmjs.com/package/@wmfs/cardscript-table-of-contents)
[![codecov](https://codecov.io/gh/wmfs/cardscript-table-of-contents/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/cardscript-table-of-contents)
[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/cardscript-table-of-contents/badge)](https://www.codefactor.io/repository/github/wmfs/cardscript-table-of-contents)
[![Dependabot badge](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](https://dependabot.com/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly/blob/master/packages/concrete-paths/LICENSE)> Extracts a table-of-contents from some Cardscript.
## Install
```bash
$ npm install cardscript-table-of-contents --save
``````javascript
const extractToc = require('@wmfs/cardscript-table-of-contents')const toc = extractToc(
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Change me!",
"color": "attention",
"horizontalAlignment": "center"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
)```
```bash
$ npm test
```## License
[MIT](https://github.com/wmfs/cardscript/blob/master/LICENSE)