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

sentence-splitter

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentence-splitter - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

5

lib/parser/SourceCode.js

@@ -24,4 +24,5 @@ "use strict";

var lineBreaks = Array.from(new Array(this.sourceNode.loc.start.line - 1)).fill("\n");
var offset = Array.from(new Array(this.startOffset - lineBreaks.length));
this.textCharacters = lineBreaks.concat(offset, input.raw.split(""));
// filled with dummy text
var offset = Array.from(new Array(this.startOffset - lineBreaks.length)).fill("∯");
this.textCharacters = offset.concat(lineBreaks, input.raw.split(""));
this.source = new StructureSource(this.textCharacters.join(""));

@@ -28,0 +29,0 @@ if (this.sourceNode.children[0]) {

2

package.json

@@ -14,3 +14,3 @@ {

},
"version": "3.0.2",
"version": "3.0.3",
"description": "split {japanese, english} text into sentences.",

@@ -17,0 +17,0 @@ "main": "lib/sentence-splitter.js",

@@ -31,4 +31,5 @@ import { TxtNode, TxtParentNode } from "@textlint/ast-node-types";

const lineBreaks = Array.from(new Array(this.sourceNode.loc.start.line - 1)).fill("\n");
const offset = Array.from(new Array(this.startOffset - lineBreaks.length));
this.textCharacters = lineBreaks.concat(offset, input.raw.split(""));
// filled with dummy text
const offset = Array.from(new Array(this.startOffset - lineBreaks.length)).fill("∯");
this.textCharacters = offset.concat(lineBreaks, input.raw.split(""));
this.source = new StructureSource(this.textCharacters.join(""));

@@ -35,0 +36,0 @@ if (this.sourceNode.children[0]) {

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