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

api-test

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-test - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

test/api-test/insertion.md

30

classes/Insertion.js

@@ -28,6 +28,8 @@ 'use strict'

Insertion.prototype.execute = function (db, context, done) {
var that = this
var that = this,
value
// Prepare the document
context[that.name] = this.value.execute(context, '<' + this.name + ' in ' + this.collection + '>')
value = this.value.execute(context, '<' + this.name + ' in ' + this.collection + '>')
context[that.name] = copyDeep(value)
db.collection(this.collection).insert(context[that.name], {

@@ -38,2 +40,24 @@ w: 1

module.exports = Insertion
module.exports = Insertion
/**
* @param {*} x
* @returns {*}
* @private
*/
function copyDeep(x) {
var r, key
if (Array.isArray(x)) {
return x.map(copyDeep)
} else if (x && typeof x === 'object' &&
(x.constructor === Object || !Object.getPrototypeOf(x))) {
// Map
r = Object.create(null)
for (key in x) {
r[key] = copyDeep(x[key])
}
return r
} else {
return x
}
}

2

package.json
{
"name": "api-test",
"version": "1.7.2",
"version": "1.7.3",
"author": "Sitegui <sitegui@sitegui.com.br>",

@@ -5,0 +5,0 @@ "description": "API testing made simple",

@@ -97,2 +97,6 @@ 'use strict'

app.post('/echo', function (req, res) {
res.success(req.body)
})
server = http.createServer(app)

@@ -99,0 +103,0 @@ server.listen(port)

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