unist-util-remove-position

WebJar for unist-util-remove-position

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

unist-util-remove-position
Last Version

Last Version

2.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

unist-util-remove-position
WebJar for unist-util-remove-position
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/syntax-tree/unist-util-remove-position

Download unist-util-remove-position

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/unist-util-remove-position/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>unist-util-remove-position</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/unist-util-remove-position/
implementation 'org.webjars.npm:unist-util-remove-position:2.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/unist-util-remove-position/
implementation ("org.webjars.npm:unist-util-remove-position:2.0.1")
'org.webjars.npm:unist-util-remove-position:jar:2.0.1'
<dependency org="org.webjars.npm" name="unist-util-remove-position" rev="2.0.1">
  <artifact name="unist-util-remove-position" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='unist-util-remove-position', version='2.0.1')
)
libraryDependencies += "org.webjars.npm" % "unist-util-remove-position" % "2.0.1"
[org.webjars.npm/unist-util-remove-position "2.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : unist-util-visit jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

unist-util-remove-position

Build Coverage Downloads Size Sponsors Backers Chat

unist utility to remove positions from tree.

Install

npm:

npm install unist-util-remove-position

Use

var remark = require('remark')
var removePosition = require('unist-util-remove-position')

var tree = remark().parse('Some _emphasis_, **importance**, and `code`.')

removePosition(tree, true)

console.dir(tree, {depth: null})

Yields:

{
  type: 'root',
  children: [
    {
      type: 'paragraph',
      children: [
        {type: 'text', value: 'Some '},
        {type: 'emphasis', children: [{type: 'text', value: 'emphasis'}]},
        {type: 'text', value: ', '},
        {type: 'strong', children: [{type: 'text', value: 'importance'}]},
        {type: 'text', value: ', and '},
        {type: 'inlineCode', value: 'code'},
        {type: 'text', value: '.'}
      ]
    }
  ]
}

API

removePosition(node[, force])

Remove position fields from node. If force is given, uses delete, otherwise, sets positions to undefined.

Returns

The given node.

Contribute

See contributing.md in syntax-tree/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT ยฉ Titus Wormer

org.webjars.npm
๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒณ๐ŸŒฒ๐ŸŒณ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒณ๐ŸŒณ๐ŸŒฒ๐ŸŒฒ๐ŸŒณ๐ŸŒฒ๐ŸŒฒ๐ŸŽ„๐ŸŒฒ๐ŸŒณ๐ŸŒฒ๐ŸŒฒ๐ŸŒณ๐Ÿป๐ŸŒณ๐ŸŒณ๐ŸŒณ๐ŸŒฒ๐ŸŒฒ๐ŸŒณ๐ŸŒฒ๐ŸŽ„๐ŸŒฒ๐ŸŒณ๐ŸŒฒ๐ŸŒฒ๐ŸŒณ๐ŸŒณ๐ŸŒณ

Versions

Version
2.0.1
1.1.4
1.1.3
1.1.2
1.1.1