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

can-query-logic

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-query-logic - npm Package Compare versions

Comparing version 0.7.5 to 0.8.0

16

can-query-logic-test.js

@@ -219,1 +219,17 @@ require("./src/types/make-real-number-range-inclusive-test");

});
QUnit.test("isPaginated, removePagination", function(assert){
assert.equal( algebra.isPaginated({}), false, "universe is not paginated");
assert.equal( algebra.isPaginated({filter: {foo: "bar"}}), false, "filter is not paginated");
assert.equal( algebra.isPaginated({sort: "bar"}), false, "sort is not paginated");
assert.equal( algebra.isPaginated({page: {start: 1, end: 2}}), true, "page is paginated");
assert.deepEqual( algebra.removePagination({}), {}, "removePagination universe");
assert.deepEqual( algebra.removePagination({filter: {foo: "bar"}}), {filter: {foo: "bar"}}, "removePagination filter");
assert.deepEqual( algebra.removePagination({sort: "bar"}), {sort: "bar"}, "removePagination sort");
assert.deepEqual( algebra.removePagination({page: {start: 1, end: 2}}), {}, "removePagination page");
});

12

can-query-logic.js

@@ -151,4 +151,14 @@ var set = require("./src/set");

return copy;
}
},
isPaginated: function(query) {
var basicQuery = this.hydrate(query);
return !set.isEqual(basicQuery.page, set.UNIVERSAL);
},
removePagination: function(query) {
var basicQuery = this.hydrate(query);
basicQuery.removePagination();
return this.serialize( basicQuery );
},
});

@@ -155,0 +165,0 @@

2

package.json
{
"name": "can-query-logic",
"version": "0.7.5",
"version": "0.8.0",
"description": "query data",

@@ -5,0 +5,0 @@ "homepage": "",

@@ -125,2 +125,5 @@ var set = require("../set");

return this.filter.isMember(props);
},
removePagination: function(){
this.page = new RecordRange();
}

@@ -382,2 +385,2 @@ });

module.exports = BasicQuery;
module.exports = BasicQuery;
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