Socket
Socket
Sign inDemoInstall

@commodo/fields

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commodo/fields - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

32

fields/createField.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -10,18 +8,15 @@ value: true

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
const createField = (_ref) => {
let {
type,
list,
validation,
get,
set
} = _ref,
rest = (0, _objectWithoutProperties2.default)(_ref, ["type", "list", "validation", "get", "set"]);
return function (parent) {
this.parent = parent;
const createField = ({
type,
list,
validation,
get,
set,
value
}) => {
return function (name, parent) {
this.get = get;
this.set = set;
this.name = "";
this.name = name;
this.parent = parent;
this.type = type;

@@ -98,5 +93,6 @@ this.list = list;

typeof this.construct === "function" && this.construct();
typeof this.init === "function" && this.init();
if ("value" in rest) {
this.setValue(rest.value);
if (typeof value !== "undefined") {
this.setValue(value);
}

@@ -103,0 +99,0 @@ };

{
"name": "@commodo/fields",
"version": "0.2.5",
"version": "0.2.6",
"main": "index.js",

@@ -31,3 +31,3 @@ "repository": {

},
"gitHead": "c520a46ef8589ffdd9ce4c34583be5fd6da49671"
"gitHead": "2b3250e5ee7de76475e48a509309acee3a7cbacb"
}

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

const valueFactory = fieldsList[newFieldName];
instance.__withFields.fields[newFieldName] = new valueFactory();
instance.__withFields.fields[newFieldName] = new valueFactory(newFieldName, instance);
Object.defineProperty(instance, newFieldName, {

@@ -47,8 +47,2 @@ get() {

});
instance.__withFields.fields[newFieldName].name = newFieldName;
instance.__withFields.fields[newFieldName].parent = instance;
if (typeof instance.__withFields.fields[newFieldName].init === "function") {
instance.__withFields.fields[newFieldName].init();
}
}

@@ -55,0 +49,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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