electrum-utils
v1.6.7
Published
Utilities for Electrum.
Downloads
255
Keywords
Readme
Electrum utilities
React components which work with Electrum might need some of the functionality provided by these utility functions.
getInstanceMethodNames (obj, stop)→ gets an array of method names by walkingobj's prototype chain until (optional) prototypestopis reached.
See Enumerating methods on a JavaScript class instance for a discussion on how this works.getTextSelection (element)→ gets the selection as an object containing afromand atoposition. Example selection:{from: 3, to: 8}. Cursor position without selection:from: 3, to: 3}.shallowEqual (objA, objB)→ returnstrueif both objects contain the same keys and values (the comparison is done by reference equality).startsWithLowerCase (string)→ returnstrueif the text starts with a lower case character (a-z, no accented characters).startsWithUpperCase (string)→ returnstrueif the text starts with an upper case character (A-Z, no accented characters).
