Socket
Socket
Sign inDemoInstall

orgast-util-to-string

Package Overview
Dependencies
0
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    orgast-util-to-string

uniorg (orgast) utility to get the plain text content of a node


Version published
Maintainers
2
Install size
37.9 kB
Created

Readme

Source

orgast-util-to-string

orgast (uniorg) utility to get the plain text content of a node.

Install

npm install orgast-util-to-string

Use

import { unified } from 'unified';
import uniorgParse from 'uniorg-parse';
import { toString } from 'orgast-util-to-string';

const tree = unified()
  .use(uniorgParse)
  .parse('Some /emphasis/, *importance*, and ~code~.');

console.log(toString(tree)); //=> 'Some emphasis, importance, and code.'

API

toString(node[, options])

Get the text content of a node or list of nodes.

The algorithm checks value of node. If no value is found, the algorithm checks the children of node and joins them (without spaces or newlines).

This is not an org-mode to plain-text library.

License

GNU General Public License v3.0 or later

Keywords

FAQs

Last updated on 14 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc