open-index/open-npm huggingface dataset:
npm package: @javaswap/sdk
Description: 🛠 An SDK for building applications on top of Javaswap.
Latest version: 1.1.16

# Javaswap SDK

Forked from the [Uniswap SDK](https://github.com/Uniswap/uniswap-v2-sdk/commit/a88048e9c4198a5bdaea00883ca00c8c8e582605).

You can refer to the Uniswap SDK documentation [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/javaswapdevelopment/java-swap-sdk.git
```

Move into the java-swap-sdk working directory

```sh
cd java-swap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

Cooming Soon
npm package: @javaswap/sdk-core
Description: ⚒️ An SDK for building applications on top of Javaswap V3
Latest version: 3.0.1

# Javaswap SDK Core

[![Unit Tests](https://github.com/javaswapdevelpment/javaswap-sdk-core/workflows/Unit%20Tests/badge.svg)](https://github.com/Javaswap/javaswap-sdk-core/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/javaswapdevelpment/javaswap-sdk-core/workflows/Lint/badge.svg)](https://github.com/Javaswap/javaswap-sdk-core/actions?query=workflow%3ALint)
[![npm version](https://img.shields.io/npm/v/@javaswap/sdk-core/latest.svg)](https://www.npmjs.com/package/@javaswap/sdk-core/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@javaswap/sdk-core/latest.svg)](https://bundlephobia.com/result?p=@javaswap/sdk-core@latest)

This code is shared across Javaswap TypeScript SDKs.
npm package: @javaswap/uikit
Description: Set of UI components for java projects
Latest version: 1.1.43

# ☕ Java UIkit

[![Version](https://img.shields.io/npm/v/@javaswap-libs/uikit)](https://www.npmjs.com/package/@javaswap-libs/uikit) [![Size](https://img.shields.io/bundlephobia/min/@javaswap-libs/uikit)](https://www.npmjs.com/package/@javaswap-libs/uikit)

Java UIkit is a set of React components and hooks used to build pages on Java's apps. It also contains a theme file for dark and light mode.

## Install

`yarn add @javaswap-libs/uikit`

## Setup

### Theme

Before using Java UIkit, you need to provide the theme file to styled-component.

```
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@javaswap-libs/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
```

### Reset

A reset CSS is available as a global styled component.

```
import { ResetCSS } from '@javaswap-libs/uikit'
...
<ResetCSS />
```

### Types

This project is built with Typescript and export all the relevant types.

## How to use the UIkit

If you want to use components from the UIkit, check the [Storybook documentation](https://javaswap.github.io/java-uikit/)
npm package: @javaswap/v2-sdk
Description: 🛠 An SDK for building applications on top of Javaswap V2
Latest version: 3.0.2

# Javaswap V2 SDK

[![Unit Tests](https://github.com/javaswapdevelpment/javaswap-v2-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Javaswap/javaswap-v2-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/javaswapdevelpment/javaswap-v2-sdk/workflows/Lint/badge.svg)](https://github.com/Javaswap/javaswap-v2-sdk/actions?query=workflow%3ALint)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![npm version](https://img.shields.io/npm/v/@javaswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@javaswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@javaswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@javaswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [javaswap.io](https://javaswap.io/docs/v2/SDK/getting-started/).
npm package: @javaswap/v3-sdk
Description: ⚒️ An SDK for building applications on top of Javaswap V3
Latest version: 3.0.0

# Alpha software

The latest version of the SDK is used in production in the Javaswap Interface,
but it is considered Alpha software and may contain bugs or change significantly between patch versions.
If you have questions about how to use the SDK, please reach out in the `#dev-chat` channel of the Discord.
Pull requests welcome!

# Javaswap V3 SDK

[![Unit Tests](https://github.com/Javaswap/javaswap-v3-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Javaswap/javaswap-v3-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Javaswap/javaswap-v3-sdk/workflows/Lint/badge.svg)](https://github.com/Javaswap/javaswap-v3-sdk/actions?query=workflow%3ALint)
[![npm version](https://img.shields.io/npm/v/@javaswap/v3-sdk/latest.svg)](https://www.npmjs.com/package/@javaswap/v3-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@javaswap/v3-sdk/latest.svg)](https://bundlephobia.com/result?p=@javaswap/v3-sdk@latest)

In-depth documentation on this SDK is available at [javaswap.org](https://docs.javaswap.org/).
npm package: @javbautista/platzom
Description: Traductor de idioma platzom
Author: Jav Bautista
Latest version: 0.1.0

#Plazom

Platzom es un idioma inventado para el curso de [Fundamentos de JavaScript](https://platzi.com/js) de [Platzi](https://platzi.com)




##Descripcion del idioma

- Si la palabra termina con "ar", se le quitan esas dos letras
- Si la palabra inicia con Z, se le añade "pe" al final
- Si la palabra traducida tiene 10 o más letras, se debe partir en dos por la mitad y unir con un guión medio
- Por último, si la palabra original es un palíndromo, ninguna regla anterior cuenta y se devuelve la misma palabra pero intercalando letras mayúsculas y minúsculas

## Instalación

```
npm install platzom
```

## Uso

```
import platzom from 'platzom'

platzom("Programar") // Program
platzom("Zorro") // Zorrope
platzom("Zarpar") // Zarppe
platzom("abecedario") // abece-dario
platzom("sometemos") // SoMeTeMoS
```

## Créditos
- [Sacha Lifszyc](https://twitter.com/@javbautistab)

## Licencia

[MIT](https://opensource.org/licenses/MIT)
npm package: @javelin/core
Description: This package is a general catch-all for stuff shared by many Javelin packages, including:
Latest version: 1.0.0-alpha.12

# `@javelin/core`

This package is a general catch-all for stuff shared by many Javelin packages, including:

- a data model that can describe complex objects with two variants: user-friendly schema definitions and code-friendly graphs
- utils/helpers shared between all Javelin packages
- object pools

In general, you should not consume this package directly as its exports may change without notice. However, it might still prove useful, just use at your own risk!
npm package: @javelin/devtool
Description: Developer tool for Javelin ECS.
Latest version: 0.19.2

# `@javelin/devtool`

Developer tool for Javelin ECS.

<p align="center">
  <img width="460" src="./screenshot.png">
</p>

## Usage

```ts
import { createDevtool } from "@javelin/devtool"
import { createMessageHandler } from "@javelin/ecs"

const systems = []
const world = createWorld(systems)
const messageHandler = createMessageHandler({ world })
const devtool = createDevtool({
  worlds: {
    client: world,
  },
  onMessage(world, message) {
    messageHandler.applyMessage(message)
  },
})

const { log } = devtool.mount(document.getElementById("devtool"))

log.info("Devtool mounted!")
```
npm package: @javelin/ecs
Description: A TypeScript/JavaScript Entity-Component System
Author: Eric McDaniel
Latest version: 1.0.0-alpha.13

# @javelin/ecs

Javelin is an implementation of [ECS](https://github.com/SanderMertens/ecs-faq), a popular architecture for building games with dynamic entity behavior.

Join us on [Discord](https://discord.gg/AbEWH3taWU)!

## Docs

Visit https://javelin.dev

## Installation

```sh
npm i @javelin/ecs
```

## Quick Start

```ts
import * as j from "@javelin/ecs"
// define entity data
let Pos = j.value({x: "number", y: "number"})
let Vel = j.value({x: "number", y: "number"})
// create an app
let app = j
  .app()
  // initialize entities (discrete game units)
  .addInitSystem(world => {
    let origin = {x: 0, y: 0}
    world.create(j.type(Pos, Vel), origin, {x: 0, y: -1})
  })
  // find entities by type
  .addSystem(world => {
    world.query(j.type(Pos, Vel)).each((entity, pos, vel) => {
      pos.x += vel.x
      pos.y += vel.y
    })
  })
  // call all registered systems
  .step()
```
npm package: @javelin/hrtime-loop
Description: A tiny, high-resolution game loop for NodeJS 10+. Utilizes the `setImmediate` and `setTimeout` schedulers in conjunction to maintain a balance of precision and performance.
Latest version: 1.0.0-alpha.4

# `@javelin/hrtime-loop`

A tiny, high-resolution game loop for NodeJS 10+. Utilizes the `setImmediate` and `setTimeout` schedulers in conjunction to maintain a balance of precision and performance.

## Installation

```
npm i @javelin/hrtime-loop
```

## Usage

```ts
import { createHrtimeLoop } from "@javelin/hrtime-loop"

const loop = createHrtimeLoop(clock => {
  // (bigint) monotonic time
  clock.now
  // (number) total number of ticks
  clock.tick
  // (number) time since last tick in ms
  clock.dt
}, (1 / 60) * 1000 /* tick interval (ms) */)

// Start the loop
loop.start()
// Stop the loop
loop.stop()
// Check if loop is running
loop.isRunning()
```

## Performance

`yarn perf` will run performance tests. Example `perf` output:

```
tick_interval | 16.666666666666668
ticks         | 1000
avg_tick      | 16.678785390999984
accuracy      | 99.927%
precision     | 100.000%
```
npm package: @javelin/net
Description: An authoritative game server and client for @javelin/ecs
Author: Eric McDaniel
Latest version: 1.0.0-alpha.15

# @javelin/net

```ts
import * as j from "@javelin/ecs"
import * as jn from "@javelin/net"

let PlayerStatus = j.slot(Alive, Dead)
let Body = j.type(Position, Velocity, Rotation, PlayerStatus)
let Player = j.type(Health, Body)

let networkModel = {
  components: [Position, Velocity, Rotation, PlayerStatus],
}

app
  // configure networked components
  .addResource(jn.NetworkModel, networkModel)
  // install server plugin
  .addPlugin(jn.serverPlugin)
```

When and how components are sent is configured using per-client **awarenesses**. An awareness is composed of **presences**—the entities (called subjects) that are in scope for a given client, and **interests**—the components of present entities that a client should know about.

```ts
let client = world.create()

let alivePlayerPresence = jn.presence(j.type(Player, PlayerStatus(Alive)))

// only dead players can see other dead players
let deadPlayerPresence = jn.presence(
  j.type(Player, PlayerStatus(Dead)),
  (world, entity) => world.has(entity, PlayerStatus(Dead)),
)

// compute a number that scales inversely with the distance between entity and subject
let distancePrioritizer: jn.SubjectPrioritizer = (world, entity, subject) =>
  1 / distance(world.get(entity, Position), world.get(subject, Position))

// send changed health component values, prioritizing entities closer to the player
let healthInterest = jn.interest(Player, Changed(Health), distancePrioritizer)

// snapshot interests send continuous, redundant updates to clients that allow clients to
// correct prediction errors
let bodyInterest = jn.snapshotInterest(Body, distancePrioritizer)

// compile the presences and interests into the client's awareness
let clientAwareness = jn.awareness(
  client,
  deadPlayerPresence,
  alivePlayerPresence,
  bodyInterest,
  healthInterest,
)

world.add(client, jn.Client, jn.WebsocketTransport(socket), clientAwareness)
```

## Prediction

shared.ts

```ts
export let Input = j.command({h: "u8", v: "u8"})
export let movePlayerSystem = (world: j.World) => {
  world.commands(Input).each(input => {})
}
```

client.ts

```ts
import {Input, movePlayerSystem} from "./shared"

let handlePlayerInputSystem = (world: j.World) => {
  let deviceInput = world.getResource(DeviceInput)
  world.getResource(jn.ServerWorld).dispatch(Input, {
    entity: world.getResource(PlayerEntity),
    h: +deviceInput.keys.a,
    v: +deviceInput.keys.w,
  })
}

app
  .use(jn.clientPlugin)
  .addInitSystem(world => {
    world
      .getResource(jn.ServerWorld)
      .addSystemToGroup(j.FixedGroup.Update, movePlayerSystem)
  })
  .addSystemToGroup(j.Group.Early, handlePlayerInputSystem)
```

server.ts

```ts
let playerPresence = jn.presence(Player)
let playerInterest = jn.snapshotInterest(Player)

app.use(jn.serverPlugin).addSystem(world => {
  // when client connects...
  world.create(jn.Client, jn.awareness(playerPresence, playerInterest))
})
```
npm package: @javelin/pack
Description: This algorithm has been written a million times. So why maintain our own?
Latest version: 1.0.0-alpha.12

# `@javelin/pack`

This algorithm has been written a million times. So why maintain our own?

1. Keep Javelin dependency free
2. Limit number of features to stay small and fast

## Features

- Easy to integrate with your existing ArrayBuffer-based protocol.
- Includes `boolean`, `string8`, `string16`, `uint8`, `uint16`, `uint32`, `int8`, `int16`, `int32`, `float32`, `float64`.
- Deeply nested objects, e.g. `{ stats: { strength: uint16 } }`
- Deeply nested arrays, e.g. `{ order: arrayOf(arrayOf({ name: string16 })) }`

## Example

```ts
import {
  arrayOf,
  createModel,
  decode,
  encode,
  string8,
  uint8,
} from "@javelin/pack"

const person = {
  name: string8,
  age: uint8,
}

const model = createModel({
  ...person,
  children: arrayOf(person),
})

const data = {
  name: "Ben",
  age: 64,
  children: [
    { name: "Chantel", age: 23 },
    { name: "Alyssa", age: 21 },
  ],
}

const encoded = encode(data, model) // <08 00 28 e7 ...>
const decoded = decode(encoded, model) // { name: "Ben", ... }
```

## Unsupported

- Cycles (e.g. `person.children = arrayOf(person)`)

## Performance

`yarn perf` will run performance tests. Example `perf` output:

```
encode @60hz (bigger is better)
pack    9172.586162591406
msgpack 8341.438421156548
json    8812.036962151693

decode @60hz (bigger is better)
pack    13507.305450145765
msgpack 12591.815349590674
json    8160.358308042964

size (smaller is better)
pack    47
msgpack 117
json    166
```
npm package: @javelin/perf
Description: <p align="center">   <img width="50%" src="screenshot.png"> </p>
Author: Eric McDaniel
Latest version: 2.0.0-alpha.6

# @javelin/perf

<p align="center">
  <img width="50%" src="screenshot.png">
</p>

A runnerless, single-threaded benchmarking library for Node.

## Getting Started

```sh
npm i @javelin/perf
```

src/fibonacci.perf.ts

```ts
import {fibonacci} from "./fibonacci"
import {perf} from "@javelin/perf"

perf("100 elements", () => fibonacci(100))
```

```sh
> ts-node src/fibonacci.perf.ts

src/fibonacci.perf.ts

 100 elements   106,321 ops/s     =   4.13
```

### Setup

```ts
perf("iterator next()", () => {
  let it = fibonacci.iterator({start: 1_000})
  return () => it.next()
})
```

### Options

Run just a single benchmark in a file:

```ts
perf.only("name", () => {})
```

Don't throw an error when a benchmark degrades in performance.

```ts
perf("name", () => {}, {
  throwOnFailure: false,
})
```

### Configuration

```sh
# Throw an error when performance degrades, halting test execution.
THROW_ON_FAILURE=false
# Write failing test stats to perf results files.
WRITE_FAILURES=false
# Number of times to execute each individual test.
PERF_RUNS=15_000
# Number of samples to ignore from upper and lower extremes when computing perf results.
PERF_SAMPLES_TO_DISCARD_PER_EXTREME=100
# Perf results file extension.
MODULE_RESULTS_EXTENSION=".perf-results"
# Perf file extension.
MODULE_EXTENSION=".perf.ts"
```
npm package: @javelin/track
Description: Track changes made to Javelin components.
Latest version: 1.0.0-alpha.4

# `@javelin/track`

Track changes made to Javelin components.

## Docs

https://javelin.games/ecs/change-detection/

## API Example

```ts
import * as Track from "@javelin/track"
// ...
const p1 = component(Position)
const p2 = component(Position)
const changes = component(Track.ChangeSet)
// update p1 and write to ChangeSet
Track.set(p1, changes, "x", 123)
// apply changes to p2
Track.apply(changes, p2)
p2.x // 123
```