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

bahai-reflib-data

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bahai-reflib-data - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

CHANGES.md
# CHANGES for `bahai-reflib-data`
## 0.5.2
- fix: due to Reflib sometimes using different characters for their
Table of Contents and headings (at least in Persian), with ID not available,
we match by URL instead
## 0.5.1

@@ -4,0 +10,0 @@

2

package.json
{
"name": "bahai-reflib-data",
"version": "0.5.1",
"version": "0.5.2",
"author": "Brett Zamir <brettz9@yahoo.com>",

@@ -5,0 +5,0 @@ "contributors": [],

@@ -106,6 +106,19 @@ import {

async function getSectionNamesForWork (work, language) {
const sections = await getSections(language);
const [works, sections] = await Promise.all([
getWorks(language),
getSections(language)
]);
return sections.subSections.filter(({parentUrl}) => {
const mainSection = sections.mainSections.find(({title}) => {
return title === work;
// Due to a mismatch between the title found on the Table of Contents,
// and the one found as a heading on the page (e.g.,
// 'سراپردۀ يگانگی' and 'سراپردهٔ یگانگی', we need to match another way
// between section and work. But since the Table of Contents
// apparently doesn't store the ID, we need to check the works,
// directly, cross-referenced by parentUrl/url
const mainSection = sections.mainSections.find(({
parentUrl: mainSectionParentUrl
}) => {
return mainSectionParentUrl === works.find(({url, title}) => {
return work === title;
}).url;
});

@@ -112,0 +125,0 @@ return mainSection && mainSection.parentUrl === parentUrl;

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