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

minim

Package Overview
Dependencies
Maintainers
6
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minim - npm Package Compare versions

Comparing version 0.23.5 to 0.23.6

8

CHANGELOG.md
# Minim Changelog
## 0.23.6 (2019-09-10)
### Bug Fixes
- Fixes a JSON 0.6 serialisation bug where httpRequest and similar array-based
elements with undefined content would be serialised with undefined content
instead of an empty array as content.
## 0.23.5 (2019-07-02)

@@ -4,0 +12,0 @@

10

lib/serialisers/JSON06Serialiser.js

@@ -68,2 +68,4 @@ const JSONSerialiser = require('./JSONSerialiser');

}
} else if (this.shouldSerialiseContent(element, element.content) && element instanceof this.namespace.elements.Array) {
payload.content = [];
}

@@ -75,6 +77,2 @@

shouldSerialiseContent(element, content) {
if (content === undefined) {
return false;
}
if (element.element === 'parseResult' || element.element === 'httpRequest'

@@ -86,2 +84,6 @@ || element.element === 'httpResponse' || element.element === 'category'

if (content === undefined) {
return false;
}
if (Array.isArray(content) && content.length === 0) {

@@ -88,0 +90,0 @@ return false;

2

package.json
{
"name": "minim",
"version": "0.23.5",
"version": "0.23.6",
"description": "A library for interacting with JSON through Refract elements",

@@ -5,0 +5,0 @@ "main": "lib/minim.js",

# Minim
[![Greenkeeper badge](https://badges.greenkeeper.io/refractproject/minim.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/refractproject/minim.svg?branch=master)](https://travis-ci.org/refractproject/minim)

@@ -246,3 +244,3 @@ A library for interacting with [Refract elements](https://github.com/refractproject/refract-spec).

stringElement.set('foobar');
var value = stringElement.get() // get() returns 'foobar'
var value = stringElement.toValue() // toValue() returns 'foobar'
```

@@ -261,3 +259,3 @@

numberElement.set(4);
var value = numberElement.get() // get() returns 4
var value = numberElement.toValue() // toValue() returns 4
```

@@ -276,3 +274,3 @@

booleanElement.set(true);
var value = booleanElement.get() // get() returns true
var value = booleanElement.toValue() // toValue() returns true
```

@@ -361,3 +359,3 @@

var newArray = arrayElement.filter(function(item) {
return item.get() === 'a'
return item.toValue() === 'a'
}); // newArray.toValue() is now ['a']

@@ -364,0 +362,0 @@ ```

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

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