Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textlint-util-to-string

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textlint-util-to-string - npm Package Compare versions

Comparing version 3.3.3 to 3.3.4

dist/UnistNode.d.ts

2

dist/replacer.d.ts
import { TxtNode } from "@textlint/ast-node-types";
import { Node as UnistNode } from "unist";
import { UnistNode } from "./UnistNode";
export type StringSourceReplacerMaskValueCommand = {

@@ -4,0 +4,0 @@ type: "StringSourceReplacerMaskValueCommand";

@@ -1,5 +0,5 @@

import type { TxtNode, TxtNodeLocation, TxtNodeRange } from "@textlint/ast-node-types";
import type { TxtNode, TxtNodeLocation, TxtNodeRange, TxtParagraphNode } from "@textlint/ast-node-types";
import { SourcePosition } from "structured-source";
import type { Node as UnistNode } from "unist";
import { emptyValue, maskValue, StringSourceReplacerCommand } from "./replacer";
import { UnistNode } from "./UnistNode";
export type StringSourceOptions = {

@@ -84,3 +84,3 @@ replacer?: ({ node, parent }: {

originalPositionFromIndex(generatedIndex: number, isEnd?: boolean): SourcePosition | undefined;
isParagraphNode(node: TxtNode | StringSourceTxtParentNodeLikeNode): boolean;
isParagraphNode(node: TxtNode | StringSourceTxtParentNodeLikeNode): node is TxtParagraphNode;
isStringNode(node: TxtNode | UnistNode): boolean;

@@ -87,0 +87,0 @@ /**

{
"name": "textlint-util-to-string",
"version": "3.3.3",
"version": "3.3.4",
"description": "textlint utility that convert Paragraph Node to text with SourceMap.",

@@ -31,3 +31,4 @@ "homepage": "https://github.com/textlint/textlint-util-to-string",

"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.{js,ts}\"",
"typecheck": "tsc --noEmit",
"test": "npm run typecheck && mocha \"test/**/*.{js,ts}\"",
"watch": "tsc -p . --watch",

@@ -34,0 +35,0 @@ "format": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",

import { TxtNode } from "@textlint/ast-node-types";
import { Node as UnistNode } from "unist";
import { UnistNode } from "./UnistNode";

@@ -4,0 +4,0 @@ export type StringSourceReplacerMaskValueCommand = {

@@ -1,4 +0,3 @@

import type { TxtHtmlNode, TxtNode, TxtNodeLocation, TxtNodeRange } from "@textlint/ast-node-types";
import type { TxtHtmlNode, TxtNode, TxtNodeLocation, TxtNodeRange, TxtParagraphNode } from "@textlint/ast-node-types";
import { SourcePosition, StructuredSource } from "structured-source";
import type { Node as UnistNode } from "unist";
import unified from "unified";

@@ -8,2 +7,3 @@ // @ts-expect-error no type definition

import { emptyValue, handleReplacerCommand, maskValue, StringSourceReplacerCommand } from "./replacer";
import { UnistNode } from "./UnistNode";

@@ -232,3 +232,3 @@ const isTxtNode = (node: unknown): node is TxtNode => {

isParagraphNode(node: TxtNode | StringSourceTxtParentNodeLikeNode): boolean {
isParagraphNode(node: TxtNode | StringSourceTxtParentNodeLikeNode): node is TxtParagraphNode {
return node.type === "Paragraph";

@@ -316,3 +316,3 @@ }

const container = this.isParagraphNode(parent) ? newNode : parent;
const rawValue = container.raw as string | undefined;
const rawValue = "raw" in container ? container.raw : undefined;
if (rawValue === undefined) {

@@ -319,0 +319,0 @@ return;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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