lexifer
v1.2.5
Published
A highly customizable wordgen for conlangers
Downloads
5
Readme
lexifer
This is a TypeScript implementation of William Annis's Lexifer.
For full documentation, see the docs here.
To compile this, run the build shell script. This can be run directly, or with
yarn prepack
. Windows users may NOT use powershell, and will have to install
a proper shell terminal.
To run only the tests, use yarn test
.
Using Lexifer in your project
To use Lexifer in your project, install it as with any other dependency:
# with npm
npm i -S lexifer
# with yarn
yarn add lexifer
And then, in your script:
// in CommonJS
const lexifer = require('lexifer');
// in TypeScript with --module commonjs, node12, or nodenext
import lexifer = require('lexifer');
// in ES modules
import lexifer from 'lexifer';
Lexifer comes bundled with its own type declarations. However, these declarations are not parsed properly by TypeScript v3.5 and earlier. If you're using Lexifer in a TypeScript project, you must be using TypeScript v3.6 or later.
To use your project as a lexifer frontend, use the default export:
import lexifer from 'lexifer';
console.log(
lexifer(
// ...inputs
)
);
Other utilities, such as lexifer.ClusterEngine
, are also exposed. See the
API documentation for full details.