JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1324
  • Score
    100M100P100Q103108F
  • License MIT

Convert react-router-dom this.props.location.search string to an object

Package Exports

  • stringquery

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stringquery) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Install

npm install stringquery --save

Usage


  const querySearch = require("stringquery");

  querySearch("?status=APPROVED&page=1&limit=20"); 
  // > { limit: "10", page:"1", status:"APPROVED" }



  const obj = querySearch("?status=APPROVED&page=1limit=20");  
  // > { limit: "10", page:"1",   status:"APPROVED" }


  // obj.status
  // obj.page
  // obj.limit




  OR

  import querySearch from "stringquery";

  querySearch("?status=APPROVED&page=1&limit=20"); 
  // > { limit: "10", page:"1", status:"APPROVED" }



  const obj = querySearch("?status=APPROVED&page=1&limit=20"); 
  // > { limit: "10", page:"1", status:"APPROVED"   }


  // obj.status
  // obj.page
  // obj.limit

Github: https://github.com/accimeesterlin/query-search

License

MIT