Socket
Socket
Sign inDemoInstall

strapi-utils

Package Overview
Dependencies
Maintainers
8
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-utils - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

lib/__tests__/relations.test.js

2

lib/convert-rest-query-params.js

@@ -5,3 +5,3 @@ 'use strict';

* Converts the standard Strapi REST query params to a moe usable format for querying
* You can read more here: https://strapi.io/documentation/3.0.0-beta.x/guides/filters.html
* You can read more here: https://strapi.io/documentation/developer-docs/latest/content-api/parameters.html#filters
*/

@@ -8,0 +8,0 @@

'use strict';
const { prop } = require('lodash/fp');
const MANY_RELATIONS = ['oneToMany', 'manyToMany', 'manyWay'];
const RF_RELATIONS = ['oneToMany', 'manyToMany', 'manyWay', 'manyToOne', 'oneWay', 'oneToOne'];
const getRelationalFields = modelDef => {
return modelDef.associations.filter(a => RF_RELATIONS.includes(a.nature)).map(prop('alias'));
};
module.exports = {
getRelationalFields,
constants: {

@@ -7,0 +15,0 @@ MANY_RELATIONS,

{
"name": "strapi-utils",
"version": "3.4.0",
"version": "3.4.1",
"description": "Shared utilities for the Strapi packages",

@@ -48,3 +48,3 @@ "homepage": "http://strapi.io",

"license": "SEE LICENSE IN LICENSE",
"gitHead": "ea636b4d31617659ea3ad567e679b35cfe940295"
"gitHead": "8b9c3f2052ba449c653a9c4b90bdf09f98cf477d"
}
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