openprofile 0.1.102 → 0.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,8 @@
1
1
  // Helpers
2
- const accessor = data => { const find = id => data.find(index => index.id === id); return find;};
2
+ const accessor = (data = []) => {
3
+ if (!Array.isArray(data)) {return () => undefined;}
4
+ return id => data.find(entry => entry.id === id);
5
+ };
3
6
 
4
7
  // Functions
5
8
  const ready = (token, data) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openprofile",
3
- "version": "0.1.102",
3
+ "version": "0.1.103",
4
4
  "description": "OpenProfile is a free original character database and collaboration platform made by and for writers.",
5
5
  "main": "index.js",
6
6
  "keywords": ["original character database", "OC database", "writing collaboration", "character creation tool", "worldbuilding platform", "writers' community" ,"roleplaying character storage", "digital character sheet", "OC management tool", "collaborative storytelling"],