Socket
Socket
Sign inDemoInstall

@toolz/allow

Package Overview
Dependencies
4
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.8 to 1.1.0

5

package.json
{
"name": "@toolz/allow",
"version": "1.0.8",
"version": "1.1.0",
"description": "Provides validation of data types",

@@ -58,4 +58,5 @@ "keywords": [

"dependencies": {
"@toolz/is-a-regular-object": "^1.0.1"
"@toolz/is-a-regular-object": "^1.0.1",
"@toolz/local-storage": "^1.0.2"
}
}

4

README.md

@@ -612,2 +612,4 @@ # allow

can be toggled with setAllowNull().
If localStorage is available, the allowNull value will be set there.
This allows the setting to be saved once in the lifecycle of the app.
*/

@@ -629,2 +631,4 @@ ```

'ignore' will turn off all warnings and cease the throwing of all Errors.
If localStorage is available, the failureBehavior value will be set there.
This allows the setting to be saved once in the lifecycle of the app.
*/

@@ -631,0 +635,0 @@ ```

import { isARegularObject } from '@toolz/is-a-regular-object';
import { local } from '@toolz/local-storage';
const Allow = () => {
let allowNull = false;
let allowNull = local.getItem('allow.allowNull', false);
const failureBehavior = {

@@ -10,3 +11,3 @@ IGNORE: 'ignore',

};
let currentFailureBehavior = failureBehavior.THROW;
let currentFailureBehavior = local.getItem('allow.failureBehavior', failureBehavior.THROW);
let onFailure = () => {

@@ -211,3 +212,3 @@ //

aBoolean(newAllowNull);
allowNull = newAllowNull;
allowNull = local.setItem('allow.allowNull', newAllowNull);
};

@@ -217,3 +218,3 @@

oneOf(behavior, failureBehavior);
currentFailureBehavior = behavior;
currentFailureBehavior = local.setItem('allow.failureBehavior', behavior);
};

@@ -220,0 +221,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc