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

bahai-indexes

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bahai-indexes - npm Package Compare versions

Comparing version 0.8.2 to 0.8.3

4

CHANGES.md
# CHANGES to `bahai-indexes`
## 0.8.3
- fix: was not separating by book in multi-book view
## 0.8.2

@@ -4,0 +8,0 @@

17

indexes/json/searchEntriesFormSubmit.js

@@ -149,14 +149,19 @@ /* eslint-disable no-unsanitized/property -- Source must be trusted as

const ul = document.createElement('ul');
let bookUl;
const bookUl = book ? null : document.createElement('ul');
const visited = {};
results.forEach((result) => {
if (!book) {
bookUl = document.createElement('ul');
let bookUlInner;
if (!book && !visited[result.$book]) {
const bookLi = document.createElement('li');
const bold = document.createElement('b');
bookUlInner = document.createElement('ul');
bold.textContent = `[${result.$book}]`;
bookLi.append(bold);
bookLi.append(ul);
bookLi.append(bookUlInner);
bookUl.append(bookLi);
resultsHolder.append(bookUl);
visited[result.$book] = true;
}
traverse(result, ul, (obj, parent) => {
traverse(result, bookUlInner || ul, (obj, parent) => {
const li = document.createElement('li');

@@ -182,3 +187,3 @@ li.innerHTML = obj.$text;

resultsHolder.append(bookUl || ul);
if (!bookUl) resultsHolder.append(ul);
}

@@ -185,0 +190,0 @@ }

@@ -150,14 +150,19 @@ /* eslint-disable no-unsanitized/property -- Source must be trusted as

const ul = document.createElement('ul');
let bookUl;
const bookUl = book ? null : document.createElement('ul');
const visited = {};
results.forEach((result) => {
if (!book) {
bookUl = document.createElement('ul');
let bookUlInner;
if (!book && !visited[result.$book]) {
const bookLi = document.createElement('li');
const bold = document.createElement('b');
bookUlInner = document.createElement('ul');
bold.textContent = `[${result.$book}]`;
bookLi.append(bold);
bookLi.append(ul);
bookLi.append(bookUlInner);
bookUl.append(bookLi);
resultsHolder.append(bookUl);
visited[result.$book] = true;
}
traverse(result, ul, (obj, parent) => {
traverse(result, bookUlInner || ul, (obj, parent) => {
const li = document.createElement('li');

@@ -183,3 +188,3 @@ li.innerHTML = obj.$text;

resultsHolder.append(bookUl || ul);
if (!bookUl) resultsHolder.append(ul);
}

@@ -186,0 +191,0 @@ }

{
"name": "bahai-indexes",
"type": "module",
"version": "0.8.2",
"version": "0.8.3",
"description": "Indexes to the Bahá'í Writings in JSON form",

@@ -6,0 +6,0 @@ "main": "src/buildFlattenedJSONAndJS.js",

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