# code-sha-256

> Compare local to remote sha-256 (for use with AWS Lambda). The use-case it to determine if you should update a function because the function's code has changed.

Latest version **0.0.2** (published 2018-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install code-sha-256
pnpm add code-sha-256
yarn add code-sha-256
bun add code-sha-256
```

## 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.2 |
| Published | 2018-12-29 |
| First published | 2018-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | menubar |

## Links

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

## Recent versions

- 0.0.2 (latest) — 2018-12-29
- 0.0.1 — 2018-03-28

## README

## code-sha-256

Compare local to remote sha-256 (for use with AWS Lambda). The use-case it to determine if you should update a function because the function's code has changed.

### Example

```js

const compareFunctionCode = require('code-sha-256')
const config = { region: 'us-east-1' }
const params = { 
  FunctionName: 'kitApiLambdaEdge',
  Qualifier: '1' // optional, default is $LATEST
}

compareFunctionCode('index.js', { params, config }).then(shouldUpdate => {
  if (shouldUpdate) {
    // update function code
  } else {
    // proceed
  }
})

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