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

express-toppings

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-toppings - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

dist/lib/helper.js

@@ -52,3 +52,3 @@ "use strict";

else {
let result = {};
const result = {};
retain.forEach((key) => {

@@ -55,0 +55,0 @@ result[key] = obj[key];

@@ -36,3 +36,3 @@ import { IHTTPResp } from "./helper";

*/
handleResult(res: IHTTPResp, defaultResult: any): ICallback;
handleResult(res: IHTTPResp, defaultResult?: any): ICallback;
/**

@@ -39,0 +39,0 @@ * 200 handler

@@ -77,5 +77,6 @@ {

"scripts": {
"test": "mocha test/**/* --recursive"
"test": "mocha test/**/* --recursive",
"coverage": "istanbul cover _mocha -R spec test/**/*"
},
"version": "1.2.0"
"version": "1.2.1"
}

@@ -1,3 +0,4 @@

# express-toppings [![Build Status](https://travis-ci.org/AkashBabu/express-toppings.svg?branch=master)](https://travis-ci.org/AkashBabu/express-toppings)
# express-toppings [![npm version](https://badge.fury.io/js/express-toppings.svg)](https://badge.fury.io/js/express-toppings) [![Build Status](https://travis-ci.org/AkashBabu/express-toppings.svg?branch=master)](https://travis-ci.org/AkashBabu/express-toppings)
Working with expressjs made even more easier with `express-toppings`

@@ -9,2 +10,12 @@

## Test
> npm install
> npm test
## Coverage
> npm run coverage
## Contributions

@@ -11,0 +22,0 @@

@@ -125,3 +125,3 @@ var chai = require("chai")

console.log("query:", query);
// console.log("query:", query);
request.del("/users?" + query)

@@ -128,0 +128,0 @@ .end((err, res) => {

@@ -30,2 +30,28 @@ var serverHelper = require('../../dist/index');

describe("#retainKeysInObj()", () => {
it("should retain only the specified keys in the given object", () => {
var obj = {
a: 1,
b: 1,
c: 1
}
var modObj = helper.retainKeysInObj(obj, ["a", 'b'])
should.not.exist(modObj.c)
modObj.a.should.be.eql(obj.a)
modObj.b.should.be.eql(obj.b)
should.exist(obj.c)
})
it("should alter the given obj if sameObj=true", () => {
var obj = {
a: 1,
b: 1,
c: 1
}
helper.retainKeysInObj(obj, ["a", 'b'], true)
obj.a.should.be.eql(1)
obj.b.should.be.eql(1)
should.not.exist(obj.c)
})
})
describe("#weakPwd()", () => {

@@ -32,0 +58,0 @@ it("should return error if password length is not greater than minLen", () => {

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