Socket
Socket
Sign inDemoInstall

tcompare

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tcompare - npm Package Compare versions

Comparing version 5.0.6 to 5.0.7

16

lib/format.js

@@ -0,1 +1,8 @@

const arrayFrom = obj => {
try {
return Array.from(obj)
} catch (e) {
return null
}
}
class Format {

@@ -54,5 +61,8 @@ constructor (obj, options = {}) {

const value = Array.isArray(this.object) ? this.object
: this.isArray() ? Array.from(this.object)
: this.isArray() ? arrayFrom(this.object)
: null
if (value === null)
this.isArray = () => false
Object.defineProperty(this, 'objectAsArray', { value })

@@ -211,3 +221,3 @@ return value

: this.isBuffer() ? this.buffer()
: this.isArray() ? this.array()
: this.isArray() && this.objectAsArray ? this.array()
// TODO streams, JSX

@@ -446,3 +456,3 @@ : this.pojo()

}
return Array.from(own)
return arrayFrom(own)
} else

@@ -449,0 +459,0 @@ return Object.keys(obj || this.object)

4

package.json
{
"name": "tcompare",
"version": "5.0.6",
"version": "5.0.7",
"description": "A comprehensive comparison library, for use in test frameworks",

@@ -20,3 +20,3 @@ "main": "index.js",

"devDependencies": {
"tap": "^15.0.6"
"tap": "^15.0.8"
},

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

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