New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hast-util-to-nlcst

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hast-util-to-nlcst - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

22

index.js

@@ -1,9 +0,1 @@

/**
* @author Titus Wormer
* @copyright 2016 Titus Wormer
* @license MIT
* @module hast:to-nlcst
* @fileoverview Transform HAST to NLCST.
*/
'use strict';

@@ -56,11 +48,3 @@

/**
* Transform `tree` into `nlcst`.
*
* @param {Node} tree - HAST node.
* @param {File} file - Virtual file.
* @param {Parser|Function} Parser - (Instance of) NLCST
* parser.
* @return {NLCSTNode} - NLCST.
*/
/* Transform `tree` to `nlcst`. */
function toNLCST(tree, file, Parser) {

@@ -105,3 +89,3 @@ var parser;

return {
type: 'root',
type: 'RootNode',
children: results,

@@ -166,3 +150,3 @@ position: {

if (result.length) {
if (result.length !== 0) {
results.push(parser.tokenizeParagraph(result));

@@ -169,0 +153,0 @@ }

4

package.json
{
"name": "hast-util-to-nlcst",
"version": "1.0.0",
"version": "1.1.0",
"description": "Transform HAST to NLCST",

@@ -48,3 +48,3 @@ "license": "MIT",

"vfile": "^2.0.0",
"xo": "^0.16.0"
"xo": "^0.17.0"
},

@@ -51,0 +51,0 @@ "scripts": {

@@ -45,3 +45,3 @@ # hast-util-to-nlcst [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

```txt
root[2] (1:1-6:1, 0-134)
RootNode[2] (1:1-6:1, 0-134)
├─ ParagraphNode[3] (1:10-3:3, 9-24)

@@ -48,0 +48,0 @@ │ ├─ WhiteSpaceNode: "\n " (1:10-2:3, 9-12)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc