Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bchainhub/remark-corepass
CorePass Remark handles
https://github.com/bchainhub/remark-corepass
coreid corepass remark remark-plugin
Last synced: about 11 hours ago
JSON representation
CorePass Remark handles
- Host: GitHub
- URL: https://github.com/bchainhub/remark-corepass
- Owner: bchainhub
- License: other
- Created: 2024-02-04T18:41:19.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-04-29T17:48:04.000Z (7 months ago)
- Last Synced: 2024-10-12T04:23:24.608Z (about 1 month ago)
- Topics: coreid, corepass, remark, remark-plugin
- Language: TypeScript
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Remark CorePass
This Remark plugin, "remark-corepass," is designed to transform CorePass notations into Markdown links (when positively checked) and negated text (when negatively checked), enhancing the integration of CorePass identifiers (Core ID) within markdown content.
## About Core ID
Core ID is a unique identifier used to reference Core Assets, such as documents, images, videos, and other digital assets, within the [CorePass ecosystem](https://corepass.net). The Core ID is composed of an [ICAN (International Crypto Asset Number)](https://cip.coreblockchain.net/sk-SK/cip/cbc/cip-100) and an checksum, which can be used to validate the identifier.
## Installation
You can install the plugin using npm or yarn:
```bash
npm install remark-corepass
```Or:
```bash
yarn add remark-corepass
```## Usage
Integrate the plugin into your Remark processing pipeline to automatically convert CorePass notations and optionally validate ICAN (International Crypto Asset Number) identifiers:
```typescript
import remark from 'remark';
import remarkCorepass from 'remark-corepass';(async () => {
try {
const file = await remark()
.use(remarkCorepass, { enableIcanCheck: true })
.process('Your markdown text here');
console.log(String(file));
} catch (err) {
console.error(err);
}
})();
```The plugin searches for CorePass notations in the format `[domain@coreid]` or `[!cb1234...@coreid]` in your markdown content, converting them to links and optionally validating ICAN identifiers, displaying invalid items as text.
## Options
- `enableIcanCheck`: Enables ICAN validation for identifiers (default: `true`).
- `enableSkippingIcanCheck`: Allows skipping ICAN validation with a leading "!" in the notation (default: `true`).## Features
- **ICAN Validation:** Optional validation of ICAN identifiers.
- **Flexible Configuration:** Customizable through options to meet various use cases.
- **Seamless Integration:** Designed to fit effortlessly into existing Remark pipelines.## Contributing
Contributions are welcome! Please submit pull requests or open issues to help improve the plugin.
## License
This project is licensed under the CORE License - see the [LICENSE](LICENSE) file for details.