Skip to content

Commit 9842bc8

Browse files
committed
Rename to unist-util-position
1 parent fafc6e5 commit 9842bc8

File tree

10 files changed

+46
-61
lines changed

10 files changed

+46
-61
lines changed

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
components/
22
coverage/
3-
mdast-util-position.js
4-
mdast-util-position.min.js
3+
unist-util-position.js
4+
unist-util-position.min.js

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
components/
44
coverage/
55
node_modules/
6-
mdast-util-position.js
7-
mdast-util-position.min.js
6+
unist-util-position.js
7+
unist-util-position.min.js

.jscs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"components/",
44
"coverage/",
55
"node_modules/",
6-
"mdast-util-position.js",
7-
"mdast-util-position.min.js"
6+
"unist-util-position.js",
7+
"unist-util-position.min.js"
88
],
99
"preset": "crockford",
1010
"requireMultipleVarDecl": false,

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ deploy:
2020
api_key:
2121
secure: v+RBRRLO5QwCPiXPbaCecETMZ8bu6Qd2V3CWIwHljMdTVUZ2URAUwjr14hqLhUcaJykj7YlkkJD+jyBWW0KjomaX36yeijVr2zAiSrXC1vCKALJWwUeLhc6G1Vu9I3GSDJOFU3+EdHVVFuZuHK0eUUpLJxhOmnLjWQFvl9f7s0Xk7gK0pro7WMJN+oxQL3ekOMNjlTP+/9s/1/fSmoPhQFIZrBYEHoKxiiUyPgvLYaBZgML+M4WhHx0y1mlb8xQadxOqvLq5+PcyK5kPtIRbbvuZjoz6d/1qbIhB0c9AQdF8ImzVYNL6tihIPHn1UVtkB0YQQ0+4fW8XmuzERBEw8NGwQI375tV/QE/Sxtw7uNJq1ITcYMeIv7WDISJstbUrsZru3OLsoNKT6JxyJlxg4l17WXZ5oEc2xDH74EZOHLle+TTukuuPZzU2mPupdDP9pFPT8GQl/PLVAVJOjQInrS1fAYpMeSO6zOpycyuaB8dJDzNKi/ZOgCj83mCow3IcOAZUlzE9OKRbtLL+ksOGGLNq1aUP8TouJJL9kK1kOr1Rq/3Qmx+hy2bB4BqVjitJ3xCYRhmR8+afbNSDIu93sxqjjnb+yvmGe3Fz6l8y5bv3dTbtHbazG0dPM2bQ4cesaNLlHzCWOeXr54+mUU94UYQ5sneaYR1nRVrWshTPu6k=
2222
file:
23-
- "mdast-util-position.js"
24-
- "mdast-util-position.min.js"
23+
- "unist-util-position.js"
24+
- "unist-util-position.min.js"
2525
on:
2626
tags: true
2727
node: '6.0'

component.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
{
2-
"name": "mdast-util-position",
2+
"name": "unist-util-position",
33
"version": "1.0.2",
4-
"description": "Utility to get the position of mdast nodes",
4+
"description": "Utility to get the position of unist nodes",
55
"license": "MIT",
66
"keywords": [
7-
"mdast",
8-
"markdown",
7+
"unist",
98
"node",
109
"position",
1110
"generated",
12-
"util",
1311
"utility"
1412
],
15-
"repository": "wooorm/mdast-util-position",
13+
"repository": "wooorm/unist-util-position",
1614
"dependencies": {},
1715
"scripts": [
1816
"index.js"

history.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
1.0.2 / 2016-01-17
66
==================
77

8-
* Fix `history.md` ([`14f67a2`](https://github.com/wooorm/mdast-util-position/commit/14f67a2))
8+
* Fix `history.md` ([`14f67a2`](https://github.com/wooorm/unist-util-position/commit/14f67a2))
99

1010
1.0.1 / 2016-01-17
1111
==================
1212

13-
* Refactor `readme.md` ([`74960dc`](https://github.com/wooorm/mdast-util-position/commit/74960dc))
14-
* Remove support for `Bower`, `Component` ([`4d7608d`](https://github.com/wooorm/mdast-util-position/commit/4d7608d))
15-
* Refactor npm test target ([`3938aa1`](https://github.com/wooorm/mdast-util-position/commit/3938aa1))
16-
* Refactor to replace mocha with tape ([`de6d8f3`](https://github.com/wooorm/mdast-util-position/commit/de6d8f3))
17-
* Update `mdast` to `remark` ([`b46dd05`](https://github.com/wooorm/mdast-util-position/commit/b46dd05))
13+
* Refactor `readme.md` ([`74960dc`](https://github.com/wooorm/unist-util-position/commit/74960dc))
14+
* Remove support for `Bower`, `Component` ([`4d7608d`](https://github.com/wooorm/unist-util-position/commit/4d7608d))
15+
* Refactor npm test target ([`3938aa1`](https://github.com/wooorm/unist-util-position/commit/3938aa1))
16+
* Refactor to replace mocha with tape ([`de6d8f3`](https://github.com/wooorm/unist-util-position/commit/de6d8f3))
17+
* Update `mdast` to `remark` ([`b46dd05`](https://github.com/wooorm/unist-util-position/commit/b46dd05))
1818

1919
1.0.0 / 2015-08-17
2020
==================

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @author Titus Wormer
33
* @copyright 2015 Titus Wormer
44
* @license MIT
5-
* @module mdast:util:position
5+
* @module unist:util:position
66
* @fileoverview Utility to get either the starting or the
77
* ending position of a node, and if its generated or not.
88
*/
@@ -53,7 +53,6 @@ function positionFactory(type) {
5353
return {
5454
'line': pos.line || null,
5555
'column': pos.column || null,
56-
'indent': pos.indent || null,
5756
'offset': isNaN(pos.offset) ? null : pos.offset
5857
};
5958
};

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
2-
"name": "mdast-util-position",
2+
"name": "unist-util-position",
33
"version": "1.0.2",
4-
"description": "Utility to get the position of mdast nodes",
4+
"description": "Utility to get the position of unist nodes",
55
"license": "MIT",
66
"keywords": [
7-
"mdast",
8-
"markdown",
7+
"unist",
98
"node",
109
"position",
1110
"generated",
@@ -14,9 +13,9 @@
1413
],
1514
"repository": {
1615
"type": "git",
17-
"url": "https://github.com/wooorm/mdast-util-position.git"
16+
"url": "https://github.com/wooorm/unist-util-position.git"
1817
},
19-
"bugs": "https://github.com/wooorm/mdast-util-position/issues",
18+
"bugs": "https://github.com/wooorm/unist-util-position/issues",
2019
"author": "Titus Wormer <[email protected]> (http://wooorm.com)",
2120
"contributors": [
2221
"Titus Wormer <[email protected]> (http://wooorm.com)"
@@ -42,8 +41,8 @@
4241
},
4342
"scripts": {
4443
"build-md": "remark . --quiet --frail",
45-
"build-bundle": "browserify index.js --no-builtins -s mdastUtilPosition > mdast-util-position.js",
46-
"build-mangle": "esmangle mdast-util-position.js > mdast-util-position.min.js",
44+
"build-bundle": "browserify index.js --no-builtins -s unistUtilPosition > unist-util-position.js",
45+
"build-mangle": "esmangle unist-util-position.js > unist-util-position.min.js",
4746
"build": "npm run build-md && npm run build-bundle && npm run build-mangle",
4847
"lint-api": "eslint .",
4948
"lint-style": "jscs --reporter inline .",

readme.md

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
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]
22

33
<!--lint disable heading-increment no-duplicate-headings-->
44

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.
96

107
## Installation
118

129
[npm][]:
1310

1411
```bash
15-
npm install mdast-util-position
12+
npm install unist-util-position
1613
```
1714

18-
**mdast-util-position** is also available as an AMD, CommonJS, and
15+
**unist-util-position** is also available as an AMD, CommonJS, and
1916
globals module, [uncompressed and compressed][releases].
2017

2118
## Usage
2219

2320
```js
2421
var remark = require('remark');
25-
var position = require('mdast-util-position');
22+
var position = require('unist-util-position');
2623

2724
var ast = remark().parse([
2825
'# foo',
@@ -54,17 +51,16 @@ Get the bound position of `node`.
5451

5552
###### Returns
5653

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`).
6056

6157
### `position.generated([node])`
6258

6359
Get the heading style of a node.
6460

6561
###### Parameters
6662

67-
* `node` ([`Node`][mdast-node]) — Node to check;
63+
* `node` ([`Node`][node]) — Node to check;
6864

6965
###### Returns
7066

@@ -78,32 +74,28 @@ if a node is inserted by plug-ins.
7874

7975
<!-- Definitions -->
8076

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
8278

83-
[build-status]: https://travis-ci.org/wooorm/mdast-util-position
79+
[build-status]: https://travis-ci.org/wooorm/unist-util-position
8480

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
8682

87-
[coverage-status]: https://codecov.io/github/wooorm/mdast-util-position
83+
[coverage-status]: https://codecov.io/github/wooorm/unist-util-position
8884

8985
[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg
9086

9187
[chat]: https://gitter.im/wooorm/remark
9288

93-
[releases]: https://github.com/wooorm/mdast-util-position/releases
89+
[releases]: https://github.com/wooorm/unist-util-position/releases
9490

9591
[license]: LICENSE
9692

9793
[author]: http://wooorm.com
9894

9995
[npm]: https://docs.npmjs.com/cli/install
10096

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
10698

107-
[mdast-indent]: https://github.com/wooorm/mdast#location
99+
[node]: https://github.com/wooorm/unist#node
108100

109-
[mdast-position]: https://github.com/wooorm/mdast/blob/master/doc/nodes.md#position
101+
[position]: https://github.com/wooorm/unist#position

test.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @author Titus Wormer
33
* @copyright 2015 Titus Wormer
44
* @license MIT
5-
* @module mdast:util:position
6-
* @fileoverview Test suite for `mdast-util-position`.
5+
* @module unist:util:position
6+
* @fileoverview Test suite for `unist-util-position`.
77
*/
88

99
'use strict';
@@ -26,13 +26,11 @@ var properties = {
2626
'start': {
2727
'line': 1,
2828
'column': 1,
29-
'indent': [],
3029
'offset': 0
3130
},
3231
'end': {
3332
'line': 1,
3433
'column': 2,
35-
'indent': [],
3634
'offset': 1
3735
}
3836
}
@@ -54,15 +52,14 @@ var none = {};
5452
var pos = {
5553
'line': null,
5654
'column': null,
57-
'offset': null,
58-
'indent': null
55+
'offset': null
5956
};
6057

6158
/*
6259
* Tests.
6360
*/
6461

65-
test('mdast-util-position', function (t) {
62+
test('unist-util-position', function (t) {
6663
['start', 'end'].forEach(function (type) {
6764
t.test(type, function (st) {
6865
var fn = position[type];

0 commit comments

Comments
 (0)