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

rapiq

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapiq - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

15

dist/parse/module.js

@@ -15,3 +15,12 @@ "use strict";

options !== null && options !== void 0 ? options : (options = {});
const mergeWithGlobalOptions = (data) => {
if (options.defaultPath) {
data.defaultPath = options.defaultPath;
}
return data;
};
const output = {};
if (options.defaultPath) {
output.defaultPath = options.defaultPath;
}
let relations;

@@ -40,3 +49,3 @@ const keys = [

if (value || options[constants_1.Parameter.FIELDS]) {
output[constants_1.Parameter.FIELDS] = (0, parameter_1.parseQueryParameter)(key, value, options[constants_1.Parameter.FIELDS], relations);
output[constants_1.Parameter.FIELDS] = (0, parameter_1.parseQueryParameter)(key, value, mergeWithGlobalOptions(options[constants_1.Parameter.FIELDS]), relations);
}

@@ -48,3 +57,3 @@ break;

if (value || options[constants_1.Parameter.FILTERS]) {
output[constants_1.Parameter.FILTERS] = (0, parameter_1.parseQueryParameter)(key, value, options[constants_1.Parameter.FILTERS], relations);
output[constants_1.Parameter.FILTERS] = (0, parameter_1.parseQueryParameter)(key, value, mergeWithGlobalOptions(options[constants_1.Parameter.FILTERS]), relations);
}

@@ -63,3 +72,3 @@ break;

if (value || options[constants_1.Parameter.SORT]) {
output[constants_1.Parameter.SORT] = (0, parameter_1.parseQueryParameter)(key, value, options[constants_1.Parameter.SORT], relations);
output[constants_1.Parameter.SORT] = (0, parameter_1.parseQueryParameter)(key, value, mergeWithGlobalOptions(options[constants_1.Parameter.SORT]), relations);
}

@@ -66,0 +75,0 @@ break;

4

dist/parse/type.d.ts

@@ -8,5 +8,9 @@ import { Parameter, URLParameter } from '../constants';

[K in `${Parameter}`]?: ParseParameterOptions<K>;
} & {
defaultPath?: string;
};
export declare type ParseOutput = {
[K in `${Parameter}`]?: ParseParameterOutput<K>;
} & {
defaultPath?: string;
};
{
"name": "rapiq",
"version": "0.2.1",
"version": "0.2.2",
"description": "A tiny library which provides utility types/functions for request and response query handling.",

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

@@ -263,8 +263,7 @@ # rapiq 🌈

const output: ParseOutput = parseQuery(req.query, {
defaultPath: 'user',
fields: {
defaultAlias: 'user',
allowed: ['id', 'name', 'realm.id', 'realm.name'],
},
filters: {
defaultAlias: 'user',
allowed: ['id', 'name', 'realm.id'],

@@ -279,3 +278,2 @@ },

sort: {
defaultAlias: 'user',
allowed: ['id', 'name', 'realm.id'],

@@ -282,0 +280,0 @@ }

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