Comparing version 0.0.2 to 1.0.0
{ | ||
"name": "hast", | ||
"version": "0.0.2", | ||
"description": "HTML processor powered by plugins", | ||
"version": "1.0.0", | ||
"description": "Renamed to rehype", | ||
"license": "MIT", | ||
"keywords": [ | ||
"process", | ||
"parse", | ||
"transform", | ||
"compile", | ||
"stringify", | ||
"html", | ||
"abstract", | ||
"syntax", | ||
"tree", | ||
"json", | ||
"ast" | ||
], | ||
"dependencies": { | ||
"bail": "^1.0.0", | ||
"camelcase": "^1.2.1", | ||
"ent": "^2.2.0", | ||
"escape-html": "^1.0.3", | ||
"htmlparser2": "^3.8.3", | ||
"param-case": "^1.1.1", | ||
"property-information": "^2.0.0", | ||
"trim": "0.0.1", | ||
"unified": "^2.1.0" | ||
}, | ||
"keywords": [], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wooorm/hast.git" | ||
"url": "https://github.com/wooorm/rehype" | ||
}, | ||
"author": "Titus Wormer <tituswormer@gmail.com>", | ||
"files": [ | ||
"lib/", | ||
"index.js" | ||
"author": "Titus Wormer <tituswormer@gmail.com> (http://github.com)", | ||
"contributors": [ | ||
"Titus Wormer <tituswormer@gmail.com> (http://github.com)" | ||
], | ||
"devDependencies": { | ||
"eslint": "^1.4.1", | ||
"istanbul": "^0.3.21", | ||
"jscs": "^2.1.1", | ||
"jscs-jsdoc": "^1.2.0", | ||
"mdast": "^2.0.0", | ||
"mdast-comment-config": "^1.0.0", | ||
"mdast-github": "^1.0.0", | ||
"mdast-lint": "^1.1.1", | ||
"mdast-slug": "^2.0.0", | ||
"mdast-validate-links": "^1.1.1", | ||
"tape": "^4.2.0", | ||
"unist-util-visit": "^1.0.0" | ||
}, | ||
"scripts": { | ||
"build-md": "mdast . --quiet --frail", | ||
"build": "npm run build-md", | ||
"lint-api": "eslint .", | ||
"lint-style": "jscs --reporter inline .", | ||
"lint": "npm run lint-api && npm run lint-style", | ||
"test-api": "node test.js", | ||
"test-coverage": "istanbul cover test.js", | ||
"test": "npm run build && npm run lint && npm run test-coverage" | ||
} | ||
"bugs": "https://github.com/wooorm/rehype/issues", | ||
"dependencies": {} | ||
} |
117
readme.md
@@ -1,116 +0,3 @@ | ||
# ![hast](https://cdn.rawgit.com/wooorm/hast/master/logo.svg) | ||
# Renamed to rehype | ||
**hast** is an HTML processor powered by plugins. Lots of bla. Bla and Bla. | ||
100% coverbla. | ||
> **hast is not (yet) fit for human consumption**. | ||
Just like what [**retext**](https://github.com/wooorm/retext) did for natural | ||
language and [**mdast**](https://github.com/wooorm/mdast) for markdown, now | ||
comes HTML. | ||
## Installation | ||
[npm](https://docs.npmjs.com/cli/install): | ||
```bash | ||
npm install wooorm/hast | ||
``` | ||
## API | ||
### [hast](#api).process(value, done?) | ||
Parse an HTML document, apply plugins to it, and compile it. | ||
**Signatures** | ||
* `doc = hast().process(value, options?, done?)`. | ||
* `done` (`function(Error?, File?, string?)`) — Callback invoked when the | ||
is generated with either an error, or a result. Only strictly needed when | ||
async plugins are used. | ||
**Returns** | ||
`string` or `null`: A document. The result is `null` if a plugin is | ||
asynchronous, in which case the callback `done` should’ve been passed (don’t | ||
worry: plugin creators make sure you know it’s async). | ||
### [hast](#api).use(plugin, options?) | ||
Change the way [`hast`](#api) works by using a `plugin`. | ||
**Signatures** | ||
* `processor = hast.use(plugin, options?)`; | ||
* `processor = hast.use(plugins)`. | ||
**Parameters** | ||
* `plugin` (`Function`) — A **Plugin**; | ||
* `plugins` (`Array.<Function>`) — A list of **Plugin**s; | ||
* `options` (`Object?`) — Passed to plugin. Specified by its documentation. | ||
**Returns** | ||
`Object`: an instance of HAST: The returned object functions just like | ||
**hast**, but caches the `use`d plugins. This provides the ability to chain | ||
`use` calls to use multiple plugins, but ensures the functioning of the | ||
**hast** module does not change for other dependents. | ||
## Nodes | ||
**hast** exposes the processed document using [unist](https://github.com/wooorm/unist) | ||
nodes and files (so there are already [tools](https://github.com/wooorm/unist#unist-node-utilties) | ||
for working with the syntax tree). | ||
```idl | ||
interface Node { | ||
type: string; | ||
data: Data | null; | ||
} | ||
interface Data { } | ||
interface Properties { } | ||
interface Parent <: Node { | ||
children: []; | ||
} | ||
interface Element <: Parent { | ||
type: "element"; | ||
tagName: string; | ||
properties: Properties; | ||
children: []; | ||
} | ||
interface Root <: Parent { | ||
type: "root"; | ||
} | ||
interface Directive <: Node { | ||
type: "directive"; | ||
value: string; | ||
} | ||
interface Comment <: Node { | ||
type: "comment"; | ||
value: string; | ||
} | ||
interface CharacterData <: Node { | ||
type: "characterData"; | ||
value: string; | ||
} | ||
interface Text <: Node { | ||
type: "text"; | ||
value: string; | ||
} | ||
``` | ||
## License | ||
[MIT](LICENSE) © [Titus Wormer](http://wooorm.com) | ||
[rehype »](https://github.com/wooorm/rehype) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
0
1
509
2
0
1
4
2
- Removedbail@^1.0.0
- Removedcamelcase@^1.2.1
- Removedent@^2.2.0
- Removedescape-html@^1.0.3
- Removedhtmlparser2@^3.8.3
- Removedparam-case@^1.1.1
- Removedproperty-information@^2.0.0
- Removedtrim@0.0.1
- Removedunified@^2.1.0
- Removedattach-ware@1.1.1(transitive)
- Removedbail@1.0.5(transitive)
- Removedcamelcase@1.2.1(transitive)
- Removedco@3.1.0(transitive)
- Removeddom-serializer@0.2.2(transitive)
- Removeddomelementtype@1.3.12.3.0(transitive)
- Removeddomhandler@2.4.2(transitive)
- Removeddomutils@1.7.0(transitive)
- Removedent@2.2.1(transitive)
- Removedentities@1.1.22.2.0(transitive)
- Removedescape-html@1.0.3(transitive)
- Removedextend@3.0.2(transitive)
- Removedhtmlparser2@3.10.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedlower-case@1.1.4(transitive)
- Removedparam-case@1.1.2(transitive)
- Removedproperty-information@2.0.0(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsentence-case@1.1.3(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedtrim@0.0.1(transitive)
- Removedunherit@1.1.3(transitive)
- Removedunified@2.1.4(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedvfile@1.4.0(transitive)
- Removedware@1.3.0(transitive)
- Removedwrap-fn@0.1.5(transitive)
- Removedxtend@4.0.2(transitive)