Fwew, the powerful Na'vi dictionary search API, made accessible as an npm package written in TypeScript.
- Search: Search for words in either direction or both at once
- List: List words with given properties
- Random: Get random words with given properties
- Numbers: Translate Na'vi numbers to and from Arabic numerals
- Names: Get Na'vi names in various formats, generated by Fwew API
Install fwew.js with your favorite package manager:
npm install fwew.js
yarn add fwew.js
pnpm add fwew.js
bun install fwew.js
import { fwew } from 'fwew.js'
// async/await
async function demoFwew() {
const results = await fwew('kaltxì')
console.log(results)
}
// promise
fwew('kaltxì').then((results) => {
console.log(results)
})
import { fwewReverse } from 'fwew.js'
// async/await
async function demoFwewReverse() {
const results = await fwewReverse('en', 'hello')
console.log(results)
}
// promise
fwewReverse('en', 'hello').then((results) => {
console.log(results)
})
import { search } from 'fwew.js'
// async/await
async function demoSearch() {
const result = await search('en', 'kaltxì hello')
console.log(result)
}
// promise
search('en', 'kaltxì hello').then((results) => {
console.log(results)
})
import { list } from 'fwew.js'
// async/await
async function demoList() {
const results = await list('word starts tì and pos is n.')
console.log(results)
}
// promise
list('word starts tì and pos is n.').then((results) => {
console.log(results)
})
import { random } from 'fwew.js'
// async/await
async function demoRandom() {
const results = await random(8, 'pos is vtr.')
console.log(results)
}
// promise
random(8, 'pos is vtr.').then((results) => {
console.log(results)
})
import { naviToNumber } from 'fwew.js'
// async/await
async function demoNaviToNumber() {
const result = await naviToNumber('mevopey')
console.log(result)
}
// promise
naviToNumber('mevopey').then((result) => {
console.log(result)
})
import { numberToNavi } from 'fwew.js'
// async/await
async function demoNumberToNavi() {
const result = await numberToNavi(42)
console.log(result)
}
// promise
numberToNavi(42).then((result) => {
console.log(result)
})
import { nameAlu, nameFull, nameSingle } from 'fwew.js'
// async/await
export async function demoNameAlu() {
const names = await nameAlu('10', '3', 'normal noun', 'any', 'forest')
console.log(names)
}
export async function demoNameFull() {
const names = await nameFull("'ite", '10', '3', '2', '2', 'forest')
console.log(names)
}
export async function demoNameSingle() {
const names = await nameSingle('10', '2', 'reef')
console.log(names)
}
// promise
nameAlu('10', '3', 'normal noun', 'any', 'forest').then((names) => {
console.log(names)
})
nameFull("'ite", '10', '3', '2', '2', 'forest').then((names) => {
console.log(names)
})
nameSingle('10', '2', 'reef').then((names) => {
console.log(names)
})