# electrum-utils

> Utilities for Electrum.

Latest version **1.6.7** (published 2017-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install electrum-utils
pnpm add electrum-utils
yarn add electrum-utils
bun add electrum-utils
```

## 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.6.7 |
| Published | 2017-04-02 |
| First published | 2015-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Epsitec SA |
| Maintainers | epsitec |

## Links

- npm: https://www.npmjs.com/package/electrum-utils
- Repository: https://github.com/epsitec-sa/electrum-utils
- Issues: https://github.com/epsitec-sa/electrum-utils/issues
- npm.io page: https://npm.io/package/electrum-utils

## Recent versions

- 1.6.7 (latest) — 2017-04-02
- 1.6.6 — 2017-04-02
- 1.6.5 — 2017-04-02
- 1.6.4 — 2017-04-02
- 1.6.3 — 2017-04-02
- 1.6.2 — 2017-03-31
- 1.6.1 — 2017-02-26
- 1.6.0 — 2016-04-19
- 1.5.1 — 2016-03-16
- 1.5.0 — 2016-02-09
- 1.4.0 — 2016-02-05
- 1.3.0 — 2016-02-01
- 1.2.0 — 2016-01-27
- 1.1.0 — 2016-01-22
- 1.0.0 — 2015-11-25
- … 2 more at https://npm.io/package/electrum-utils/versions

## README

# Electrum utilities

React components which work with Electrum might need some of the functionality
provided by these utility functions.

* `getInstanceMethodNames (obj, stop)` &rarr; gets an array of method names by walking
  `obj`'s prototype chain until (optional) prototype `stop` is reached.  
  See [Enumerating methods on a JavaScript class instance](http://code.fitness/post/2016/01/javascript-enumerate-methods.html)
  for a discussion on how this works.

* `getTextSelection (element)` &rarr; gets the selection as an object containing
  a `from` and a `to` position. Example selection: `{from: 3, to: 8}`. Cursor
  position without selection: `from: 3, to: 3}`.

* `shallowEqual (objA, objB)` &rarr; returns `true` if both objects contain the
  same keys and values (the comparison is done by reference equality).

* `startsWithLowerCase (string)` &rarr; returns `true` if the text starts with a
  lower case character (**a-z**, no accented characters).

* `startsWithUpperCase (string)` &rarr; returns `true` if the text starts with an
  upper case character (**A-Z**, no accented characters).

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