factorial-form
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -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() | ||
}) | ||
}) | ||
}) | ||
}) |
@@ -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', |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
39375
12
1012
1