UNPKG

location-href

Version:

Simple Node-friendly interface to the browser's location

16 lines (10 loc) 246 B
'use strict' var location = require('global/window').location || {href: ''} module.exports = getLocation getLocation.set = setLocation function getLocation () { return location.href } function setLocation (href) { location.href = href }