You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

split2

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.2.0

2

index.js

@@ -98,3 +98,3 @@ /*

// If options is only argument.
} else if (typeof matcher === 'object' && !(matcher instanceof RegExp)) {
} else if (typeof matcher === 'object' && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
options = matcher

@@ -101,0 +101,0 @@ matcher = /\r?\n/

{
"name": "split2",
"version": "4.1.0",
"version": "4.2.0",
"description": "split a Text Stream into a Line Stream, using Stream 3",

@@ -36,5 +36,5 @@ "main": "index.js",

"pre-commit": "^1.1.2",
"standard": "^16.0.1",
"standard": "^17.0.0",
"tape": "^5.0.0"
}
}

@@ -63,3 +63,3 @@ # Split2(matcher, mapper, options)

})
.on("error", function(error) => {
.on("error", function(error) {
//handling parsing errors

@@ -66,0 +66,0 @@ })

@@ -393,1 +393,18 @@ 'use strict'

})
test('supports Symbol.split', function (t) {
t.plan(2)
const input = split({
[Symbol.split] (str) {
return str.split('~')
}
})
input.pipe(strcb(function (err, list) {
t.error(err)
t.deepEqual(list, ['hello', 'world'])
}))
input.end('hello~world')
})
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc