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

factorial-form

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

factorial-form - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

17

__tests__/Field.spec.ts

@@ -232,2 +232,19 @@ import { Field } from '../src'

})
describe('isDirty', () => {
it('works correctly when values change', () => {
const field = new Field('paco', 'string')
expect(field.isDirty).toBeFalsy()
field.set('paquito')
expect(field.isDirty).toBeTruthy()
})
describe('for arrays', () => {
it('works correctly when values change', () => {
const field = new Field([1, 2], 'string')
expect(field.isDirty).toBeFalsy()
field.set([2, 1])
expect(field.isDirty).toBeTruthy()
})
})
})
})

4

lib/index.js

@@ -14,2 +14,3 @@ 'use strict';

var isFinite = require('lodash/isFinite');
var isEqual = require('lodash/isEqual');
var moment = require('moment');

@@ -29,2 +30,3 @@ var last = require('lodash/last');

var isFinite__default = /*#__PURE__*/_interopDefaultLegacy(isFinite);
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);

@@ -187,3 +189,3 @@ var last__default = /*#__PURE__*/_interopDefaultLegacy(last);

get: function () {
return this.originalValue !== this.value;
return !isEqual__default['default'](this.originalValue, this.value);
},

@@ -190,0 +192,0 @@ enumerable: false,

{
"name": "factorial-form",
"version": "3.1.0",
"version": "3.2.0",
"description": "Factorial form library",

@@ -5,0 +5,0 @@ "repository": {

@@ -32,2 +32,3 @@ import typescript from 'rollup-plugin-typescript2';

'lodash/isObject',
'lodash/isEqual',
'moment',

@@ -34,0 +35,0 @@ 'flat',

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