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

sbd

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sbd - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

lib/tokenizer.js

@@ -14,3 +14,3 @@ /*jshint node:true, laxcomma:true */

exports.sentences = function(text, options) {
if (text.length === 0)
if (!text || typeof text === "undefined" || text.length === 0)
return [];

@@ -17,0 +17,0 @@

{
"name": "sbd",
"version": "1.0.2",
"version": "1.0.3",
"description": "Split text into sentences with Sentence Boundary Detection (SBD).",

@@ -26,3 +26,3 @@ "main": "lib/tokenizer.js",

"dependencies": {
"sanitize-html": "^1.4.3"
"sanitize-html": "^1.11.2"
},

@@ -29,0 +29,0 @@ "browser": {

@@ -19,2 +19,10 @@ /*jshint node:true, laxcomma:true */

describe('undefined', function () {
var sentences = tokenizer.sentences();
it('should not get a sentence', function () {
assert.equal(sentences.length, 0);
});
});
describe('symbols only', function () {

@@ -21,0 +29,0 @@ var entry = "^&%(*&";

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