Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-search-query-string-helper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-search-query-string-helper

React Search Query String Helper

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

React Search Query String Helper

Adds additional methods to handle search query.

NPM JavaScript Style Guide

Install

npm

npm install --save react-search-query-string-helper

yarn

yarn add react-search-query-string-helper

Usage

import React, { Component } from 'react';
import withSearchHelper from 'react-search-query-string-helper';

class MyComponent extends Component {
  render() {
    const search = JSON.stringify(this.parseSearch());

    return (
      <p>{search}</p>
    );
  }
}
export default withSearchHelper(MyComponent);

Added Methods

  • parseSearch() - Returns parsed search object
  • replaceSearch(search [String]) - Call history.replace with supplied search string
  • updateSearch(search [Object]) - Convert supplied search object into query string and call replaceSearch()
  • addSearch(search [Object]) - Add supplied search object with existing search query
  • removeSearch(keys [Array]) - Remove all keys from existing search query
  • clearSearch() - Clear search query

MIT © sandeshshrestha

FAQs

Package last updated on 28 Apr 2019

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