open-index/open-npm huggingface dataset:
npm package: @lite-js/try2get
Description: get any or get all return values
Latest version: 0.0.1

try2get
=======

get any or get all return values

## install

```shell
npm i try2get --save
```

## use cases

getting a supported XHR object [xhr.js](./example/xhr.js):

```javascript
const try2get = require('try2get');
const xhr = try2get.one(
    () => new XMLHttpRequest(),
    () => new ActiveXObject('MSXML2.XMLHTTP'),
    () => new ActiveXObject('Microsoft.XMLHTTP')
);
```

listing all the supported features [built-ins.js](./example/built-ins.js):

```javascript
const try2get = require('../index');
const lang = require('zero-lang');

const features = try2get.all([
    () => ArrayBuffer,
    () => Atomics,
    () => DataView,
    () => Float32Array,
    () => Float64Array,
    () => JSON,
    () => Map,
    () => Math,
    () => Promise,
    () => Proxy,
    () => Reflect,
    () => SIMD,
    () => Set,
    () => Symbol,
    () => Uint16Array,
    () => Uint32Array,
    () => Uint8Array,
    () => Uint8ClampedArray,
    () => WeakMap,
    () => WeakSet,
]);

console.log(lang.map(features, feature => feature.toString()));
```
npm package: @lite-js/xml
Description: Maintaining XML in Pure Javascript (IN BOTH NODE.JS & BROWSERS)
Latest version: 0.0.4

xml
===

[![npm version](https://badge.fury.io/js/%40lite-js%2Fxml.svg)](https://badge.fury.io/js/%40lite-js%2Fxml) [![Build Status](https://travis-ci.org/lite-js/xml.svg?branch=master)](https://travis-ci.org/lite-js/xml) [![Coverage Status](https://coveralls.io/repos/github/lite-js/xml/badge.svg?branch=master)](https://coveralls.io/github/lite-js/xml?branch=master)

**Maintaining XML** in pure javascript (IN BOTH NODE.JS & BROWSERS) [Homepage][homepage]

## Maintaining?

### Converting

![converting](./doc/uml/converting.png)

### Editing/Traversing

```javascript
XMLLite.findChildNode(doc, query);
XMLLite.findChildNodes(doc, query);
XMLLite.findOrCreateChildNode(doc, query);
XMLLite.removeChildNode(doc, query);
XMLLite.eachChildNode(doc, query, callback);
// ...
```

### Formatting

```javascript
XMLLite.beautify(xml, indent);
XMLLite.uglify(xml, preserveComments);
XMLLite.sanitize(xml, reverse);
// ...
```

Actually, you can get the js object from `XMLLite.xml2js(xml)`, do whatever you want, and convert it back to xml again with `XMLLite.js2xml(obj)`.

## Why?

1. A reasonable need for usage in both Node.js and Browsers
2. A more reasonable need to use native APIs(DOMParser/XMLSerializer) to speed up the maintaining process and keep the library thin

## Why `@lite-js/xml`?

1. It **works exactly the same in both Node.js and Browsers**
2. The browser version is supper **light-weight**([dist/xml.js](./dist/xml.js))
3. **Convenient** APIs for converting between xml/js/json/DOM, and lots of helpers to maintain the data structures
4. Super **fast**. it takes less than 30ms to convert an xml document with over 1,000 nodes into a js object

## Install

```shell
$ npm install @lite-js/xml --save
$ npm install @lite-js/xml -g
```

## Usage

In Node.js

```javascript
const XML = require('@lite-js/xml');
```

Command line client

```shell
$ xml-lite --help
```

In browsers

```html
<script src="$path/to/@lite-js/xml/dist/xml.js"> <!-- window.XML is available -->
```

In browsers with webpack

```javascript
import XMLLite from '@lite-js/xml/indexBrowser';
```

## [Demo][homepage]

## [API](./doc/api.md)

## [JSON spec](./doc/json-spec.md)

## [Projects using @lite-js/xml](./doc/projects-using-xml-lite.md)

## [Contributing](./doc/contributing.md)

## [known issues](https://github.com/lite-js/xml/issues)

[homepage]: https://lite-js.github.io/xml/
npm package: @lite-jsx/express
Description: Middleware that uses lite-jsx to render JSX templates in an Express application.
Author: Daniel Prates
Latest version: 1.0.0

# Lite JSX - Express Middleware

[![License][license-image]][license-url]
[![Build Actions][build-image]][build-url]
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][npm-url]

Lite JSX is a lightweight JavaScript library that allows you to create and manipulate JSX elements using only vanilla JavaScript.

---

## Installation

You can install Lite JSX via npm:

```bash
npm install @lite-jsx/core @lite-jsx/express
```

---

## Using Lite JSX with Express

To use Lite JSX with Express, you can create a middleware that overrides the default `res.render` function to add support for JSX templates. Here's an example:

```js
const express = require("express");
const { liteJsx } = require("@lite-jsx/express");
const Home = require("./home");

const app = express();

// Use the middleware to enable Lite JSX rendering in the Express app.
app.use(liteJsx);

// Render the component using Express.
app.get("/", (req, res) => {
  const data = { message: "Hello, world!" };
  // the render method now is override to use jsx components
  res.render(Home, data);
});

app.listen(3000, () => {
  console.log("Server is listening on port 3000!");
});
```

To enable Lite JSX in our Express app, we're using the `liteJsx` middleware, which overrides the default `res.render` function to add support for JSX templates.

This way, we can pass a JSX component to `res.render` and it will be rendered as HTML.

And that's it! With these few lines of code, you can start using Lite JSX with Express to create powerful, dynamic web applications.

---

## Contributing

If you'd like to contribute to Lite JSX, please feel free to submit a pull request or open an issue on GitHub:

https://github.com/lite-jsx/express

## License

Lite JSX is licensed under the [MIT License](https://github.com/danprates/lite-jsx/blob/master/LICENSE).

[npm-url]: https://npmjs.org/package/@lite-jsx/express
[npm-image]: https://img.shields.io/npm/v/lite-jsx.svg?style=for-the-badge
[downloads-image]: https://img.shields.io/npm/dm/@lite-jsx/express.svg?style=for-the-badge
[build-image]: https://img.shields.io/github/actions/workflow/status/lite-jsx/express/publish.yml?style=for-the-badge
[build-url]: https://github.com/lite-jsx/express/actions/workflows/publish.yml
[license-image]: https://img.shields.io/github/license/lite-jsx/express?style=for-the-badge
[license-url]: https://github.com/lite-jsx/express/blob/master/LICENSE
npm package: @lite-jsx/fastify
Description: Plugin that uses lite-jsx to render JSX templates in an Fastify application.
Author: Daniel Prates
Latest version: 1.0.0

# Lite JSX - Fastify plugin

[![License][license-image]][license-url]
[![Build Actions][build-image]][build-url]
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][npm-url]

Lite JSX is a lightweight JavaScript library that allows you to create and manipulate JSX elements using only vanilla JavaScript.

---

## Installation

You can install Lite JSX via npm:

```bash
npm install @lite-jsx/core @lite-jsx/fastify
```

---

## Using Lite JSX with Fastify

To use Lite JSX with Fastify, you can create a plugin that overrides the default `reply.view` function to add support for JSX templates. Here's an example:

```js
const fastify = require("fastify")({ logger: true });
const { liteJsx } = require("@lite-jsx/fastify");

const { Home } = require("./home");

fastify.register(liteJsx);

fastify.get("/", (_request, reply) => {
  reply.view(Home, { message: "Hello world" });
});

fastify.listen({
  port: 3000,
});
```

To enable Lite JSX in our Fastify app, we're using the `liteJsx` plugin, which overrides the default `reply.view` function to add support for JSX templates.

This way, we can pass a JSX component to `reply.view` and it will be rendered as HTML.

And that's it! With these few lines of code, you can start using Lite JSX with Fastify to create powerful, dynamic web applications.

---

## Contributing

If you'd like to contribute to Lite JSX, please feel free to submit a pull request or open an issue on GitHub:

https://github.com/lite-jsx/fastify

## License

Lite JSX is licensed under the [MIT License](https://github.com/danprates/lite-jsx/blob/master/LICENSE).

[npm-url]: https://npmjs.org/package/@lite-jsx/fastify
[npm-image]: https://img.shields.io/npm/v/lite-jsx.svg?style=for-the-badge
[downloads-image]: https://img.shields.io/npm/dm/@lite-jsx/fastify.svg?style=for-the-badge
[build-image]: https://img.shields.io/github/actions/workflow/status/lite-jsx/fastify/publish.yml?style=for-the-badge
[build-url]: https://github.com/lite-jsx/fastify/actions/workflows/publish.yml
[license-image]: https://img.shields.io/github/license/lite-jsx/fastify?style=for-the-badge
[license-url]: https://github.com/lite-jsx/fastify/blob/master/LICENSE
npm package: @lite-monitor/node
Description: An event tracking library for Node.js
Author: 谢沛东
Latest version: 1.2.1

# @lite-monitor/node

<p align="center">
  <img src="https://raw.githubusercontent.com/peidongxie/lite-monitor/main/packages/frontend/public/logo.png">
</p>
<p align="center">
  <img src="https://img.shields.io/github/license/peidongxie/lite-monitor" />
  <img src="https://img.shields.io/github/package-json/v/peidongxie/lite-monitor" />
  <img src="https://img.shields.io/npm/v/@lite-monitor/node" />
</p>

An event tracking library for Node.js

## Table of Contents

- [Background](#background)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Related Efforts](#related-efforts)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Background

LiteMonitor started with a database online examination real-time monitoring system. During the development of the system, I found that I needed an event tracking library that could meet the following characteristics:

- Lightweight
- Low invasiveness
- Well defined
- Good compatibility

As a result, I built a JavaScript library and published it to npm. In February 2021, I started developing version 1.0 of the project.

## Installation

This library uses Node.js and its package manager. Please make sure they are installed locally.

```sh
$ npm install @lite-monitor/node
```

or

```sh
$ yarn add @lite-monitor/node
```

or

```sh
$ pnpm add @lite-monitor/node
```

## Usage

This library can be used in CommonJS project and ESM project. Please refer to the [Examples](#examples).

## Examples

### For Node.js

```typescript
import { NodeMonitor } from '@lite-monitor/node';

// Initialize
const monitor = new NodeMonitor();

// Report error event
const error = new Error();
monitor.reportError(error);
```

### For Express

Please refer to the [Express Demo](https://github.com/peidongxie/lite-monitor/tree/main/packages/node-express-demo).

### For Koa

Please refer to the [Koa Demo](https://github.com/peidongxie/lite-monitor/tree/main/packages/node-koa-demo).

## Related Efforts

- [@lite-monitor/base](https://github.com/peidongxie/lite-monitor/tree/main/packages/lite-monitor-base)
- [@lite-monitor/web](https://github.com/peidongxie/lite-monitor/tree/main/packages/lite-monitor-web)
- [Express](https://github.com/expressjs/express)
- [Koa](https://github.com/koajs/koa)

## Maintainers

[@peidongxie](https://github.com/peidongxie)

## Contributing

Feel free to open an [issue](https://github.com/peidongxie/lite-monitor/issues/new) or [PR](https://github.com/peidongxie/lite-monitor/compare).

## License

MIT © 谢沛东
npm package: @lite-monitor/web
Description: An event tracking library for web browsers
Author: 谢沛东
Latest version: 1.2.1

# @lite-monitor/web

<p align="center">
  <img src="https://raw.githubusercontent.com/peidongxie/lite-monitor/main/packages/frontend/public/logo.png">
</p>
<p align="center">
  <img src="https://img.shields.io/github/license/peidongxie/lite-monitor" />
  <img src="https://img.shields.io/github/package-json/v/peidongxie/lite-monitor" />
  <img src="https://img.shields.io/npm/v/@lite-monitor/web" />
</p>

An event tracking library for web browsers

## Table of Contents

- [Background](#background)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Related Efforts](#related-efforts)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Background

LiteMonitor started with a database online examination real-time monitoring system. During the development of the system, I found that I needed an event tracking library that could meet the following characteristics:

- Lightweight
- Low invasiveness
- Well defined
- Good compatibility

As a result, I built a JavaScript library and published it to npm. In February 2021, I started developing version 1.0 of the project.

## Installation

This library uses Node.js and its package manager. Please make sure they are installed locally.

```sh
$ npm install @lite-monitor/web
```

or

```sh
$ yarn add @lite-monitor/web
```

or

```sh
$ pnpm add @lite-monitor/web
```

## Usage

This library can be used in CommonJS project and ESM project. Please refer to the [Examples](#examples).

## Examples

### For web browsers

```typescript
import { WebMonitor } from '@lite-monitor/web';

// Initialize
const monitor = new WebMonitor();

// Report error event
const error = new Error();
monitor.reportError(error);
```

### For React

Please refer to the [React Demo](https://github.com/peidongxie/lite-monitor/tree/main/packages/web-react-demo).

## Related Efforts

- [@lite-monitor/base](https://github.com/peidongxie/lite-monitor/tree/main/packages/lite-monitor-base)
- [@lite-monitor/node](https://github.com/peidongxie/lite-monitor/tree/main/packages/lite-monitor-node)
- [React](https://github.com/facebook/react)
- [UAParser.js](https://github.com/faisalman/ua-parser-js)

## Maintainers

[@peidongxie](https://github.com/peidongxie)

## Contributing

Feel free to open an [issue](https://github.com/peidongxie/lite-monitor/issues/new) or [PR](https://github.com/peidongxie/lite-monitor/compare).

## License

MIT © 谢沛东