Socket
Socket
Sign inDemoInstall

@meniga/utils

Package Overview
Dependencies
Maintainers
0
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meniga/utils

Small re-usable utils/decorators/helpers for meniga projects


Version published
Maintainers
0
Created
Source

@meniga/utils

The utils library contains smalls re-usable utils/decorators/helpers for Meniga projects

High Order Component Helpers


This is a set of utility helpers to work with recompose.

componentDidMount

Hook into the component did mount life cycle event in recompose

componentDidUpdate

Hook into the component did update life cycle event in recompose

componentWillReceiveProps

DEPRECATED. Use componentDidUpdate instead.

componentWillMount

DEPRECATED. Use componentDidMount instead.

componentWillUnmount

Hook into the component will unmount life cycle event in recompose

composeConnect

Connect the redux store in a HOC

createContext

Create a context method from a single object in recompose

getWindowSize

Create hooks in recompose that attach to window resizing and store in the windowSize state

getElementPosition

Create hook in recompose that attaches to window event to supply the elements position in the position state

React Utils


createProps

Create a props object with the given PropType

keyboardClick

Create a props object that contains react handlers for keyboard enter and space to trigger an onClick handler

visibleChildren

Returns a flattened list of child elements

Redux


createTypes

Create a list of types with a given prefix

reducerUtils

Some utility functions for setting known properties on state such as error information

Other


containsValue

Test if the first string includes the second string

formatText

String format

isEqualValue

Does case insensitive string comparison

shouldUpdate

Takes in a set of props to watch and detects if they have changed at all between 2 props objects

textRelevance

Sort a result set by relevance with a given matchText

uuid

Generate a unique (UUID format) id string

triggerResize

Dispatch a resize event to the window object

Device Detection

Detect various devices:

  • isMobile
  • isMobileOrTablet
  • isTablet
  • isIOS
  • isAndroid

queryUtils

Utility functions for working with the query string

  • getQueryString
  • appendToQuery
  • getFilterQuery
  • getIncludeQuery
  • getSkipAndTakeQuery

Data


makeTree

Make a tree from a parent / child structure

addOtherToCategoryTree

Add 'other' category to category tree

sortArray

Sorts an array of strings or an array of objects

FAQs

Package last updated on 26 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc