# @archivistnerd/walksync

> Archivist Nerd's walksync Package

Latest version **0.0.3** (published 2020-11-24) · (MIT or SEE LICENSE IN https://github.com/Archivist-Nerd/node-walksync/blob/main/docs/LICENSE) license · 0 weekly downloads

## Install

```sh
npm install @archivistnerd/walksync
pnpm add @archivistnerd/walksync
yarn add @archivistnerd/walksync
bun add @archivistnerd/walksync
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-11-24 |
| First published | 2020-11-20 |
| Weekly downloads | 0 |
| License | (MIT or SEE LICENSE IN https://github.com/Archivist-Nerd/node-walksync/blob/main/docs/LICENSE) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Archivist Nerd |
| Maintainers | archivistnerd |
| Keywords | Archivist, Nerd, walk, path, directory, folder, sync |

## Links

- npm: https://www.npmjs.com/package/@archivistnerd/walksync
- Repository: https://github.com/Archivist-Nerd/node-walksync
- Homepage: https://github.com/Archivist-Nerd/node-walksync/blob/main/README.md
- Issues: https://github.com/Archivist-Nerd/node-walksync/issues
- npm.io page: https://npm.io/package/@archivistnerd/walksync

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.3 (latest) — 2020-11-24
- 0.0.2 — 2020-11-24
- 0.0.1-alpha-201120.1200 — 2020-11-20
- 0.0.1-alpha-201120.404 — 2020-11-20
- 0.0.1-alpha-201120.14 — 2020-11-20

## README

# node-walksync

[![npm version](https://img.shields.io/npm/v/@archivistnerd/walksync.svg)](https://www.npmjs.com/package/@archivistnerd/walksync)
[![build status](https://api.travis-ci.com/Archivist-Nerd/node-walksync.svg)](https://travis-ci.com/Archivist-Nerd/node-walksync.svg)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/Archivist-Nerd/node-walksync.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Archivist-Nerd/node-walksync/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Archivist-Nerd/node-walksync.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Archivist-Nerd/node-walksync/context:javascript)

Archivist Nerd's walksync Package

> A very simple option for recursivly walking the file system

## This Package is in VERY EARLY ALPHA
> This package subject to change QUICKLY, and possibly Often

## Installation

```sh
npm install --save @archivistnerd/walksync
```

## Usage (Simple)

```js
'use strict';

const walksync = require('@archivistnerd/walksync');

// List all files in current location (recursivly)
console.log( walksync('.') )
```

## Usage (Complicated)

```js
'use strict';

const fs       = require('fs')
    , walksync = require('@archivistnerd/walksync')
    ;
let totalFiles = 0
  , totalFolders = 0
  , totalFileSize = 0
  ;

function filesFn( fullpath, basepath, stats){
  totalFiles++
  try {
    let filesize = fs.readFileSync( fullpath ).length
      ;
    console.log(`${filesize}\t${fullpath}`)
    totalFileSize+=filesize
  }
  // throw away error if we can't open the file
  catch (err) {}
}
function FoldersFn( fullpath, basepath, stats){
  totalFolders++
}
// List all files in current location (recursivly)
walksync('.', filesFn, FoldersFn)

console.log({
  totalFolders,
  totalFiles,
  totalFileSize
})
```

## License

MIT

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