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

commonform-group-series

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commonform-group-series - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

4

package.json
{
"name": "commonform-group-series",
"description": "group series within Common Form form content",
"version": "0.2.0",
"version": "0.3.0",
"author": {

@@ -11,2 +11,3 @@ "name": "Kyle E. Mitchell",

"dependencies": {
"commonform-predicate": "^0.2.1",
"immutable": "^3.6.2"

@@ -17,2 +18,3 @@ },

"check-versions": "0.0.1",
"commonform-validate": "^0.3.2",
"istanbul": "^0.3.5",

@@ -19,0 +21,0 @@ "jscs": "^1.8.1",

var Immutable = require('immutable');
var predicate = require('commonform-predicate');
var hasFormProperty = function(argument) {
return (
Immutable.Map.isMap(argument) &&
argument.has('form')
);
};
var pushToLastContent = function(list, element) {

@@ -21,6 +15,6 @@ return list.update(list.count() - 1, function(lastGroup) {

.reduce(function(listOfGroups, element, index, content) {
// `element` is a sub-form.
if (hasFormProperty(element)) {
// `element` is an inclusion.
if (predicate.inclusion(element)) {
// `element` is part of the previous series.
if (index > 0 && hasFormProperty(content.get(index - 1))) {
if (index > 0 && predicate.inclusion(content.get(index - 1))) {
return pushToLastContent(listOfGroups, element);

@@ -36,6 +30,6 @@

// `element` is not a sub-form.
// `element` is not an inclusion.
} else {
// `element` is part of the previous paragraph.
if (index > 0 && !hasFormProperty(content.get(index - 1))) {
if (index > 0 && !predicate.inclusion(content.get(index - 1))) {
return pushToLastContent(listOfGroups, element);

@@ -54,2 +48,2 @@

module.exports.version = '0.2.0';
module.exports.version = '0.3.0';
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