Skip to content

Latest commit

 

History

History
95 lines (64 loc) · 1.51 KB

README.md

File metadata and controls

95 lines (64 loc) · 1.51 KB

fwew.js

Fwew, the powerful Na'vi dictionary search library, as an npm package written in TypeScript.

Features

  • Search
  • List
  • Random
  • Number

Installation

Install fwew.js with yarn

  yarn add fwew.js

Running Tests

To run tests, run the following command

  yarn test

To run tests with coverage, run

  yarn coverage

Usage/Examples

Search a Na'vi word

import { fwew } from 'fwew.js'

const searchNaviWord = "lì'u"
const results = fwew.translateFromNavi(searchNaviWord)
console.log(results)

Search English → Na'vi

import { fwew } from 'fwew.js'

const searchWord = 'word'
const langCode = 'en'
const results = fwew.translateToNavi(searchNaviWord, langCode)
console.log(results)

List words with given properties

import { list } from 'fwew.js'

const criteria = ['word', 'starts', 'tì', 'and', 'pos', 'is', 'n.']
const results = list(criteria)

console.log(results)

Get random words

import { random } from 'fwew.js'

const criteria = ['pos', 'is', 'vtr.']
const numRandomWords = 8
const results = random(numRandomWords, criteria)
console.log(results)

Translate Na'vi numbers

import { numbers } from "fwew.js"

const result = numbers.naviToNumber("mevopey")
console.log(result)

Convert numbers to Na'vi

import { numbers } from "fwew.js"

const result = numbers.numberToNavi(42)
console.log(result)