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

box-view

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

box-view - npm Package Compare versions

Comparing version 0.5.1 to 1.0.0

38

index.js

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

r = req(client.documentsURL + '/' + id, requestOptions, handler);
r.end(JSON.stringify(data));
data = JSON.stringify(data);
r.setHeader('content-length', data.length);
r.end(data);
return r;

@@ -450,2 +452,5 @@ },

source.resume();
cached.pause();
source.pipe(file);

@@ -462,3 +467,4 @@ source.pipe(cached);

} else {
if (source.path) {
if (source.hasOwnProperty('fd')) {
file.fd = cached.fd = source.fd;
file.path = cached.path = source.path;

@@ -506,2 +512,3 @@ }

params,
data = '',
retry = false,

@@ -538,3 +545,6 @@ requestOptions = {

r = req(client.documentsURL, requestOptions, handler);
r.end(JSON.stringify(params));
data = JSON.stringify(params);
r.setHeader('content-length', data.length);
r.end(data);
return r;

@@ -581,9 +591,3 @@ },

url = client.documentsURL + '/' + id + '/content' + extension;
var r = req(url, handler);
r.on('request', function (re) {
if (re.xhr) {
re.xhr.responseType = 'arraybuffer';
}
});
return r;
return req(url, handler);
},

@@ -630,9 +634,3 @@

url = client.documentsURL + '/' + id + '/thumbnail?' + query;
var r = req(url, handler);
r.on('request', function (re) {
if (re.xhr) {
re.xhr.responseType = 'arraybuffer';
}
});
return r;
return req(url, handler);
}

@@ -660,2 +658,3 @@ };

params,
data = '',
retry = false,

@@ -692,3 +691,6 @@ requestOptions = {

r = req(client.sessionsURL, requestOptions, handler);
r.end(JSON.stringify(params));
data = JSON.stringify(params);
r.setHeader('content-length', data.length);
r.end(data);
return r;

@@ -695,0 +697,0 @@ }

{
"name": "box-view",
"version": "0.5.1",
"version": "1.0.0",
"description": "A node client for the Box View API",

@@ -36,3 +36,3 @@ "main": "index.js",

"form-data": "^0.1.4",
"hyperquest": "https://github.com/lakenen/hyperquest/tarball/emit-request"
"hyperquest": "^0.3.0"
},

@@ -39,0 +39,0 @@ "devDependencies": {

@@ -46,4 +46,6 @@ [![Build Status](https://travis-ci.org/lakenen/node-box-view.png?branch=master)](https://travis-ci.org/lakenen/node-box-view)

```js
client.documents.list(function (err, body, res) {
console.log(body)
client.documents.list(function (err, list, res) {
// `list` is the JSON-parsed response body
// `res` is the HTTP Response object
console.log(list);
});

@@ -70,3 +72,5 @@ ```

client.documents.get('some document id', function (err, doc, res) {
console.log(doc)
// `doc` is the JSON-parsed response body
// `res` is the HTTP Response object
console.log(doc);
});

@@ -162,2 +166,3 @@ ```

// `res` is the HTTP Response object
res.pipe(fs.createWriteStream('./doc.zip'));

@@ -190,2 +195,3 @@ });

// `res` is the HTTP Response object
res.pipe(fs.createWriteStream('./thumbnail.png'));

@@ -192,0 +198,0 @@ });

@@ -14,2 +14,4 @@ var TOKEN = process.env.BOX_VIEW_API_TOKEN;

client.documentsUploadURL = process.env.BOX_VIEW_DOCUMENTS_UPLOAD_URL || client.documentsUploadURL;
test('documents.uploadFile should upload the given file when called with a filename', function (t) {

@@ -16,0 +18,0 @@ t.plan(2);

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