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

ember-cli-simple-store

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-simple-store - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

.npmignore

21

addon/store.js

@@ -62,2 +62,7 @@ import Ember from "ember";

}
if (options instanceof Function) {
var computed_keys = arguments[2];
Ember.assert("No computed keys found for the filter by function", computed_keys);
return this._findWithFilterFunc(type, options, computed_keys);
}
if (typeof options === "object") {

@@ -97,2 +102,18 @@ var params = Object.keys(options);

});
},
_findWithFilterFunc: function(type, filter_func, computed_keys) {
var attributes = [];
computed_keys.forEach(function(computed_key) {
attributes.push("source.@each." + computed_key);
});
return Ember.ArrayProxy.extend({
source: undefined,
content: function () {
var filter_func = this.get("filter_func");
return this.get("source").filter(filter_func);
}.property("" + attributes)
}).create({
filter_func: filter_func,
source: this._findAll(type)
});
}

@@ -99,0 +120,0 @@ });

2

package.json
{
"name": "ember-cli-simple-store",
"version": "0.6.2",
"version": "0.7.0",
"description": "ember-cli addon that provides a simple identity map for ember.js web applications",

@@ -5,0 +5,0 @@ "directories": {

@@ -52,2 +52,13 @@ # ember-cli-simple-store

```js
//find all person models with name toran and salary > 100
var filter = function(person) {
var name = person.get("name");
var salary = person.get("salary");
return name === "toran" && salary > 100;
}
this.store.find("person", filter, ["salary", "name"]);
```
```js
//find the first person model

@@ -54,0 +65,0 @@

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