# sanctuary-destruct

> Cleans up required sanctuary functions when using destructuring assignment

Latest version **1.0.1** (published 2019-03-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install sanctuary-destruct
pnpm add sanctuary-destruct
yarn add sanctuary-destruct
bun add sanctuary-destruct
```

Provides the command `sanctuary-destruct`.

## 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 | 2019-03-24 |
| First published | 2019-03-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bijoy Thomas |
| Maintainers | bijoythomas |
| Keywords | sanctuary |

## Links

- npm: https://www.npmjs.com/package/sanctuary-destruct
- Repository: https://github.com/bijoythomas/sanctuary-destruct
- Homepage: https://github.com/bijoythomas/sanctuary-destruct#readme
- Issues: https://github.com/bijoythomas/sanctuary-destruct/issues
- npm.io page: https://npm.io/package/sanctuary-destruct

## Dependencies (7)

- [ramda](https://npm.io/package/ramda.md) 0.25.0
- [eslint](https://npm.io/package/eslint.md) 5.15.3
- [fantasydo](https://npm.io/package/fantasydo.md) 0.0.0
- [sanctuary](https://npm.io/package/sanctuary.md) 1.0.0
- [buffer-from](https://npm.io/package/buffer-from.md) ^1.1.1
- [splice-string](https://npm.io/package/splice-string.md) ^1.0.0
- [read-file-stdin](https://npm.io/package/read-file-stdin.md) ^0.2.0

## Recent versions

- 1.0.1 (latest) — 2019-03-24
- 1.0.0 — 2019-03-23

## README

# sanctuary-destruct 
[![npm](https://img.shields.io/npm/v/sanctuary-destruct.svg)](https://www.npmjs.com/package/sanctuary-destruct)
[![Build Status](https://travis-ci.org/bijoythomas/sanctuary-destruct.svg?branch=master)](https://travis-ci.org/bijoythomas/sanctuary-destruct)

![demo](https://raw.githubusercontent.com/bijoythomas/sanctuary-destruct/master/demo.gif)

- Cleans up required or imported [Sanctuary](https://sanctuary.js.org/) functions when
  using destructing assignment.
- Reads functions from local Sanctuary instance based on the current working
  directory.

## install

```sh
npm install -g sanctuary-destruct
```

## usage

Prints the modified file contents to stdout.

#### file as argument

```sh
sanctuary-destruct path/to/file.js
```

#### stdin

```sh
cat path/to/file.js | sanctuary-destruct
```

#### vim

```
%!sanctuary-destruct
```

Or use [Preserve function](https://technotales.wordpress.com/2010/03/31/preserve-a-vim-function-that-keeps-your-state/)
that restores cursor position after:

```
:call Preserve("%!sanctuary-destruct")
```


#### Sublime Text
Install the [FilterPipes plugin](https://packagecontrol.io/packages/FilterPipes) and add a key binding like
```
{ "keys": ["alt+shift+d"], "command": "filter_pipes_process", "args": {"command": "sanctuary-destruct"}}
```

## Acknowledgements

Big thanks to [Raine Virta](https://github.com/raine) whose [ramda-destruct](https://github.com/raine/ramda-destruct) package was the inspiration for this.

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