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

blueflag-record

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

blueflag-record - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

11

lib/__tests__/Record-test.js

@@ -41,3 +41,3 @@ "use strict";

start: {
notSetValue: new Date('2000-01-01'),
notSetValue: '2000-01-01',
get: function get(value) {

@@ -123,3 +123,6 @@ return new Date(value);

});
it('applies config.get to the value', function () {
it('will not apply getters to toObject', function () {
expect(new DateRecord({}).toObject().start).toBe('2000-01-01');
});
it('applies getter to the value', function () {
var date = new DateRecord({

@@ -130,2 +133,6 @@ start: '2001-01-01'

});
it('applies getter to the notSetValue', function () {
var date = new DateRecord({});
expect(date.start).toEqual(new Date('2000-01-01'));
});
});

@@ -132,0 +139,0 @@ describe('setters', function () {

8

lib/Record.js

@@ -98,9 +98,3 @@ "use strict";

get: nonEnumerable(function (key, notFoundValue) {
var value = _this._data[key];
if (value !== undefined) {
return (keyConfig[key].get || indentity)(value);
}
return notFoundValue || (0, _get.default)(key)(_this._notSetValues);
return getter(key, _this._data[key] || notFoundValue || _this._notSetValues[key]);
}),

@@ -107,0 +101,0 @@ getIn: nonEnumerable(function (path, notFoundValue) {

{
"main": "lib/index.js",
"name": "blueflag-record",
"version": "0.2.0",
"version": "0.3.0",
"description": "An Unmutable compatible record",

@@ -6,0 +6,0 @@ "license": "MIT",

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