# elven-code

> "Elvenware code samples and utilities. For general use and for BC students"

Latest version **4.14.2** (published 2023-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install elven-code
pnpm add elven-code
yarn add elven-code
bun add elven-code
```

## 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 | 4.14.2 |
| Published | 2023-05-28 |
| First published | 2015-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 124.2 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Charlie Calvert |
| Maintainers | charliecalvert |
| Keywords | Elvenware, npm, test |

## Links

- npm: https://www.npmjs.com/package/elven-code
- Repository: https://github.com/charliecalvert/elven-code
- Homepage: https://github.com/charliecalvert/elven-code#readme
- Issues: https://github.com/charliecalvert/elven-code/issues
- npm.io page: https://npm.io/package/elven-code

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) ^10.2.5
- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [walk](https://npm.io/package/walk.md) ^2.3.15
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 4.14.2 (latest) — 2023-05-28
- 4.14.1 — 2023-05-19
- 4.14.0 — 2023-05-19
- 4.13.9 — 2023-05-18
- 4.13.8 — 2023-05-07
- 4.13.7 — 2023-05-07
- 4.13.6 — 2023-05-07
- 4.13.5 — 2023-05-07
- 4.13.4 — 2023-05-07
- 4.13.3 — 2023-05-06
- 4.13.2 — 2023-05-06
- 4.13.1 — 2023-02-16
- 4.13.0 — 2023-02-16
- 4.12.1 — 2022-05-17
- 4.12.0 — 2022-05-15
- … 68 more at https://npm.io/package/elven-code/versions

## README

# Elven Code

These are utility functions that Charlie commonly uses or that he shares with his students.

## Usage

    import { elfUtils, elfStrings, elfFiles } from 'elven-code';
    const { elfUtils, elfStrings, elfFiles } = require('elven-code');
    const key = elfStrings.getEndFromCharacter(dir, '/');
    const content = elfFiles.readFile(fileName);
    console.log(key, content);

## Notes

Meant to be used on the server side. Webpack and create-react-app will
complain If you target the client. For a solution, see: https://stackoverflow.com/q/64557638/253576.


Install:

    npm i elven-code

## Testing

To test all the files requires some setup and can best be done on Charlie's machines. In particular, you need:

- **ElvenConfig.json** in **~/.config**

To install the Git Repository called test-dummy:

- git clone https://github.com/charliecalvert/test-dummy.git
- git clone git@github.com:charliecalvert/test-dummy.git


To run all the tests requires setup:

    npm test

To run some utils might work without setup:

- npm run test-files
- npm run test-strings


The config file might look like this:

```json
{
    "calvert": {
        "base-dir": "/home/charlie/",
        "site-dirs": [
          "Documents/AllTest",
          "Git/CloudNotes/Assignments",
          "Git/CloudNotes/Prog270",
          "Git/CloudNotes/Isit322"
        ]
    }
}
```

https://www.elvenware.com/teach/assignments/NpmPublishing.html

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