New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

slumber

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slumber - npm Package Compare versions

Comparing version

to
0.10.0

examples/post-file.coffee

25

lib/API.js

@@ -25,2 +25,3 @@ // Generated by CoffeeScript 1.10.0

this.put = bind(this.put, this);
this.postForm = bind(this.postForm, this);
this.post = bind(this.post, this);

@@ -128,2 +129,5 @@ this["delete"] = bind(this["delete"], this);

}
if (kwargs.formData != null) {
request_options.formData = kwargs.formData;
}
if (this.opts.auth) {

@@ -162,3 +166,4 @@ request_options.auth = {

args: {},
data: {}
data: {},
formData: {}
};

@@ -274,2 +279,20 @@ translation = {

_Class.prototype.postForm = function(formData, fn) {
var handle, opts, resp;
if (fn == null) {
throw Error('Missing callback');
}
opts = this._prepare_opts(formData, 'formData');
handle = (function(_this) {
return function(err, response, body) {
var ref1;
if ((200 <= (ref1 = response.statusCode) && ref1 <= 299)) {
return _this.wrap_response(fn, err, response, _this._try_to_serialize(response, body));
}
return _this.wrap_response(fn, err, response, true);
};
})(this);
return resp = this._request('POST', opts, handle);
};
_Class.prototype.put = function(data, fn) {

@@ -276,0 +299,0 @@ var handle, opts, resp;

22

package.json
{
"name": "slumber",
"version": "0.9.0",
"version": "0.10.0",
"description": "Port of Python's slumber library -- A library that makes consuming a RESTful API easier and more convenient",

@@ -21,14 +21,14 @@ "main": "lib/index.js",

"dependencies": {
"debug": "^2.1.3",
"querystring": "0.2.0",
"request": "^2.55.0"
"debug": "^2.2.0",
"querystring": "^0.2.0",
"request": "^2.72.0"
},
"devDependencies": {
"coffee-script": "",
"mocha": "",
"express": "",
"freeport": "",
"url": "0.7",
"yamljs": "0.1",
"connect": "2"
"body-parser": "^1.15.2",
"coffee-script": "^1.10.0",
"express": "^4.14.0",
"freeport": "^1.0.5",
"mocha": "^2.5.3",
"url": "^0.11.0",
"yamljs": "^0.2.8"
},

@@ -35,0 +35,0 @@ "optionalDependencies": {

@@ -6,7 +6,2 @@ Slumber (Node.js version)

[![Dependency Status](https://david-dm.org/moul/node-slumber.png?theme=shields.io)](https://david-dm.org/moul/node-slumber)
[![authors](https://sourcegraph.com/api/repos/github.com/moul/node-slumber/badges/authors.png)](https://sourcegraph.com/github.com/moul/node-slumber)
[![library users](https://sourcegraph.com/api/repos/github.com/moul/node-slumber/badges/library-users.png)](https://sourcegraph.com/github.com/moul/node-slumber)
[![Total views](https://sourcegraph.com/api/repos/github.com/moul/node-slumber/counters/views.png)](https://sourcegraph.com/github.com/moul/node-slumber)
[![Views in the last 24 hours](https://sourcegraph.com/api/repos/github.com/moul/node-slumber/counters/views-24h.png)](https://sourcegraph.com/github.com/moul/node-slumber)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/moul/node-slumber/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

@@ -13,0 +8,0 @@ ![NPM Badge](https://nodei.co/npm/slumber.png?downloads=true&stars=true "NPM Badge")

// Generated by CoffeeScript 1.10.0
(function() {
var CUSTOMERS, app, assert, base_url, connect, express, freeport, querystring, slumber, url;
var CUSTOMERS, app, assert, base_url, bodyParser, express, freeport, querystring, slumber, url;

@@ -13,6 +13,6 @@ querystring = require('querystring');

connect = require('connect');
freeport = require('freeport');
bodyParser = require('body-parser');
slumber = require('..');

@@ -42,5 +42,5 @@

app.use(connect.urlencoded());
app.use(bodyParser.urlencoded());
app.use(connect.json());
app.use(bodyParser.json());

@@ -47,0 +47,0 @@ app.get('/', function(req, res) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet