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

locay

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

locay

A window.location simulator for the browser and beyond

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

locay

A window.location simulator for the browser and beyond

A precise simulation of the location object found in a browser near you.

Install

from npm

npm install --save locay

Example

import Location from 'location';

let l = new Location('http://www.example.com:3000/some/path?some=query#somehash');
/**
 * Results in:
 *
 * {
 *   href: 'http://www.example.com:3000/some/path?some=query#somehash',
 *   host: 'www.example.com:3000',
 *   hash: '#somehash',
 *   port: '3000',
 *   search: '?some=query',
 *   protocol: 'http:',
 *   pathname: '/some/path',
 *   hostname: 'www.example.com',
 *   origin: 'http://www.example.com:3000'
 * };
 */

License

MIT

Keywords

browser

FAQs

Package last updated on 03 Apr 2015

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