# nv-facutil-simple-next-prev

> nv-facutil-simple-next-prev ============================ - simple next-prev data-ctx

Latest version **1.0.1** (published 2022-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-facutil-simple-next-prev
pnpm add nv-facutil-simple-next-prev
yarn add nv-facutil-simple-next-prev
bun add nv-facutil-simple-next-prev
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-01-15 |
| First published | 2022-01-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-facutil-simple-next-prev
- npm.io page: https://npm.io/package/nv-facutil-simple-next-prev

## Dependencies (2)

- [nv-set-basic](https://npm.io/package/nv-set-basic.md) ^1.0.8
- [nv-facutil-basic](https://npm.io/package/nv-facutil-basic.md) ^1.1.3

## Recent versions

- 1.0.1 (latest) — 2022-01-15

## README

nv-facutil-simple-next-prev
============================
- simple  next-prev data-ctx  

install
=======
- npm install nv-facutil-simple-next-prev 

usage
=====
      
    const {Data} = require("nv-facutil-simple-next-prev")
    
example
-------



        var data = new Data({a:100,b:200,c:300})

        /*
        > data
        Data { a: 100, b: 200, c: 300 }
        >
        > data.history_
        SimpleHistory(1) [
          { a: 100, b: 200, c: 300 },
          max_size: Infinity,
          noexist: Symbol(noexist)
        ]
        >
        */

        data.next((r)=>{r.a=r.a+1;r.b=r.b+1;r.c=r.c+1})

        /*
        >
        Data { a: 101, b: 201, c: 301 }
        >
        > data.history_
        SimpleHistory(2) [
          { a: 100, b: 200, c: 300 },
          { a: 101, b: 201, c: 301 },
          max_size: Infinity,
          noexist: Symbol(noexist)
        ]
        >

        */

        data.next((r)=>{r.a=r.a+1;r.b=r.b+1;r.c=r.c+1})

        /*
        > data
        Data { a: 102, b: 202, c: 302 }
        >
        > data.history_
        SimpleHistory(3) [
          { a: 100, b: 200, c: 300 },
          { a: 101, b: 201, c: 301 },
          { a: 102, b: 202, c: 302 },
          max_size: Infinity,
          noexist: Symbol(noexist)
        ]
        >
        */

        data.prev()

        /*

        > data.prev()
        Data { a: 101, b: 201, c: 301 }
        >
        > data
        Data { a: 101, b: 201, c: 301 }
        >
        > data.history_
        SimpleHistory(2) [
          { a: 100, b: 200, c: 300 },
          { a: 101, b: 201, c: 301 },
          max_size: Infinity,
          noexist: Symbol(noexist)
        ]
        >
        */

        /*
        > data.prev()
        Data { a: 100, b: 200, c: 300 }
        >
        > data.prev()
        Data {}
        > data.history_
        SimpleHistory(0) [ max_size: Infinity, noexist: Symbol(noexist) ]
        >
        */


METHODS
=======

      new Data(init_data={},copy_func=DFLT_COPY,asgn_func=DFLT_ASSIGN,max_hist_size=Infinity,none=noexist)

      //getter/setter
          data.assign_func_              
          data.copy_func_               
      //getter
          data.history_              
          data.max_hist_size_        
          data.noexist_

      data.clear()
      data.prev(handle,copy_func=DFLT_COPY,asgn_func=DFLT_ASSIGN)
      data.next(handle=(r)=>r,asgn_func=DFLT_ASSIGN)

APIS
====

- DFLT\_COPY(that)
- DFLT\_ASSIGN(that,O)


LICENSE
=======
- ISC

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