1
- # mdast -util-position [ ![ Build Status] [ build-badge ]] [ build-status ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage-status ] [ ![ Chat] [ chat-badge ]] [ chat ]
1
+ # unist -util-position [ ![ Build Status] [ build-badge ]] [ build-status ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage-status ] [ ![ Chat] [ chat-badge ]] [ chat ]
2
2
3
3
<!-- lint disable heading-increment no-duplicate-headings-->
4
4
5
- [ ** mdast** ] [ mdast ] utility to get the position of nodes.
6
-
7
- * Supports index-based positional information;
8
- * Supports [ ` indent ` ] [ mdast-indent ] .
5
+ [ ** unist** ] [ unist ] utility to get the position of nodes.
9
6
10
7
## Installation
11
8
12
9
[ npm] [ ] :
13
10
14
11
``` bash
15
- npm install mdast -util-position
12
+ npm install unist -util-position
16
13
```
17
14
18
- ** mdast -util-position** is also available as an AMD, CommonJS, and
15
+ ** unist -util-position** is also available as an AMD, CommonJS, and
19
16
globals module, [ uncompressed and compressed] [ releases ] .
20
17
21
18
## Usage
22
19
23
20
``` js
24
21
var remark = require (' remark' );
25
- var position = require (' mdast -util-position' );
22
+ var position = require (' unist -util-position' );
26
23
27
24
var ast = remark ().parse ([
28
25
' # foo' ,
@@ -54,17 +51,16 @@ Get the bound position of `node`.
54
51
55
52
###### Returns
56
53
57
- [ ` Position ` ] [ mdast-position ] — Filled with ` line ` (nullable
58
- ` uint32 >= 1 ` ), ` column ` (nullable ` uint32 >= 1 ` ), ` offset ` (nullable
59
- ` uint32 >= 0 ` ), and ` indent ` .
54
+ [ ` Position ` ] [ position ] — Filled with ` line ` (nullable ` uint32 >= 1 ` ),
55
+ ` column ` (nullable ` uint32 >= 1 ` ), ` offset ` (nullable ` uint32 >= 0 ` ).
60
56
61
57
### ` position.generated([node]) `
62
58
63
59
Get the heading style of a node.
64
60
65
61
###### Parameters
66
62
67
- * ` node ` ([ ` Node ` ] [ mdast- node] ) — Node to check;
63
+ * ` node ` ([ ` Node ` ] [ node ] ) — Node to check;
68
64
69
65
###### Returns
70
66
@@ -78,32 +74,28 @@ if a node is inserted by plug-ins.
78
74
79
75
<!-- Definitions -->
80
76
81
- [ build-badge ] : https://img.shields.io/travis/wooorm/mdast -util-position.svg
77
+ [ build-badge ] : https://img.shields.io/travis/wooorm/unist -util-position.svg
82
78
83
- [ build-status ] : https://travis-ci.org/wooorm/mdast -util-position
79
+ [ build-status ] : https://travis-ci.org/wooorm/unist -util-position
84
80
85
- [ coverage-badge ] : https://img.shields.io/codecov/c/github/wooorm/mdast -util-position.svg
81
+ [ coverage-badge ] : https://img.shields.io/codecov/c/github/wooorm/unist -util-position.svg
86
82
87
- [ coverage-status ] : https://codecov.io/github/wooorm/mdast -util-position
83
+ [ coverage-status ] : https://codecov.io/github/wooorm/unist -util-position
88
84
89
85
[ chat-badge ] : https://img.shields.io/gitter/room/wooorm/remark.svg
90
86
91
87
[ chat ] : https://gitter.im/wooorm/remark
92
88
93
- [ releases ] : https://github.com/wooorm/mdast -util-position/releases
89
+ [ releases ] : https://github.com/wooorm/unist -util-position/releases
94
90
95
91
[ license ] : LICENSE
96
92
97
93
[ author ] : http://wooorm.com
98
94
99
95
[ npm ] : https://docs.npmjs.com/cli/install
100
96
101
- [ mdast ] : https://github.com/wooorm/mdast
102
-
103
- [ node ] : https://github.com/wooorm/mdast#node
104
-
105
- [ mdast-node ] : https://github.com/wooorm/mdast#node
97
+ [ unist ] : https://github.com/wooorm/unist
106
98
107
- [ mdast-indent ] : https://github.com/wooorm/mdast#location
99
+ [ node ] : https://github.com/wooorm/unist#node
108
100
109
- [ mdast- position] : https://github.com/wooorm/mdast/blob/master/doc/nodes.md #position
101
+ [ position ] : https://github.com/wooorm/unist #position
0 commit comments