open-index/open-npm huggingface dataset:
npm package: @sunrock-ui/combobox
Description: A component that is both a select and input field. 
Latest version: 0.1.20

# @sunrock-ui/combobox

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @sunrock-ui/combobox
# or
npm i @sunrock-ui/combobox
```
npm package: @suns-echoes/array-utils
Description: Array Utilities Library
Author: Aneta Suns
Latest version: 1.1.0

Array Utilities
===============

`array-utils` library add new methods for array manipulation.


Installation
------------

`npm i @suns-echoes/array-utils`


Import
------

#### as Node.js module (CJS)

```js
// Import full library minimized distribution file:
import ArrayUtils from '@suns-echoes/array-utils';

// Import library from source:
import ArrayUtils from '@suns-echoes/array-utils/cjs';
// or named:
import { ArrayUtils } from '@suns-echoes/array-utils/cjs/array-utils';

// Import single util:
import { diff } from '@suns-echoes/array-utils/cjs/utils/diff';
```

#### as ES6 module (ESM)

```js
// Import library from source:
import ArrayUtils from '@suns-echoes/array-utils/esm/index.js';
// or named:
import { ArrayUtils } from '@suns-echoes/array-utils/esm/array-utils.js';

// Import single util:
import { diff } from '@suns-echoes/array-utils/esm/utils/diff.js';
```


Methods
-------

* [amoeba-sort](./docs/utils/amoeba-sort.md) - sort array in amoeba grow style
* [diff](./docs/utils/diff.md) - find differences between arrays
* [difference](./docs/utils/difference.md) - get items unique to first input array
* [exclusive](./docs/utils/exclusive.md) - get non-intersecting items from input arrays
* [intersect](./docs/utils/intersect.md) - get items common to all input arrays
* [union](./docs/utils/union.md) - get unique items from input arrays


License
-------

Licensed under MIT

Copyright (c) 2021 Aneta Suns
npm package: @suns-echoes/exec
Description: Exec Utility
Author: Aneta Suns
Latest version: 0.2.0

Exec Utility
============

**Execute command**

The `exec` function simplifies execution of shell commands.

Note: The stderr and stdout is concatenated into output property. The end of this output is trimmed.

Note: The stderr is concatenated into output error property. The end of error is trimmed.


Installation
------------

`npm i @suns-echoes/exec`


Impport
-------

```js
// Import library distribution file
import { exec } from '@suns-echoes/exec';
```

```js
// Import library from source
import { exec } from './libs/@suns-echoes/exec/src';
// or
import { exec } from './libs/@suns-echoes/exec/src/exec';
```


Usage
-----


```js
const { code, error, output } = await exec(cmd, [...args], { buffer, stderr, stdout });
```


### Arguments

* `<string>` `cmd` - entity path;
* `<array>` `[args]` - optional, entity path;
* `<object>` `[config]` - optional, entity path:
	* `<boolean>` `[buffer=true]` - optional, enable unified output;
	* `<function>` `[stderr=null]` - optional, stderr callback;
	* `<function>` `[stdout=null]` - optional, stdout callback.


### Returns

* `<Promise>` - the promise of execution.


### Resolves

* `<object>` - exit information:
	* `<number>` `code` - exit code
	* `<string>` `error` - error output
	* `<string>` `output` - unified output (concatenated stderr and stdout)


Examples
--------

### simple use

```js
// simple command with param
const result = await exec('node -v');
// or with params in array
const result = await exec('node', ['-v']);

// result:
// {
// 	code: 0,
// 	error: null,
// 	output: 'v12.1.1',
// }
```

### real-time output (stderr, stdout)

```js
await exec('some_command', ['possible', 'params'], {
	// optionally disable ouptut
	buffer: false,
	stderr: (data) => { ... },
	stdout: (data) => { ... },
});
```


License
-------

Licensed under MIT

Copyright (c) 2019 Aneta Suns
npm package: @suns-echoes/file-system-utils
Description: File System Utilities Library
Author: Aneta Suns
Latest version: 0.10.1

File System Utilities
=====================

`file-system-utils` library add file system methods which simplifies files read/write/delete, folders create/remove and more.


Installation
------------

`npm i @suns-echoes/file-system-utils`


Import
------

```js
// Import library distribution file
import { FileSystemUtils } from '@suns-echoes/file-system-utils';
```

```js
// import library from source
import FileSystemUtils from '@suns-echoes/file-system-utils/src';
// or
import { FileSystemUtils } from '@suns-echoes/file-system-utils/src/file-system-utils';
```

```js
// import single util from source
import { isFile } from '@suns-echoes/file-system-utils/src/utils/is-file';
```


Methods
-------

### Async

* [copy](./docs/utils/copy.md)
* [createFolder](./docs/utils/create-folder.md)
* [isFile](./docs/utils/is-file.md)
* [isFolder](./docs/utils/is-folder.md)
* [listFiles](./docs/utils/list-files.md)
* [readFolder](./docs/utils/read-folder.md)
* [readJSONFile](./docs/utils/read-json-file.md)
* [readTextFile](./docs/utils/read-text-file.md)
* [remove](./docs/utils/remove.md)
* [writeJSONFile](./docs/utils/write-json-file.md)
* [writeTextFile](./docs/utils/write-text-file.md)

### Sync

* *None by now, use **async** ;)*


License
-------

Licensed under MIT

Copyright (c) 2019 Aneta Suns
npm package: @suns-echoes/string-utils
Description: String Utilities Library
Author: Aneta Suns
Latest version: 0.3.1

String Utilities
================

`string-utils` library add new methods for string manipulation.


Installation
------------

`npm i @suns-echoes/string-utils`


Import
------

```js
// Import library distribution file
import { StringUtils } from '@suns-echoes/string-utils';
```

```js
// import library from source
import { StringUtils } from '@suns-echoes/string-utils/src/';
// or
import { StringUtils } from '@suns-echoes/string-utils/src/string-utils';
```

```js
// Import single util from source
import { overwrite } from '@suns-echoes/string-utils/src/utils/overwrite';
```


Methods
-------

* [count lines](./docs/utils/count-lines.md)
* [insert](./docs/utils/insert.md)
* [overwrite](./docs/utils/overwrite.md)
* [toCamelCase](./docs/utils/to-camel-case.md)
* [toDashCase](./docs/utils/to-dash-case.md)


License
-------

Licensed under MIT

Copyright (c) 2019 Aneta Suns
npm package: @suns-echoes/transform-esm-into-cjs
Description: Transform ES modules into CommonJS
Author: Aneta Suns
Latest version: 0.2.0

Transform ES modules into CommonJS
==================================

The `transform-esm-into-cjs` utility transforms ES6 modules into CommonJS without adding any unnecessary code.

Warning: *If module exports default and named members, default member will be named "default".*

Warning: *If default and named members are imported from the same module, default member will be named "default".*


Installation
------------

`npm i --save-dev @suns-echoes/transform-esm-into-cjs`


Import
------

```js
// Import utility distribution file
import { transformESMIntoCJS } from '@suns-echoes/transform-esm-into-cjs';
```

```js
// Import utility from source
import { transformESMIntoCJS } from '@suns-echoes/transform-esm-into-cjs/src';
// or
import { transformESMIntoCJS } from '@suns-echoes/transform-esm-into-cjs/src/transform-esm-into-cjs';
```


Usage
-----

```js
const cjsCode = transformESMIntoCJS(esmCode, silent);
```


### Arguments

* `<string>` `source` - original source code (ESM);
* `<boolean>` `[silent=false]` - Optional, mute warnings (def.: false).


### Returns

* `<string>` - transformed source code (CJS).


Examples
--------

### Transform ESM code into CJS code and mute warnings:

input string:

```js
import { MyModule } from 'my-module';
```

transformation script:

```js
const output = transformESMIntoCJS(input, true);
```

output string:

```js
const { MyModule } = require('my-module');
```


License
-------

Licensed under MIT

Copyright (c) 2021 Aneta Suns
npm package: @suns-echoes/ts-types
Description: TypeScript definitions
Author: Aneta Suns
Latest version: 2.4.0

# README

## About project

The collection of useful TypeScript type definitions and utility types.

[⮝](#readme)



## Installation

`npm i --save-dev @suns-echoes/ts-types`

[⮝](#readme)



## Usage

It might be necessary to add this module to `types` in `tsconfig.json`:

```jsonc
{
	// ...
	"compilerOptions": {
		// ...
	},
	"include": ["node_modules/@suns-echoes/ts-types", ...],
	// ...
}

```

or to add reference in your project:

```js
/// <reference types="@suns-echoes/ts-types" />
```

[⮝](#readme)



## Module Contents

### Types

| Type name     | Description
|---------------|---------------------------------------------------------------
| `AnyArray`    | Any type of object that have enumerable items.
| `AnyClass`    | Any type of class.
| `AnyFunction` | Any type of function.
| `AnyObject`   | Any type of object.
| `ObjectLike`  | Any type that behave similarly to object.
| `TypedArray`  | Any of typed arrays.

### Alias Types

| Type name     | Description
|---------------|---------------------------------------------------------------
| `PathKey`     | A strings representing single keys in nested object path.
| `PathKeys`    | An array of strings representing path consecutive keys in nested object.
| `StringPath`  | A string representing path in nested object.
| `ObjectKey`   | The valid types for object keys.

### Utility Types

| Type name               | Description
|-------------------------|-----------------------------------------------------
| `Cast<Target, NewType>` | Cast object type to another object type.
| `Immutable<Target>`     | Shallow type cast into immutable type.
| `ImmutableDeep<Target>` | Deep type cast into immutable type.
| `Mutable<Target>`       | Shallow type cast into mutable type.
| `MutableDeep<Target>`   | Deep type cast into mutable type.
| `PartialDeep<Target>`   | Make all properties in Target and nested objects optional.

[⮝](#readme)



## License

Licensed under MIT

Copyright (c) 2022-2025 Aneta Suns

[⮝](#readme)
npm package: @sunscreen/spf-client
Description: TypeScript client library for Sunscreen SPF REST API
Author: Sunscreen
Latest version: 0.2.2

# @sunscreen/spf-client

TypeScript client library for Sunscreen's Secure Processing Framework (SPF), enabling Fully Homomorphic Encryption (FHE) operations in web2 and web3 environments.

## Installation

```bash
npm install @sunscreen/spf-client
```

## Example: Encrypted Addition

This example demonstrates encrypting two values, running an FHE program to add them, and decrypting the result.

### FHE Program

FHE programs are written in C and compiled with the Sunscreen LLVM compiler from [github.com/Sunscreen-tech/sunscreen-llvm](https://github.com/Sunscreen-tech/sunscreen-llvm).

```c
#include <parasol.h>

[[clang::fhe_program]]
void add([[clang::encrypted]] int16_t a,
         [[clang::encrypted]] int16_t b,
         [[clang::encrypted]] int16_t *result) {
  *result = a + b;
}
```

### TypeScript Client

```typescript
import * as spf from '@sunscreen/spf-client';
import * as acl from '@sunscreen/spf-client/acl';

// Initialize the client
await spf.initialize();

// Create wallets for uploader and runner
const uploader = spf.PrivateKeySigner.random();
const runner = spf.PrivateKeySigner.random();

// Upload the compiled FHE program
const programBytes = new Uint8Array(readFileSync("add.spf"));
const libraryId = await spf.uploadProgram(programBytes);

// Encrypt and upload values
const ciphertextA = await spf.encryptValue(15, 16);
const ciphertextIdA = await spf.uploadCiphertext(uploader, ciphertextA);

const ciphertextB = await spf.encryptValue(27, 16);
const ciphertextIdB = await spf.uploadCiphertext(uploader, ciphertextB);

// Grant run access to runner (returns new ciphertext IDs)
const newCiphertextIdA = await acl.updateAccess(uploader, ciphertextIdA, [
  acl.allowRunAccess(spf.asAddress(runner.getAddress()), libraryId, spf.asProgramName("add"))
]);
const newCiphertextIdB = await acl.updateAccess(uploader, ciphertextIdB, [
  acl.allowRunAccess(spf.asAddress(runner.getAddress()), libraryId, spf.asProgramName("add"))
]);

// Runner submits the computation
const parameters = [
  spf.createCiphertextParameter(newCiphertextIdA),
  spf.createCiphertextParameter(newCiphertextIdB),
  spf.createOutputCiphertextArrayParameter(16, 1),
];
const runHandle = await spf.submitRun(runner, libraryId, "add", parameters);

// Wait for computation to complete
await spf.waitForRun(runHandle);

// Derive result ciphertext ID
const resultCiphertextId = spf.deriveResultCiphertextId(runHandle, 0);

// Grant decrypt access to uploader (returns new ciphertext ID)
const newResultCiphertextId = await acl.updateAccess(runner, resultCiphertextId, [
  acl.allowDecryptAccess(spf.asAddress(uploader.getAddress()))
]);

// Uploader requests decryption
const decryptHandle = await spf.requestDecryption(uploader, newResultCiphertextId);
const result = await spf.waitForDecryption(decryptHandle, 16);

console.log(`15 + 27 = ${result}`); // Output: 15 + 27 = 42
```

## Documentation

Complete documentation is available at [spf-docs.sunscreen.tech](https://spf-docs.sunscreen.tech).

## License

MIT