@editorjs/helpers
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@editorjs/helpers

Utils useful for Editor.js tools development

Installation

  npm install @editorjs/helpers

Function list

  • beautifyShortcut - Make shortcut command more human-readable
  • cacheable - Decorator which provides ability to cache method or accessor result
  • capitalize - Capitalizes first letter of the string
  • copyTextToClipboard - Copies passed text to the clipboard
  • debounce - Debouncing method
  • deepMerge - Merge two objects recursively
  • deprecationAssert - Common method for printing a warning about the usage of deprecated property or method.
  • isEmpty - True if passed variable is null/undefined/''/{}
  • notEmpty - True if passed variable is not null/undefined/''/{}
  • equals - Compares two values with unknown type
  • getValidUrl - Returns valid URL. If it is going outside and valid, it returns itself
  • isPrintableKey - Returns true if passed key code is printable (a-Z, 0-9, etc) character.
  • throttle - Returns a function, that, when invoked, will only be triggered at most once during a given window of time.
  • isBoolean - Checks if passed argument is boolean
  • isClass - Check if passed function is a class
  • isFunction - Check if passed variable is a function
  • isNumber - Checks if passed argument is number
  • isObject - Checks if passed argument is an object
  • isPromise - Check if passed object is a Promise
  • isString - Checks if passed argument is a string
  • isUndefined - Checks if passed argument is undefined
  • typeOf - Return string representation of the object type
  • getUserOS - Returns object with os name as key and boolean as value. Shows current user OS

About CodeX

CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.

🌐 Join 👋 Twitter Instagram
codex.so codex.so/join @codex_team @codex_team

Readme

Keywords

none

Package Sidebar

Install

npm i @editorjs/helpers

Weekly Downloads

3,727

Version

1.0.1

License

MIT

Unpacked Size

89.5 kB

Total Files

136

Last publish

Collaborators

  • codex-team