open-index/open-npm huggingface dataset:
npm package: @jsbox/ecom-kit
Description: ---
Author: JSBOX
Latest version: 1.0.9


---

# Ecom Kit

A simple npm package that provides basic eCommerce functionality, including product management, adding items to a cart, and checking out.

## Features

- **Add Product**: Add new products with a name and price.
- **List Products**: View all available products.
- **Add to Cart**: Add products to the shopping cart by their ID.
- **View Cart**: View all products currently in the shopping cart.
- **Checkout**: Calculate the total price of the cart and clear the cart after checkout.

## Installation

You can install this package using npm:

```bash
npm install @jsbox/ecom-kit
```

## Usage

Below is an example of how to use the package in your project:

```javascript
const Ecommerce = require('@jsbox/ecom-kit');

const store = new Ecommerce();

// Add products to the store
store.addProduct('Laptop', 1200);
store.addProduct('Phone', 800);

// List all products
console.log('All Products:', store.listProducts());

// Add products to the cart
store.addToCart(1);
store.addToCart(2);

// View the cart
console.log('Cart:', store.viewCart());

// Checkout and get the total price
console.log('Total Price:', store.checkout());

// View the cart after checkout (should be empty)
console.log('Cart after checkout:', store.viewCart());
```

## API Reference

### `addProduct(name, price)`

Adds a new product to the store.

- **name**: `string` - The name of the product.
- **price**: `number` - The price of the product.

Returns the added product object.

### `listProducts()`

Lists all products available in the store.

Returns an array of product objects.

### `addToCart(productId)`

Adds a product to the cart by its ID.

- **productId**: `number` - The ID of the product to add to the cart.

Returns the added product object.

Throws an error if the product is not found.

### `viewCart()`

View all products currently in the shopping cart.

Returns an array of product objects.

### `checkout()`

Calculates the total price of all items in the cart and clears the cart.

Returns the total price as a number.

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/syedtalaljilani/ecom-kit/blob/main/LICENSE) file for details.

---

This README provides an overview of the package, installation instructions, usage examples, an API reference, and guidelines for contributing. Adjust the content as needed based on your package's actual implementation and features.
npm package: @jsburbano-dev/payflux
Description: A modern and customizable component library built with Vue 3 and Tailwind CSS, designed for building financial dashboards and modern web apps with ease.
Author: jsburbano
Latest version: 0.1.1

# @jsburbano-dev/payflux

A modern and customizable component library built with Vue 3 and Tailwind CSS, designed for building financial dashboards and modern web apps with ease.

## 📦 Features

- ⚡️ Vue 3 Composition API support
- 🎨 Tailwind CSS 4.x ready
- 🌗 Dark mode support
- 📱 Fully responsive components
- 🧪 Storybook integration with Vitest
- 📊 Finance-focused UI elements
- 🚀 Easy to integrate and extend

## 🧩 Available Components

- `GridIconCard`
- `IconCard`
- `Card`
- `HeaderTop`
- `KpiCard`
- `BalanceStats`
- `StatusPill`
- `CreditScoreIndicator`
- `MoneyInput`
- `InfoItemsList`
- `DonutChart`

## 🚀 Installation

```bash
npm install @jsburbano-dev/payflux
# or
yarn add @jsburbano-dev/payflux
```

## 🔧 Usage

```ts
// main.ts
import { createApp } from "vue";
import App from "./App.vue";

import "@jsburbano-dev/payflux/dist/style.css";
import {
  GridIconCard,
  IconCard,
  Card,
  HeaderTop,
  KpiCard,
  BalanceStats,
  StatusPill,
  CreditScoreIndicator,
  MoneyInput,
  InfoItemsList,
  DonutChart,
} from "@jsburbano-dev/payflux";

const app = createApp(App);

app.component("GridIconCard", GridIconCard);
app.component("IconCard", IconCard);
app.component("Card", Card);
app.component("HeaderTop", HeaderTop);
app.component("KpiCard", KpiCard);
app.component("BalanceStats", BalanceStats);
app.component("StatusPill", StatusPill);
app.component("CreditScoreIndicator", CreditScoreIndicator);
app.component("MoneyInput", MoneyInput);
app.component("InfoItemsList", InfoItemsList);
app.component("DonutChart", DonutChart);

app.mount("#app");
```

## 📚 Storybook

```bash
yarn storybook
```

## 🧪 Test

```bash
yarn test
```

## 📦 Build for Production

```bash
yarn build
```

## 📝 License

MIT — Built with ❤️ by [@jsburbano-dev](https://www.npmjs.com/~jsburbano-dev)
npm package: @jsbx/get-params
Description: Get names of formal parameters of a function.
Author: ivanilic
Latest version: 0.0.2

# `getParams()`

`getParams` - Get names of formal parameters of a function.    
    

## DESCRIPTION
This utility will extract the names of function's formal parameters and return them as a string array. This utility does not have any issues with the form of a function (whether it is a function declaration, function expression or arrow function) nor with embedded comments, newlines and whitespace; it will correctly deal with parameters that use default values and the spread operator (usualy, the arity of a function is obtained through function's `length` property, but only in case that no parameter use default values or spread operator), so it is easy to obtain function's arity.    
    
This utility will also try to extract parameters even when destructuring is used. This should work for some, but certainly not for all imaginable forms of parameter destructuring, so use with caution.    
    

## EXAMPLES

```js
function f(a, b = 2, ...c) {}
//=> [a, b, c]
const f = a => {};
//=> [a]

function f ({x:a=5, b, z:c}) {};
//=> [a, b, c]
function f({x:a=6, y:b=9, c=6} = {}) {};
//=> [a, b, c]
function f({ x:a, y:b=5, z:c=4 } = {x, y, z}) {};
//=> [a, b, c]
let f = ({x:a=5, y:b=6, z:c } = {x:1, y:2, z:3}) => {};
//=> [a, b, c]
function f([a=5, b=6, ...c] = [3, 4, 5]) {};
//=> [a, b, c]
```


*DESCRIPTION*    
    `getParams` - Get names of individual formal parameters of a function.    
    
*SYNOPSIS:*    
    `getParams(fx)`    
    
*PARAMETERS:*    
    `fx` A function.    
    
*RETURN VALUE:*    
    An array of strings containing names of function's parameters.    
    


## INSTALL

[npm](https://www.npmjs.com/)    
    
```shell
$ npm install @jsbx/get-params
```


## USAGE    

```js
var getParams = require('@jsbx/get-params');

function f(a=5, b=2, ...c) {}
getParams(f); //=> [a, b, c]
```
npm package: @jscad/3mf-serializer
Description: 3MF serializer for JSCAD project
Latest version: 2.1.17

## @jscad/3mf-serializer

> Serializer of JSCAD geometries to 3MF shapes

[![npm version](https://badge.fury.io/js/%40jscad%2F3mf-serializer.svg)](https://badge.fury.io/js/%40jscad%2F3mf-serializer)
[![Build Status](https://travis-ci.org/jscad/io.svg)](https://travis-ci.org/jscad/3mf-serializer)

## Overview

This serializer outputs a 'blobable' array of data from one or more JSCAD geometries. Only XML output is supported.
The array of data can either be used to create a Blob (`new Blob(blobable)`), or converted to a Node.js buffer.

The serialization of the following geometries are possible.
- serialization of 3D geometry (geom3) to 3MF mesh(s)

In addition, both color and name attributes are converted to 3MF attributes if found on the JSCAD geometry.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Contribute](#contribute)
- [License](#license)

## Installation

```
npm install @jscad/3mf-serializer
```

## Usage

```javascript
const { serialize } = require('@jscad/3mf-serializer')

const rawData = serialize({unit: inch}, geometry)

//in browser (with browserify etc)
const blob = new Blob(rawData)

```

## Contribute

For questions about the API, please contact the [User Group](https://openjscad.xyz/forum.html)

Please see the README information of the OpenJSCAD.org project for how to submit bug reports or changes.

Small Note: If editing this README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## License

[The MIT License (MIT)](./LICENSE)
(unless specified otherwise)
npm package: @jscad/csg
Description: Constructive Solid Geometry (CSG) Library
Latest version: 0.7.0
Deprecated: See @jscad/modeling

## csg.js

## Constructive Solid Geometry (CSG) Library

[![GitHub version](https://badge.fury.io/gh/jscad%2Fcsg.js.svg)](https://badge.fury.io/gh/jscad%2Fcsg.js)
[![Build Status](https://travis-ci.org/jscad/csg.js.svg)](https://travis-ci.org/jscad/csg.js)

> Solid modelling library (2d & 3d)

## Overview

Constructive Solid Geometry (CSG) is a modelling technique that uses Boolean operations like union and intersection to combine 3D solids. This library implements CSG operations on meshes elegantly and concisely using BSP trees, and is meant to serve as an easily understandable implementation of the algorithm.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
- [Contribute](#contribute)
- [License](#license)

## Installation

```
npm install @jscad/csg
```

## Usage

- as Node module :

```
const csg = require('@jscad/csg')
```

## API

The API documentation can be found [here](./docs/api.md).

Also see the [OpenJsCad User Guide](https://en.wikibooks.org/wiki/OpenJSCAD_User_Guide).

For questions about the API, please contact the [User Group](https://plus.google.com/communities/114958480887231067224)

## Contribute

This library is part of the JSCAD Organization, and is maintained by a group of volunteers. We welcome and encourage anyone to pitch in but please take a moment to read the following guidelines.

* If you want to submit a bug report please make sure to follow the [Reporting Issues](https://github.com/jscad/csg.js/wiki/Reporting-Issues) guide. Bug reports are accepted as [Issues](https://github.com/jscad/csg.js/issues/) via GitHub.

* If you want to submit a change or a patch, please see the [Contributing guidelines](https://github.com/jscad/csg.js/blob/master/CONTRIBUTING.md). New contributions are accepted as [Pull Requests](https://github.com/jscad/csg.js/pulls/) via GithHub.

* We only accept bug reports and pull requests on **GitHub**.

* If you have a question about how to use CSG.js, then please start a conversation at the [OpenJSCAD.org User Group](https://plus.google.com/communities/114958480887231067224). You might find the answer in the [OpenJSCAD.org User Guide](https://github.com/Spiritdude/OpenJSCAD.org/wiki/User-Guide).

* If you have a change or new feature in mind, please start a conversation with the [Core Developers](https://plus.google.com/communities/114958480887231067224) and start contributing changes.

Small Note: If editing this README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## Copyrights

Some copyrights apply. Copyright (c) 2012 Joost Nieuwenhuijse (joost@newhouse.nl), under the MIT license. Copyright (c) 2011 Evan Wallace (http://madebyevan.com/)

## License

[The MIT License (MIT)](https://github.com/jscad/csg.js/blob/master/LICENSE)
(unless specified otherwise)
npm package: @jscad/regl-renderer
Description: Renderer for JSCAD Geometries
Author: Mark 'kaosat-dev' Moissette
Latest version: 2.6.15

# @jscad-regl-renderer

> Renderer for JSCAD geometries, both 2D and 3D

[![NPM version](https://badge.fury.io/js/%40jscad%2Fregl-renderer.svg)](https://www.npmjs.com/package/@jscad/regl-renderer)
[![NPM downloads](https://img.shields.io/npm/dw/@jscad/regl-renderer)](https://www.npmjs.com/package/@jscad/regl-renderer)
[![Build Status](https://travis-ci.org/jscad/OpenJSCAD.org.svg?branch=master)](https://travis-ci.org/jscad/OpenJSCAD.org)
[![Stability](https://img.shields.io/badge/stability-stable-success)](https://github.com/emersion/stability-badges#stable)
[![License](https://img.shields.io/github/license/jscad/OpenJSCAD.org)](https://github.com/jscad/OpenJSCAD.org/blob/master/LICENSE)

[![User Group](https://img.shields.io/badge/maintained%20by-user%20group-blue)](https://openjscad.nodebb.com/)
[![Lerna](https://img.shields.io/badge/maintained%20with-lerna-blue)](https://lerna.js.org/)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-blue)](https://standardjs.com)

[![Backers](https://img.shields.io/opencollective/backers/openjscad)](https://opencollective.com/openjscad)
[![Sponsors](https://img.shields.io/opencollective/sponsors/openjscad)](https://opencollective.com/openjscad)

<a href="https://opencollective.com/openjscad"><img src="https://opencollective.com/openjscad/donate/button.png?color=blue" alt="Open Collective"></a>

## What is it?
- webgl renderer (barebones, uses regl)
- small, compact, and fast
- works in all browsers
- works in Node.js projects (headless rendering to PNG images)


## Installation

This package is published and available for download via [NPM](https://www.npmjs.com/org/jscad)
```
npm install @jscad/regl-renderer
```

In addition this package is hosted at [UNPKG](https://unpkg.com/), and can be imported directly into webpages.

```
<script language="javascript" src="https://unpkg.com/@jscad/regl-renderer"</script>
```

## Usage

### Node.js (headless)

Install the following packages manually.

NOTE: There are issues with continous integration testing, so 'gl' is not installed initially.

```
 npm install gl
```

Try the demo by running ```npm run demo-cli```.

If all goes well you should end up with an image (test.png) that renders the demo design.

The demo code can be found in 'demo-cli.js'

### Browsers

From a browser, try opening the file 'demo.html'. This should show the demo design.

### Developers

Run the development web server using ```npm run dev```, then open the URL shown.

If all goes well you should end up with a web page with a rotating camera (no mouse controls) that displays the demo design (a few solids).

After making changes, all tests must pass. Run ```npm test```

## License

[The MIT License (MIT)](../../../LICENSE)
(unless specified otherwise)
npm package: @jscad/scad-deserializer
Description: Translates OpenSCAD syntax (http://www.openscad.org/) into OpenJsCAD syntax (http://joostn.github.com/OpenJsCad/).
Author: Gary Hodgson
Latest version: 1.0.0-alpha.d0fb3056
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm package: @jscadui/3mf-export
Description: 3mf export
Latest version: 0.5.0

# 3mf export MVP

This is a set of functions to generate 3mf content for exporting 3d models and optionally embeding a thumbnail.

reference: https://github.com/3MFConsortium/spec_core/blob/master/3MF%20Core%20Specification.md

Format is defined by openxmlformats.

3mf file is a zip file that you need to produce using a zip library of your choice.

# contents of said zip file

File names (with path) and metadata are hardcoded as it is not important for the purpose of exporting a model.

File names 
- `[Content_Types].xml` - static file describing content types [src/staticFiles.js]
- `_rels/.rels` -  [src/staticFiles.js]
- `/3D/3dmodel.model` - you must use this exact path to store model data
- `/Metadata/thumbnail.png` - you must use this exact path to store the optional thumbnail


# sample code to generate 3mf

Checkout the code from github and run `npm install` then `node testGen.js`.

Sample code to generate 3mf file is in [testGen.js]. It uses `fflate` which is intentionally set as
devDependency so others can generate the zip file with own preferred library.

To demonstrate that it is simple to include a thumbnail, I am using one already generated by my old jscad prototype
where this 3mf code is from. Final usage will of course be to tak a snapshot from canvas while exporting the mesh.
Sample of such code is left in [testGen.js] but unused.
![testThumbnail.png](testThumbnail.png)

# array of strings and `Array.join('')`

`Array.join('')`

After multiple explorations and tests it looks like  is the best choice to combine large number of strings. It can calculate size of final string in advance. It is faster or at least very similar to other, and can handle more than 65536 strings.

`String.concat()` 

Also can calculate size of new string in advance. At the time of writing this library it had similar performance in Chrome but was much slower than `Array.join('')`. It has one big drawback because it is limited to 65536 elements due to using varargs input.

` str +=` 

is slowest as it has to copy old data again and again for each step.
npm package: @jscadui/orbit
Description: JSCAD orbit controls
Latest version: 0.1.0

# no-dep OrbitControl

A no-dep OrbitControl that can be used with different webgl engines, and as bonus also CSS 3d transform.

This is OrbitControl starting as a simpler and more primitive than others,
but without dependency on a specific webgl engine.

https://user-images.githubusercontent.com/2480762/205169462-dc4d3be3-d58f-4ed0-b07b-89249412945d.mp4

# demo page

https://hrgdavor.github.io/jscadui/html-gizmo/

![image](https://user-images.githubusercontent.com/2480762/213881630-b62baa92-d826-42a1-bfd8-62c640560111.png)