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

express-rest-api-generator

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-rest-api-generator - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

8

lib/index.js
const bodyParser = require('body-parser');
const log = require('debug')('rest:'); // eslint-disable-line
const log = require('debug')('bot:app:rest:'); // eslint-disable-line
const { slugify, toNum, omit } = require('./helpers');

@@ -86,5 +86,7 @@

if (!keys.length) return next();
log(req[this.key]);
req[this.key] = req[this.key]
.map(wrapper => wrapper
.map(collection => omit(collection._doc, keys)))
.map(mixed => Array.isArray(mixed) // eslint-disable-line
? mixed.map(collection => omit(collection._doc, keys))
: omit(mixed._doc, keys))
.shift();

@@ -91,0 +93,0 @@ return next();

{
"name": "express-rest-api-generator",
"version": "1.3.0",
"version": "1.3.1",
"description": "express mountable app for mongoose routes with generators for mongoose model embedded statics",

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

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