# nv-facutil-ab

> nv-facutil-ab ======================= - serveral simple function for copy-arraybuffer

Latest version **1.0.6** (published 2025-07-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-facutil-ab
pnpm add nv-facutil-ab
yarn add nv-facutil-ab
bun add nv-facutil-ab
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2025-07-11 |
| First published | 2023-05-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-facutil-ab
- npm.io page: https://npm.io/package/nv-facutil-ab

## Dependencies (1)

- [nv-stringify-ab](https://npm.io/package/nv-stringify-ab.md) ^1.0.0

## Recent versions

- 1.0.6 (latest) — 2025-07-11
- 1.0.5 — 2024-05-19
- 1.0.4 — 2024-05-05
- 1.0.1 — 2023-06-18
- 1.0.0 — 2023-05-28

## README

nv-facutil-ab
=======================
-  serveral simple function for copy-arraybuffer

install
=======
- npm install nv-facutil-ab



usage
=====
    
      const { 

         _cp,
         cp,
         cp_from_src_start,
         cp_all_if_dst_is_enough,
         cp_all_if_same_blen

      }   = require("nv-facutil-ab");
 

example
-------

### 

		var src_ab = new ArrayBuffer(10);
		var src_u8a = new Uint8Array(src_ab,3,2);
		src_u8a[0] =11
		src_u8a[1] =22

		/*
		> src_ab
		ArrayBuffer {
		  [Uint8Contents]: <00 00 00 0b 16 00 00 00 00 00>,
		  byteLength: 10
		}
		> 
		*/

		var dst_ab  = new ArrayBuffer(5);
		/*
		> dst_ab
		ArrayBuffer { [Uint8Contents]: <00 00 00 00 00>, byteLength: 5 }
		> 
		*/

		_cp(src_ab,3,2,dst_ab,1) 

		/*
		> dst_ab
		ArrayBuffer { [Uint8Contents]: <00 0b 16 00 00>, byteLength: 5 }
		> 
		*/



METHODS
========


APIS
=======

		const _cp = (src_ab,src_offset,cp_size,dst_ab,dst_offset) => {
		const cp = (src_ab,dst_ab,src_offset,cp_size,dst_offset) => {
		const cp_from_src_start       = (src_ab,dst_ab,cp_size,dst_offset=0) =>  cp(src_ab,dst_ab,0,cp_size,dst_offset); 
		const cp_all_if_dst_is_enough = (src_ab,dst_ab,        dst_offset=0) => _cp(src_ab,0,src_ab.byteLength,dst_ab,dst_offset);
		const cp_all_if_same_blen     = (src_ab,dst_ab)                      => _cp(src_ab,0,src_ab.byteLength,dst_ab,0);


LICENSE
=======
- ISC

---
_Source: https://npm.io/package/nv-facutil-ab · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
