npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fwew.js

v3.0.1

Published

JavaScript wrapper for the Fwew Na'vi Dictionary API written in TypeScript

Downloads

8

Readme

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