https://github.com/armordarks/vanrose
Supplementary tool for Vandoc
https://github.com/armordarks/vanrose
Last synced: 11 months ago
JSON representation
Supplementary tool for Vandoc
- Host: GitHub
- URL: https://github.com/armordarks/vanrose
- Owner: ArmorDarks
- Created: 2017-07-14T14:34:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T22:24:40.000Z (over 8 years ago)
- Last Synced: 2025-02-08T12:48:06.905Z (11 months ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Vanrose
------
> Van Helsing used to put Wild Roses on coffins to immobilize vampires. Now, the times have changed. Put Vanrose on hunted docs objects, to empower them.
Supplementary tool for [Vandoc](https://github.com/ArmorDarks/Vandoc).
* Accepts Vandoc result object
* Provides handy methods to work with object
_So far it is only initial draft._
#### Methods
```js
const v = vanrose(vandocData, { cwd: '/source' })
```
* `v.cwd()` — returns current working directory
* `v.filterLanguage('languageName')` — returns entries only for specified language.
* `v.toc()` — returns Object with Table of Content based on inner values with appropriate links for each entry, taking into account `cwd`.
* `v.href(':module/path')` — creates proper `href` from `Namepath` which can be used for anchors.
* `v.module('myModule/path')` — returns associated with specified module entries
* `v.rejectPrivate()` — filters out entries with `private: true`
* `v.rejectIgnored()` — filters out entries with `ignored: true`
* `v.entry('namepath')` — returns entry
* `v.entry('namepath').signature()` — returns entry signature (if there are any) with all params and Flow-style type annotation: `input: number, name?: string`
This function can be extended later to return signature with different annotation styles.