get-params-for-iframe

1.0.1 • Public • Published

get-params-for-iframe

You can get parameters from url, when you use iframe for it.

If there were parent web site and embed other web site using iframe tag, you can get parameters after question mark.

How to use

const { getParamValue } = require('get-params-for-iframe');
const params = getParamValue();

You can get parameters in a query of url. For examples, if there is ex-url https://quepark.github.io/get-params-for-iframe?query="Hello world!"&username="Gray Gyuha Park"&email="gyuhapark11@gmail.com", it will be following object:

{
  query: "Hello world!",
  username: "Gray Gyuha Park",
  email: "gyuhapark11@gmail.com"
}

And it needs query. if not, you will get error message "there is no query.". Please note that this package only works on web site with query.

MIT LISENCE

Package Sidebar

Install

npm i get-params-for-iframe

Weekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

3.44 kB

Total Files

4

Last publish

Collaborators

  • graypark