Skip to content

Commit eb32637

Browse files
committed
Refactor to shout less
1 parent f49425b commit eb32637

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var own = {}.hasOwnProperty
99

1010
var allData = 'data*'
1111

12-
var NODES = {
12+
var nodeSchema = {
1313
root: {children: all},
1414
doctype: handleDoctype,
1515
comment: handleComment,
@@ -63,10 +63,10 @@ function one(schema, node, stack) {
6363
var result
6464
var key
6565

66-
if (!own.call(NODES, type)) {
66+
if (!own.call(nodeSchema, type)) {
6767
replace = false
6868
} else {
69-
definition = NODES[type]
69+
definition = nodeSchema[type]
7070

7171
if (typeof definition === 'function') {
7272
definition = definition(schema, node)
@@ -75,7 +75,7 @@ function one(schema, node, stack) {
7575
if (!definition) {
7676
replace = false
7777
} else {
78-
allowed = xtend(definition, NODES['*'])
78+
allowed = xtend(definition, nodeSchema['*'])
7979

8080
for (key in allowed) {
8181
result = allowed[key](schema, node[key], node, stack)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hast-util-sanitize",
33
"version": "1.3.0",
4-
"description": "Sanitize HAST nodes",
4+
"description": "Sanitize hast nodes",
55
"license": "MIT",
66
"keywords": [
77
"hast",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Sanitize a [**hast**][hast] [*tree*][tree].
8888

8989
Configuration.
9090
If not given, defaults to [GitHub][] style sanitation.
91-
If any top-level key isn’t given, it defaults to GH’s style too.
91+
If any top-level key isn’t given, it defaults to GitHub’s style too.
9292

9393
For a thorough sample, see [`github.json`][schema-github].
9494

0 commit comments

Comments
 (0)