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

scheming

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scheming - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

bower.json
{
"name": "scheming",
"version": "1.0.0",
"version": "1.1.0",
"main": "dest/Scheming.js",

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

@@ -546,5 +546,10 @@ (function() {

Scheming._flush = function() {
console.warn("`_flush` is being deprecated in favor of `flush`. Please switch usage over to the public method as `_flush` will be removed in a future release.");
return cm.resolve();
};
Scheming.flush = function() {
return cm.resolve();
};
instanceFactory = function(instance, normalizedSchema, opts) {

@@ -578,3 +583,3 @@ var addWatcher, data, fireWatchers, get, id, propConfig, propName, removeWatcher, seal, set, strict, unwatchers, watchForPropagation, watchers, _fn;

if (setter) {
val = setter(val);
val = setter.call(instance, val);
}

@@ -596,7 +601,4 @@ }

val = data[propName];
if (val === void 0) {
return val;
}
if (getter) {
val = getter(val);
val = getter.call(instance, val);
}

@@ -634,3 +636,3 @@ return val;

cb: cb,
first: true
first: !opts.internal
};

@@ -637,0 +639,0 @@ watchers[target].push(watcher);

{
"name": "scheming",
"version": "1.0.0",
"version": "1.1.0",
"main": "./dest/Scheming.js",

@@ -5,0 +5,0 @@ "repository": "https://github.com/autoric/scheming",

@@ -330,5 +330,5 @@ # Scheming!

- default **value** or **function** Specifies the default value a field should take if it is not defined in the constructor. If a function, the function is executed and the return value is set as the default.
- getter **function** A getter function that is invoked on the data value before retrieval. Takes the original value as input, the returned value is returned on retrieval.
- setter **function** A setter function that is invoked on the data before assignment. Setters are executed AFTER type checking and parsing, so the value your setter receive is guaranteed to be of the correct type.
- validate **function** or **Array of functions** Validator functions, which are invoked when you run validation on a schema instance. Validators take the value as an input, and should return true if validation passes. They should return a string or throw an error indicating the error if validation occurs. If a validator returns any value that is not `true` or a string, validation will fail with a generic error message. See [Schema.validate](#schemavalidate) for details on how validation works.
- getter **function** A getter function that is invoked on the data value before retrieval. Takes the original value as input, the returned value is returned on retrieval. Getter functions are invoked with the `this` context of the instance, and can be used to define virtual fields.
- setter **function** A setter function that is invoked on the data before assignment. Setters are executed AFTER type checking and parsing, so the value your setter receive is guaranteed to be of the correct type. Parsers are not invoked again after the setter is invoked - so if your setter returns a value that breaks the typing, that's on you. Setter functions are not invoked if the value assigned is null or undefined. Setter functions are invoked with the `this` context of the instance.
- validate **function** or **Array of functions** Validator functions, which are invoked when you run validation on a schema instance. Validators take the value as an input, and should return true if validation passes. They should return a string or throw an error indicating the error if validation occurs. If a validator returns any value that is not `true` or a string, validation will fail with a generic error message. See [Schema.validate](#schemavalidate) for details on how validation works. Validation functions are invoked with the `this` context of the instance.
- required **boolean** A special validator that indicates whether the field is required.

@@ -342,3 +342,2 @@

### Schema.validate(instance)

@@ -345,0 +344,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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