You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rich Trott aaee43473b tools: update to ESLint 4.1.0 8 years ago
..
LICENSE doc: add eslint-plugin-markdown 8 years ago
index.js tools: update ESLint to v4.0.0 8 years ago
package.json tools: update to ESLint 4.1.0 8 years ago
readme.md tools: update ESLint to v4.0.0 8 years ago

readme.md

unist-util-remove-position Build Status Coverage Status

Remove positions from a Unist tree.

Installation

npm:

npm install unist-util-remove-position

Usage

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

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

console.dir(removePosition(tree, true), {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 positions from node. If force is given, uses delete, otherwise, sets positions to undefined.

Returns

The given node.

License

MIT © Titus Wormer