npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bibletags/bibletags-ui-helper

v0.11.24

Published

## About

Downloads

38

Readme

Bible Tags

About

Original language Bible study for everyone, in every language.

Vision: That every Christian might have free access to the Bible tagged to the original Hebrew, Aramaic and Greek with parsing and lexical information—all in their own language.

For more information on this project, see the Bible Tags website.

Repos

Bugs

bibletags-ui-helper

This repo provides functions used in bibletags-react-native-app, bibletags-widget, and bibletags-data.

Special notes on word divisions

Most modern languages separate words with spaces or other punctuation, but there are some exceptions. See here and here.

To address this, a word divider regex will need to be provided for any text where the default /[\\P{L}]+/gu is not the valid regex for the split function.

This will leave some languages without precise word dividers, resulting, at times, in smaller divisions than words (e.g. syllables). While this is not ideal for these languages, it should nonetheless allow all aspects of the app and widget to function properly, and only require a bit more clicking/tapping when tagging these texts to the original languages.

Programmatic exceptions to this approach will be few. To date, the following exception(s) exist:

  • Possession and contractions in English using an apostraphe. E.g. Balaam’s, shouldn’t. Such apostraphes will be escaped before the word divider regex is used to split the verse.

Please contact us to suggest any programmatic exceptions for other languages.

Known examples of languages without precise word dividers:

  • Vietnamese and Tai Lü use spaces to divide by syllable.
  • Tibetan and Dzongkha use other marks to divide by syllable.
  • While most Chinese characters are a single word, some words are made up of more than one.
  • Japanese characters are each a single syllable.
  • Lao translation may or may not use spaces.

Note: While embedding sites/apps providing USFM for verse content could distinguish between words, this information cannot be relied upon since other embedding sites/apps may only provide plain text.

Functions exposed

getOrigLangVersionIdFromRef(ref): "uhb" | "ugnt"
getOrigLangAndLXXVersionInfo(): Object
getOrigLanguageText(languageId): String  // "Hebrew" or "Greek" in the proper language
getVersionStr(versionId): String  //e.g. "Hebrew (UHB)" or "ESV"
getRefsInfo({ refs, skipBookName, abbreviated, usfmBookAbbr }): Object  // e.g. { bookId: 1, chapter: 1, start_verse: 1, end_verse: 2 }
getPassageStr(params): String  // e.g. "Genesis 1:2–3"
getBibleBookName(bookId): String  // in the proper language
getUsfmBibleBookAbbr(bookId): String  // e.g. "GEN"
getBookIdFromUsfmBibleBookAbbr(abbr): Int  // between 1-66
getRefsFromUsfmRefStr(usfmRefStr): [ Object ]
getUsfmRefStrFromLoc(loc): String
getBibleBookAbbreviatedName(bookId): String  // e.g. "Gen"
getNormalizedPOSCode({ morphLang, morphPos }): String
getPOSTerm({ languageId, posCode }): String
getMorphPartDisplayInfo({ morphLang, morphPart, isPrefixOrSuffix, wordIsMultiPart }): { str: String, color: String }
getMainWordPartIndex(wordParts): Int
getStrongs(wordInfo): String
getIsEntirelyPrefixAndSuffix(wordInfo): Boolean
hash64(str): String
getWordsHash({ usfm, wordDividerRegex }): [ String ]
getWordHashes({ usfm, wordDividerRegex }): [ { wordNumberInVerse: Int, hash: String, withBeforeHash: String, withAfterHash: String, withBeforeAndAfterHash: String }
isValidEmail(email): Boolean
isOriginalLanguageSearch(searchText): String
getTextLanguageId({ languageId, bookId }): String
isRTLText({ languageId, bookId, searchString }): Boolean
getCopyVerseText({ pieces, ref, versionAbbr }): String | undefined
getMorphInfo(morph): Object
getColorWithOpacity(color='rgba(0,0,0,1)', opacity): String
passOverI18n(i18nFunc): null
passOverI18nNumber(i18nNumberFunc): null
blockUsfmMarkers: Array
wordPartDividerRegex: RegExp
headingBlockUsfmMarkers: Array
inlineUsfmMarkers: Array
specialUsfmMarkers: Array
tagInList({ tag, list }): Boolean
getPiecesFromUSFM({ usfm='', inlineMarkersOnly, wordDividerRegex, splitIntoWords }): Array
splitVerseIntoWords({ usfm, wordDividerRegex, pieces, isOriginal }): Array
adjustPiecesForSpecialHebrew({ isOriginal, languageId, pieces }): Array
adjustTextForSups({ tag, text, pieces, idx }): String
getNormalizedGreekPOSCode(posCode): String
getGreekPOSTerm(posCode): String
getGreekPOSTypeTerm(posCode): String
getGreekMorphPartDisplayInfo({ morphPart }): Object
getHebrewPOSTerm(posCode): String
getGrammarColor({ isPrefixOrSuffix, morphPart="" }): String | undefined
grammarColors: Object
getHebrewMorphPartDisplayInfo({ morphLang, morphPart, isPrefixOrSuffix, wordIsMultiPart }): Object
bibleSearch({ query, flags, hebrewOrdering, offset, limit, getVersions, getUnitWords, getUnitRanges, getVerses, maxNumVersion=5, doClocking=false }): Object
getQueryAndFlagInfo({ query, FLAG_MAP={} }): Object
getInfoOnResultLocs({ resultsNeedingUsfm, lookupVersionInfo }): Object
containsHebrewChars(str): Boolean
containsGreekChars(str): Boolean
removeCantillation(usfm): String
stripHebrewVowelsEtc(str): String
normalizeSearchStr({ str, languageId }): String
stripVocalOfAccents(str): String
findLanguage({ searchStr, maxNumHits }): [Object]
getLanguageInfo(iso6393): Object

Constants exposed

defaultWordDividerRegex: String
bibleSearchScopes: Object