Skip to content

Commit d1f67b6

Browse files
committed
Initial commit
0 parents  commit d1f67b6

File tree

14 files changed

+465
-0
lines changed

14 files changed

+465
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.{json,remarkrc,eslintrc,sh}]
12+
indent_size = 2
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage/
2+
example.js
3+
hast-util-sectioning.js
4+
hast-util-sectioning.min.js

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "eslint:recommended",
3+
"rules": {
4+
"quotes": [2, "single"]
5+
}
6+
}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.log
3+
coverage/
4+
node_modules/
5+
hast-util-sectioning.js
6+
hast-util-sectioning.min.js

.jscs.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"excludeFiles": [
3+
"coverage/",
4+
"node_modules/",
5+
"hast-util-sectioning.js",
6+
"hast-util-sectioning.min.js"
7+
],
8+
"preset": "crockford",
9+
"requireMultipleVarDecl": false,
10+
"disallowDanglingUnderscores": false,
11+
"requireQuotedKeysInObjects": true,
12+
"disallowKeywords": [
13+
"with"
14+
],
15+
"maximumLineLength": {
16+
"value": 79,
17+
"allExcept": [
18+
"regex",
19+
"urlComments"
20+
]
21+
},
22+
"jsDoc": {
23+
"checkAnnotations": "jsdoc3",
24+
"checkParamExistence": true,
25+
"checkParamNames": true,
26+
"checkRedundantAccess": true,
27+
"checkRedundantParams": true,
28+
"checkRedundantReturns": true,
29+
"checkReturnTypes": true,
30+
"checkTypes": "strictNativeCase",
31+
"enforceExistence": true,
32+
"requireHyphenBeforeDescription": true,
33+
"requireNewlineAfterDescription": true,
34+
"requireParamDescription": true,
35+
"requireParamTypes": true,
36+
"requireReturnDescription": true,
37+
"requireReturnTypes": true
38+
}
39+
}

.remarkrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"output": true,
3+
"plugins": [
4+
"lint",
5+
"github",
6+
"comment-config",
7+
"usage",
8+
"validate-links"
9+
],
10+
"settings": {
11+
"bullet": "*"
12+
}
13+
}

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: node_js
2+
node_js:
3+
- '0.10'
4+
- '0.11'
5+
- '0.12'
6+
- '4.0'
7+
- '5.0'
8+
sudo: false
9+
after_script: npm install codecov.io && cat ./coverage/lcov.info | codecov
10+
deploy:
11+
- provider: npm
12+
13+
api_key:
14+
secure: N4ijVRZwnxcfeh9Vs6RlY0rLLWedus6C3ess4z58qAxT/DvjFMk/UAlHeOPoTyJ/uweJt4cb/zFC5N/pn0qkGHzOBnQf6y/cVZEjgmRSrfcA5f0OCCnq177yYH0RF9GwY4M/laI45pXURTg9u8heLwqaK5iexrpVSASbO+4g8Rd9DdWNKMgODaEnc2vvnE1YcBNJEWBvaTLpjJ+RMKuK+Pf1HNsi1Cx8oDmu+F9wB/5Xuwmy/lKub3fBWjRUQ6AD/yQ8yIhPJAxUe9xAkSJrkOQRk7abHrTtbxgUPi1C2ickUo94h4MTV2rF8g/vPhGfAVtQ5Blm3BooYj6r8QMopEyWL65HlnE0uMt4f3zF5LvaJlh+NToQTPrABDV1icz7JZv5+sY2Iw3DdWWxitejuco+APtXYsLtAtYgyPVib0J7Po76mA/se0x1KlUvYqi5NM1aIIXzC1Ekgu3QkqlCw+L+IqccMc6OtPjzg9rvUgHAAmx0YzqAq1oJnXB2SiAiSlS+4mG0NqaJ3o2ByVH1Q11CXwast6yHmxFiu+DxIbMtboGWNhIPrOjC11AuQHJCNR4NZy2REZDk/M+bRjvhZnkt3lkQUaejmMqxd9PGD04rX/OQMRHebmPDki+51vibONbhzFf5Jya9sGC4t5JNML9sXXMhe4dTAhTt2zpVe9M=
15+
on:
16+
tags: true
17+
node: '5.0'
18+
- provider: releases
19+
api_key:
20+
secure: pejPtcP1pdV+h1QHZ8zheWgLzohwn3zGy6FsHIrukVBS/r6lqaOeVBuhcGLItnZpf/skp9QhHvPdt1tdxWr4rpi/A3l/+ELIKw14cr4y86IhMPh7a6FDB9Y+j6R5NfNZe7zS5nKA9vTV8xTRzL+8R/0n89b9ZJx1i26JZuzv58XGnU4x/iGorvtEQIQ77REKPVab1lRe8qihERJzlUd7BA5RSQzs8xFHGSe3I4Oy7HLlCyeJsciFu9QrpT/TsmbFugGcBven9rR7wrBwm8bcHeLWHBv6u+MEeMBC3w08i0Cs8Maewk8WQVT31wQVgwoE+y5gIyyu7xQqp1TRbf1W0jQ3i2LhQepWCaWuLBknasqxkhLhNY/K05otdA1hzSFByDbq5wx1/vNmn03A2fZ9PW/WBXb+fUjxDJInR283N6gWevPgGJ9ZrZFvmdqROi9fCYiLVk3H8cw3qa59NUAH+U9GxFdN1d6MyRvNnTd0pAUrbk5a/LiaMe0o6Wa/6pyhffexjUQL04VLQjwM6Cv5+DfYS+Ku8LjOmFedW4QpiUF5q2wVJ/qTKq+QtT3xT9E98sQade9mltSPy3M+YVOzirR9wTtr7HFgll6zZBDaQKplT58hBjYeoiFhU9jGGq8eO4d/NMyWkDo5Yad43zQukeu2Fo6/Qo0J50w77CEHEXw=
21+
file:
22+
- "hast-util-sectioning.js"
23+
- "hast-util-sectioning.min.js"
24+
on:
25+
tags: true

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2016 Titus Wormer <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
'Software'), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

example.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Dependencies:
2+
var sectioning = require('./index.js');
3+
4+
// Given a non-sectioning value:
5+
var result = sectioning({
6+
'type': 'element',
7+
'tagName': 'a',
8+
'properties': {
9+
'href': '#alpha',
10+
'title': 'Bravo'
11+
},
12+
'children': [{
13+
'type': 'text',
14+
'value': 'Charlie'
15+
}]
16+
});
17+
18+
// Yields:
19+
console.log('js', String(result));
20+
21+
// Given a sectioning element:
22+
result = sectioning({
23+
'type': 'element',
24+
'tagName': 'article',
25+
'children': [{
26+
'type': 'element',
27+
'tagName': 'p',
28+
'children': [{
29+
'type': 'text',
30+
'value': 'Delta'
31+
}]
32+
}]
33+
});
34+
35+
// Yields:
36+
console.log('js', String(result));

history.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--remark setext-->
2+
3+
<!--lint disable no-multiple-toplevel-headings-->
4+
5+
0.0.0 / 2016-04-17
6+
==================

0 commit comments

Comments
 (0)