You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

feathers-memory

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-memory - npm Package Compare versions

Comparing version

to
0.5.1

24

lib/index.js

@@ -24,2 +24,4 @@ 'use strict';

var _feathersErrors2 = _interopRequireDefault(_feathersErrors);
var _utils = require('./utils');

@@ -33,3 +35,5 @@

require('babel-polyfill');
if (!global._babelPolyfill) {
require('babel-polyfill');
}

@@ -72,6 +76,6 @@ var Service = (function () {

if (filters.$skip) {
values = values.slice(parseInt(filters.$skip, 10));
values = values.slice(filters.$skip);
}
var limit = parseInt(filters.$limit || this.paginate.default, 10);
var limit = filters.$limit || this.paginate.default;

@@ -93,3 +97,3 @@ if (limit) {

limit: limit,
skip: parseInt(filters.$skip || 0, 10),
skip: filters.$skip || 0,
data: values

@@ -108,3 +112,3 @@ });

return Promise.reject(new _feathersErrors.types.NotFound('No record found for id \'' + id + '\''));
return Promise.reject(new _feathersErrors2.default.NotFound('No record found for id \'' + id + '\''));
}

@@ -126,3 +130,3 @@ }, {

if (this.store[id]) {
return Promise.reject(new _feathersErrors.types.Conflict('A record with id: ' + id + ' already exists'));
return Promise.reject(new _feathersErrors2.default.Conflict('A record with id: ' + id + ' already exists'));
}

@@ -136,3 +140,3 @@

if (id === null || Array.isArray(data)) {
return Promise.reject(new _feathersErrors.types.BadRequest('You can not replace multiple instances. Did you mean \'patch\'?'));
return Promise.reject(new _feathersErrors2.default.BadRequest('You can not replace multiple instances. Did you mean \'patch\'?'));
}

@@ -147,3 +151,3 @@

return Promise.reject(new _feathersErrors.types.NotFound('No record found for id \'' + id + '\''));
return Promise.reject(new _feathersErrors2.default.NotFound('No record found for id \'' + id + '\''));
}

@@ -173,3 +177,3 @@ }, {

return Promise.reject(new _feathersErrors.types.NotFound('No record found for id \'' + id + '\''));
return Promise.reject(new _feathersErrors2.default.NotFound('No record found for id \'' + id + '\''));
}

@@ -196,3 +200,3 @@ }, {

return Promise.reject(new _feathersErrors.types.NotFound('No record found for id \'' + id + '\''));
return Promise.reject(new _feathersErrors2.default.NotFound('No record found for id \'' + id + '\''));
}

@@ -199,0 +203,0 @@ }]);

@@ -83,2 +83,4 @@ 'use strict';

_lodash2.default.each($sort, function (modifier, key) {
modifier = parseInt(modifier, 10);
if (first[key] < second[key]) {

@@ -85,0 +87,0 @@ comparator -= 1 * modifier;

{
"name": "feathers-memory",
"description": "An in memory service store",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "https://github.com/feathersjs/feathers-memory",

@@ -50,3 +50,3 @@ "main": "lib/",

"babel-polyfill": "^6.2.0",
"feathers-errors": "^0.2.5",
"feathers-errors": "^1.1.4",
"feathers-query-filters": "^1.1.1",

@@ -53,0 +53,0 @@ "lodash": "^3.10.1",