Socket
Socket
Sign inDemoInstall

authorized-rules

Package Overview
Dependencies
8
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

4

dist/index.d.ts

@@ -17,3 +17,3 @@ export declare type JwtToken = {

export declare const authorize: <T1 = void, T2 = void, T3 = void, T4 = void>(jwtToken: string, executionRule: Rule<T1 | T2 | T3 | T4>) => Promise<(T1 | T2 | T3 | T4)[]>;
export declare const and: <T extends {}>(rules: Rule<T>[]) => Rule<T>;
export declare const or: <T extends {}>(rules: Rule<T>[]) => Rule<T>;
export declare const and: <T extends {} | undefined>(rules: Rule<T>[]) => Rule<T>;
export declare const or: <T extends {} | undefined>(rules: Rule<T>[]) => Rule<T>;
{
"name": "authorized-rules",
"version": "0.1.3",
"version": "0.1.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -41,3 +41,3 @@ import jwtDecoder from 'jwt-decode';

export const and = <T extends {}>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => {
export const and = <T extends {} | undefined>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => {
let data: T[] = [];

@@ -54,3 +54,3 @@ for (const rule of rules) {

export const or = <T extends {}>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => {
export const or = <T extends {} | undefined>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => {
let data: T[] = [];

@@ -57,0 +57,0 @@ for (const rule of rules) {

Sorry, the diff of this file is not supported yet

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