more exposed
This commit is contained in:
parent
46c897735d
commit
07707195b1
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/pashto-inflector",
|
||||
"version": "3.8.3",
|
||||
"version": "3.8.4",
|
||||
"author": "lingdocs.com",
|
||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||
"homepage": "https://verbs.lingdocs.com",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import { isPashtoScript } from "./is-pashto";
|
||||
|
||||
test("isPashtoScript works", () => {
|
||||
expect(isPashtoScript("کور")).toBe(true);
|
||||
expect(isPashtoScript("kor")).toBe(false);
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Determines if a string is written in Pashto script;
|
||||
*/
|
||||
|
||||
const pashtoLetters = /[\u0600-\u06FF]/;
|
||||
|
||||
export function isPashtoScript(s: string): boolean {
|
||||
return pashtoLetters.test(s);
|
||||
}
|
|
@ -26,13 +26,13 @@ import {
|
|||
specifyEquativeLength,
|
||||
} from "./blocks-utils";
|
||||
|
||||
const blank: T.PsString = {
|
||||
export const blank: T.PsString = {
|
||||
p: "_____",
|
||||
f: "_____",
|
||||
};
|
||||
type BlankoutOptions = { equative?: boolean, ba?: boolean, kidsSection?: boolean, verb?: boolean };
|
||||
|
||||
const kidsBlank: T.PsString = { p: "___", f: "___" };
|
||||
export const kidsBlank: T.PsString = { p: "___", f: "___" };
|
||||
|
||||
|
||||
// function compilePs({ blocks, kids, verb: { head, rest }, VP }: CompilePsInput): T.SingleOrLengthOpts<T.PsString[]> {
|
||||
|
|
|
@ -39,6 +39,9 @@ import Block, { NPBlock, APBlock } from "./components/blocks/Block";
|
|||
import { roleIcon } from "./components/vp-explorer/VPExplorerExplanationModal";
|
||||
import CompiledPTextDisplay from "./components/CompiledPTextDisplay";
|
||||
import RenderedBlocksDisplay from "./components/RenderedBlocksDisplay";
|
||||
import {
|
||||
isPashtoScript,
|
||||
} from "./lib/is-pashto";
|
||||
import {
|
||||
makePsString,
|
||||
removeFVarients,
|
||||
|
@ -120,9 +123,6 @@ import {
|
|||
isSecondPerson,
|
||||
isThirdPerson,
|
||||
} from "./lib/misc-helpers";
|
||||
import {
|
||||
flattenLengths,
|
||||
} from "./lib/phrase-building/compile";
|
||||
import {
|
||||
simplifyPhonetics,
|
||||
} from "./lib/simplify-phonetics";
|
||||
|
@ -153,6 +153,9 @@ import {
|
|||
import {
|
||||
compileEP,
|
||||
compileVP,
|
||||
flattenLengths,
|
||||
blank,
|
||||
kidsBlank,
|
||||
} from "./lib/phrase-building/compile";
|
||||
import {
|
||||
renderAPSelection,
|
||||
|
@ -253,6 +256,9 @@ export {
|
|||
vpsReducer,
|
||||
makeVPSelectionState,
|
||||
blockUtils,
|
||||
blank,
|
||||
kidsBlank,
|
||||
isPashtoScript,
|
||||
// protobuf helpers
|
||||
readDictionary,
|
||||
writeDictionary,
|
||||
|
|
Loading…
Reference in New Issue