New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gm-util

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gm-util

### Request

latest
Source
npmnpm
Version
5.13.1
Version published
Weekly downloads
102
34.21%
Maintainers
1
Weekly downloads
 
Created
Source

gm-util

Request

Request RequestInterceptor

timeSync

timeSync

param

废弃,使用query-string

isElementInViewport

element整个界面是否在视窗内

isElementInViewport

element是否存在界面在视窗内

is

  • weixin
  • mac

contains

contains(domA, domB) domA 是否包含 domB

getElementPosition

获取元素的位置

Bundle

配合react-router做异步加载的一个组件

processReactRouterProps

react-router从2切4过程中,props会有变动,此方法做个兼容过度,具体见代码

processHistory

同上

keyMirror

keyMirror({A: null}) // 返回 {A: 'A'}

injectStore

配合 mobx 把 store 注入 组件

@injectStore({aStore})
class A extends React.Component {
    render(){
        console.log(this.props.aStore);
        // ...
    }
}

groupByWithIndex

迁移 lodash 的时候 xxxBy 方法并没有提供所有, 估这里封装下

FAQs

Package last updated on 08 Nov 2025

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