3.0.1 • Published 9 months ago

fwew.js v3.0.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
9 months ago

fwew.js

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

Features

  • 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

Installation

Install fwew.js with your favorite package manager:

  npm install fwew.js
  yarn add fwew.js
  pnpm add fwew.js
  bun install fwew.js

Usage/Examples

Search Na'vi words

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)
})

Search English Na'vi

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)
})

Search for both Na'vi English and English Na'vi

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)
})

List words with given properties

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)
})

Get random words

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)
})

Translate Na'vi numbers

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)
})

Convert numbers to Na'vi

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)
})

Get Na'vi names

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)
})
3.0.1

9 months ago

3.0.0

9 months ago

2.7.4

11 months ago

2.7.3

11 months ago

2.7.5

11 months ago

2.7.2

11 months ago

2.7.1

11 months ago

2.7.0

12 months ago

2.6.0

1 year ago

2.5.0

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.5.3

1 year ago

2.4.4

1 year ago

2.4.3

1 year ago

2.4.2

1 year ago

2.4.1

1 year ago

2.4.0

1 year ago

2.3.0

1 year ago

2.2.0

2 years ago

2.1.0

2 years ago

1.2.5

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.4

3 years ago

1.2.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago