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

fulcrum-app

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fulcrum-app - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

fulcrum.js

32

lib/api/records.js

@@ -1,5 +0,7 @@

var Base, Records, mixins,
var Base, Records, async, mixins,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
async = require('async');
mixins = require('./mixins/');

@@ -28,2 +30,30 @@

Records.prototype.history = function(id, cb) {
var do_get, do_process_http_errors, tasks;
do_get = (function(_this) {
return function(callback) {
return _this.request('get', _this.url(id) + '/history', null, function(error, response, body) {
if (error) {
return callback(error);
} else {
return callback(null, response, body);
}
});
};
})(this);
do_process_http_errors = (function(_this) {
return function(response, body, callback) {
return _this.process_http_errors(response, function(error) {
if (error) {
return callback(error);
} else {
return callback(null, body);
}
});
};
})(this);
tasks = [do_get, do_process_http_errors];
return async.waterfall(tasks, cb);
};
return Records;

@@ -30,0 +60,0 @@

11

package.json
{
"name": "fulcrum-app",
"version": "0.1.1",
"version": "0.2.0",
"description": "JavaScript wrapper for the Fulcrum API",

@@ -16,2 +16,5 @@ "main": "lib/index.js",

],
"browser": {
"request": "xhr"
},
"author": "Jason Sanford",

@@ -25,8 +28,10 @@ "license": "MIT",

"gulp-mocha": "~0.5.0",
"nock": "~0.42.1"
"nock": "~0.42.1",
"coffeeify": "~0.6.0"
},
"dependencies": {
"request": "~2.37.0",
"async": "~0.9.0"
"async": "~0.9.0",
"xhr": "1.13.0"
}
}

@@ -24,2 +24,15 @@ var assert = require('assert');

describe('#history()', function(){
it('should return records.', function(done){
var nocker = nock('https://api.fulcrumapp.com')
.get('/api/v2/records/916474a7-b995-4b36-81db-8eda97f93a73/history')
.replyWithFile(200, __dirname + '/objects/record_history.json');
client.records.history('916474a7-b995-4b36-81db-8eda97f93a73', function(error, history) {
assert.ifError(error);
assert(history.records instanceof Array, 'records is not an array.');
done();
});
});
});
describe('#delete()', function(){

@@ -26,0 +39,0 @@ it('should not return an error if deleted.', function(done){

Sorry, the diff of this file is not supported yet

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