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

biometry

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

biometry - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

app.js

144

node_modules/history/CHANGES.md

@@ -1,19 +0,85 @@

## [HEAD]
> Unreleased
## [v2.1.0]
- Deprecate usage of `<base href>` as an automatic substitute for `basename`
in `useBasename`. They have subtly different semantics ([#94])
[v2.1.0]: https://github.com/mjackson/history/compare/v2.0.2...v2.1.0
[#94]: https://github.com/mjackson/history/issues/94
## [v2.0.2]
> Apr 14, 2016
- **Bugfix:** Fix usage of `hasOwnProperty` (thanks @taion)
- **Bugfix:** Fix handling of `<base>` without `href` ([#262] thanks @taion)
- **Bugfix:** Fix security error when frontend URL !== backend URL ([#267] thanks @slorber)
[v2.0.2]: https://github.com/mjackson/history/compare/v2.0.1...v2.0.2
[#262]: https://github.com/mjackson/history/pull/262
[#267]: https://github.com/mjackson/history/pull/267
## [v2.0.1]
> Mar 2, 2016
- **Bugfix:** Fix stack size growth with every `listenBefore` listener ([#225] thanks @threepointone, @taion)
- Remove docs from npm package
[v2.0.1]: https://github.com/mjackson/history/compare/v2.0.0...v2.0.1
[#225]: https://github.com/mjackson/history/issues/225
## [v2.0.0]
> Feb 4, 2016
- **Bugfix:** Fix search base logic with an empty query ([#221])
- **Bugfix:** Fail gracefully when Safari 5 security settings prevent access to window.sessionStorage ([#223])
[v2.0.0]: https://github.com/mjackson/history/compare/v2.0.0-rc3...v2.0.0
[#221]: https://github.com/mjackson/history/issues/221
[#223]: https://github.com/mjackson/history/pull/223
## [v2.0.0-rc3]
> Feb 3, 2016
- **Bugfix:** Don't convert same-path `PUSH` to `REPLACE` when `location.state` changes ([#179])
- **Bugfix:** Re-enable browser history on Chrome iOS ([#208])
- **Bugfix:** Properly support location descriptors in `history.createLocation` ([#200])
[v2.0.0-rc3]: https://github.com/mjackson/history/compare/v2.0.0-rc2...v2.0.0-rc3
[#179]: https://github.com/mjackson/history/pull/179
[#208]: https://github.com/mjackson/history/pull/208
[#200]: https://github.com/mjackson/history/pull/200
## [v2.0.0-rc2]
> Jan 9, 2016
- Add back deprecation warnings
[v2.0.0-rc2]: https://github.com/mjackson/history/compare/v2.0.0-rc1...v2.0.0-rc2
## [v2.0.0-rc1]
> Jan 2, 2016
- **Bugfix:** Don't create empty entries in session storage ([#177])
[v2.0.0-rc1]: https://github.com/mjackson/history/compare/v1.17.0...v2.0.0-rc1
[#177]: https://github.com/mjackson/history/pull/177
## [v1.17.0]
> Dec 19, 2015
- **Bugfix:** Don't throw in memory history when out of history entries ([#170])
- **Bugfix:** Fix the deprecation warnings on `createPath` and `createHref` ([#189])
[HEAD]: https://github.com/rackt/history/compare/latest...HEAD
[#170]: https://github.com/rackt/history/pull/170
[#189]: https://github.com/rackt/history/pull/189
[v1.17.0]: https://github.com/mjackson/history/compare/v1.16.0...v1.17.0
[#170]: https://github.com/mjackson/history/pull/170
[#189]: https://github.com/mjackson/history/pull/189
## [v1.16.0]
> Dec 10, 2015
- **Bugfix:** Silence all warnings that were introduced since 1.13 (see [rackt/react-router#2682])
- **Bugfix:** Silence all warnings that were introduced since 1.13 (see [mjackson/react-router#2682])
- **Deprecation:** Deprecate the `createLocation` method in the top-level exports
- **Deprecation:** Deprecate the `state` arg to `history.createLocation`
[v1.16.0]: https://github.com/rackt/history/compare/v1.15.0...v1.16.0
[rackt/react-router#2682]: https://github.com/rackt/react-router/issues/2682
[v1.16.0]: https://github.com/mjackson/history/compare/v1.15.0...v1.16.0
[mjackson/react-router#2682]: https://github.com/mjackson/react-router/issues/2682

@@ -26,4 +92,4 @@ ## [v1.15.0]

[v1.15.0]: https://github.com/rackt/history/compare/v1.14.0...v1.15.0
[#173]: https://github.com/rackt/history/pull/173
[v1.15.0]: https://github.com/mjackson/history/compare/v1.14.0...v1.15.0
[#173]: https://github.com/mjackson/history/pull/173

@@ -40,9 +106,9 @@ ## [v1.14.0]

[v1.14.0]: https://github.com/rackt/history/compare/v1.13.1...v1.14.0
[#121]: https://github.com/rackt/history/issues/121
[#141]: https://github.com/rackt/history/pull/141
[#146]: https://github.com/rackt/history/pull/146
[#152]: https://github.com/rackt/history/pull/152
[#167]: https://github.com/rackt/history/pull/167
[#168]: https://github.com/rackt/history/pull/168
[v1.14.0]: https://github.com/mjackson/history/compare/v1.13.1...v1.14.0
[#121]: https://github.com/mjackson/history/issues/121
[#141]: https://github.com/mjackson/history/pull/141
[#146]: https://github.com/mjackson/history/pull/146
[#152]: https://github.com/mjackson/history/pull/152
[#167]: https://github.com/mjackson/history/pull/167
[#168]: https://github.com/mjackson/history/pull/168

@@ -56,5 +122,5 @@ ## [v1.13.1]

[v1.13.1]: https://github.com/rackt/history/compare/v1.13.0...v1.13.1
[#43]: https://github.com/rackt/history/pull/43
[#139]: https://github.com/rackt/history/pull/139
[v1.13.1]: https://github.com/mjackson/history/compare/v1.13.0...v1.13.1
[#43]: https://github.com/mjackson/history/pull/43
[#139]: https://github.com/mjackson/history/pull/139

@@ -68,5 +134,5 @@ ## [v1.13.0]

[v1.13.0]: https://github.com/rackt/history/compare/v1.12.6...v1.13.0
[#108]: https://github.com/rackt/history/pull/108
[#94]: https://github.com/rackt/history/issues/94
[v1.13.0]: https://github.com/mjackson/history/compare/v1.12.6...v1.13.0
[#108]: https://github.com/mjackson/history/pull/108
[#94]: https://github.com/mjackson/history/issues/94

@@ -79,4 +145,4 @@ ## [v1.12.6]

[v1.12.6]: https://github.com/rackt/history/compare/v1.12.5...v1.12.6
[#95]: https://github.com/rackt/history/issues/95
[v1.12.6]: https://github.com/mjackson/history/compare/v1.12.5...v1.12.6
[#95]: https://github.com/mjackson/history/issues/95

@@ -91,4 +157,4 @@ ## [v1.12.5]

[v1.12.5]: https://github.com/rackt/history/compare/v1.12.4...v1.12.5
[#93]: https://github.com/rackt/history/issues/93
[v1.12.5]: https://github.com/mjackson/history/compare/v1.12.4...v1.12.5
[#93]: https://github.com/mjackson/history/issues/93

@@ -100,4 +166,4 @@ ## [v1.12.4]

[v1.12.4]: https://github.com/rackt/history/compare/v1.12.3...v1.12.4
[#62]: https://github.com/rackt/history/issues/62
[v1.12.4]: https://github.com/mjackson/history/compare/v1.12.3...v1.12.4
[#62]: https://github.com/mjackson/history/issues/62

@@ -110,5 +176,5 @@ ## [v1.12.3]

[v1.12.3]: https://github.com/rackt/history/compare/v1.12.2...v1.12.3
[#71]: https://github.com/rackt/history/issues/71
[#42]: https://github.com/rackt/history/issues/42
[v1.12.3]: https://github.com/mjackson/history/compare/v1.12.2...v1.12.3
[#71]: https://github.com/mjackson/history/issues/71
[#42]: https://github.com/mjackson/history/issues/42

@@ -120,4 +186,4 @@ ## [v1.12.2]

[v1.12.2]: https://github.com/rackt/history/compare/v1.12.1...v1.12.2
[#51-comments]: https://github.com/rackt/history/pull/51#issuecomment-143189672
[v1.12.2]: https://github.com/mjackson/history/compare/v1.12.1...v1.12.2
[#51-comments]: https://github.com/mjackson/history/pull/51#issuecomment-143189672

@@ -130,3 +196,3 @@ ## [v1.12.1]

[v1.12.1]: https://github.com/rackt/history/compare/v1.12.0...v1.12.1
[v1.12.1]: https://github.com/mjackson/history/compare/v1.12.0...v1.12.1

@@ -139,3 +205,3 @@ ## [v1.12.0]

[v1.12.0]: https://github.com/rackt/history/compare/v1.11.1...v1.12.0
[v1.12.0]: https://github.com/mjackson/history/compare/v1.11.1...v1.12.0

@@ -148,4 +214,4 @@ ## [v1.11.1]

[v1.11.1]: https://github.com/rackt/history/compare/v1.11.0...v1.11.1
[#68]: https://github.com/rackt/history/issues/68
[v1.11.1]: https://github.com/mjackson/history/compare/v1.11.0...v1.11.1
[#68]: https://github.com/mjackson/history/issues/68

@@ -162,2 +228,2 @@ ## [v1.11.0]

[v1.11.0]: https://github.com/rackt/history/compare/v1.10.2...v1.11.0
[v1.11.0]: https://github.com/mjackson/history/compare/v1.10.2...v1.11.0
"use strict";
var _slice = Array.prototype.slice;
export { loopAsync };
function loopAsync(turns, work, callback) {
var currentTurn = 0;
var isDone = false;
var currentTurn = 0,
isDone = false;
var sync = false,
hasNext = false,
doneArgs = undefined;
function done() {
isDone = true;
if (sync) {
// Iterate instead of recursing if possible.
doneArgs = [].concat(_slice.call(arguments));
return;
}
callback.apply(this, arguments);

@@ -15,9 +25,31 @@ }

function next() {
if (isDone) return;
if (isDone) {
return;
}
if (currentTurn < turns) {
hasNext = true;
if (sync) {
// Iterate instead of recursing if possible.
return;
}
sync = true;
while (!isDone && currentTurn < turns && hasNext) {
hasNext = false;
work.call(this, currentTurn++, next, done);
} else {
done.apply(this, arguments);
}
sync = false;
if (isDone) {
// This means the loop finished synchronously.
callback.apply(this, doneArgs);
return;
}
if (currentTurn >= turns && hasNext) {
isDone = true;
callback();
}
}

@@ -24,0 +56,0 @@

@@ -7,2 +7,3 @@ 'use strict';

import { PUSH, POP } from './Actions';
import { parsePath } from './PathUtils';
import { canUseDOM } from './ExecutionEnvironment';

@@ -12,3 +13,2 @@ import { addEventListener, removeEventListener, getWindowPath, supportsHistory } from './DOMUtils';

import createDOMHistory from './createDOMHistory';
import parsePath from './parsePath';

@@ -48,3 +48,3 @@ /**

if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);
if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);
}

@@ -51,0 +51,0 @@

@@ -8,2 +8,3 @@ 'use strict';

import { PUSH, POP } from './Actions';
import { parsePath } from './PathUtils';
import { canUseDOM } from './ExecutionEnvironment';

@@ -13,3 +14,2 @@ import { addEventListener, removeEventListener, getHashPath, replaceHashPath, supportsGoWithoutReloadUsingHash } from './DOMUtils';

import createDOMHistory from './createDOMHistory';
import parsePath from './parsePath';

@@ -16,0 +16,0 @@ function isAbsolutePath(path) {

@@ -1,2 +0,1 @@

//import warning from 'warning'
'use strict';

@@ -6,3 +5,5 @@

import warning from 'warning';
import deepEqual from 'deep-equal';
import { parsePath } from './PathUtils';
import { loopAsync } from './AsyncUtils';

@@ -12,3 +13,2 @@ import { PUSH, REPLACE, POP } from './Actions';

import runTransitionHook from './runTransitionHook';
import parsePath from './parsePath';
import deprecate from './deprecate';

@@ -34,4 +34,4 @@

var go = options.go;
var getUserConfirmation = options.getUserConfirmation;
var keyLength = options.keyLength;
var getUserConfirmation = options.getUserConfirmation;

@@ -136,3 +136,3 @@ if (typeof keyLength !== 'number') keyLength = DefaultKeyLength;

if (nextPath === prevPath) nextLocation.action = REPLACE;
if (nextPath === prevPath && deepEqual(location.state, nextLocation.state)) nextLocation.action = REPLACE;
}

@@ -194,7 +194,3 @@

if (typeof action === 'object') {
//warning(
// false,
// 'The state (2nd) argument to history.createLocation is deprecated; use a ' +
// 'location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? warning(false, 'The state (2nd) argument to history.createLocation is deprecated; use a ' + 'location descriptor instead') : undefined;

@@ -201,0 +197,0 @@ if (typeof location === 'string') location = parsePath(location);

@@ -1,2 +0,1 @@

//import warning from 'warning'
'use strict';

@@ -6,4 +5,5 @@

import warning from 'warning';
import { POP } from './Actions';
import parsePath from './parsePath';
import { parsePath } from './PathUtils';

@@ -20,7 +20,3 @@ function createLocation() {

if (typeof action === 'object') {
//warning(
// false,
// 'The state (2nd) argument to createLocation is deprecated; use a ' +
// 'location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? warning(false, 'The state (2nd) argument to createLocation is deprecated; use a ' + 'location descriptor instead') : undefined;

@@ -27,0 +23,0 @@ location = _extends({}, location, { state: action });

@@ -7,5 +7,5 @@ 'use strict';

import invariant from 'invariant';
import { parsePath } from './PathUtils';
import { PUSH, REPLACE, POP } from './Actions';
import createHistory from './createHistory';
import parsePath from './parsePath';

@@ -75,3 +75,2 @@ function createStateStorage(entries) {

var entry = entries[current];
var key = entry.key;
var basename = entry.basename;

@@ -83,8 +82,10 @@ var pathname = entry.pathname;

var state = undefined;
if (key) {
var key = undefined,
state = undefined;
if (entry.key) {
key = entry.key;
state = readState(key);
} else {
key = history.createKey();
state = null;
key = history.createKey();
entry.key = key;

@@ -91,0 +92,0 @@ }

@@ -1,13 +0,12 @@

//import warning from 'warning'
'use strict';
"use strict";
import warning from 'warning';
function deprecate(fn) {
return fn;
//return function () {
// warning(false, '[history] ' + message)
// return fn.apply(this, arguments)
//}
function deprecate(fn, message) {
return function () {
process.env.NODE_ENV !== 'production' ? warning(false, '[history] ' + message) : undefined;
return fn.apply(this, arguments);
};
}
export default deprecate;

@@ -9,3 +9,4 @@ /*eslint-disable no-empty */

var KeyPrefix = '@@History/';
var QuotaExceededError = 'QuotaExceededError';
var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR'];
var SecurityError = 'SecurityError';

@@ -19,3 +20,7 @@

try {
window.sessionStorage.setItem(createKey(key), JSON.stringify(state));
if (state == null) {
window.sessionStorage.removeItem(createKey(key));
} else {
window.sessionStorage.setItem(createKey(key), JSON.stringify(state));
}
} catch (error) {

@@ -30,3 +35,3 @@ if (error.name === SecurityError) {

if (error.name === QuotaExceededError && window.sessionStorage.length === 0) {
if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) {
// Safari "private mode" throws QuotaExceededError.

@@ -33,0 +38,0 @@ process.env.NODE_ENV !== 'production' ? warning(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined;

@@ -64,7 +64,2 @@ 'use strict';

}
// FIXME: Work around our browser history not working correctly on Chrome
// iOS: https://github.com/rackt/react-router/issues/2565
if (ua.indexOf('CriOS') !== -1) {
return false;
}
return window.history && 'pushState' in window.history;

@@ -71,0 +66,0 @@ }

@@ -5,8 +5,6 @@ 'use strict';

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
import warning from 'warning';
import { canUseDOM } from './ExecutionEnvironment';
import { parsePath } from './PathUtils';
import runTransitionHook from './runTransitionHook';
import extractPath from './extractPath';
import parsePath from './parsePath';
import deprecate from './deprecate';

@@ -17,17 +15,33 @@

var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var history = createHistory(options);
var basename = options.basename;
var historyOptions = _objectWithoutProperties(options, ['basename']);
var checkedBaseHref = false;
var history = createHistory(historyOptions);
function checkBaseHref() {
if (checkedBaseHref) {
return;
}
// Automatically use the value of <base href> in HTML
// documents as basename if it's not explicitly given.
if (basename == null && canUseDOM) {
var base = document.getElementsByTagName('base')[0];
// Automatically use the value of <base href> in HTML
// documents as basename if it's not explicitly given.
if (basename == null && canUseDOM) {
var base = document.getElementsByTagName('base')[0];
var baseHref = base && base.getAttribute('href');
if (base) basename = extractPath(base.href);
if (baseHref != null) {
basename = baseHref;
process.env.NODE_ENV !== 'production' ? warning(false, 'Automatically setting basename using <base href> is deprecated and will ' + 'be removed in the next major release. The semantics of <base href> are ' + 'subtly different from basename. Please pass the basename explicitly in ' + 'the options to createHistory') : undefined;
}
}
checkedBaseHref = true;
}
function addBasename(location) {
checkBaseHref();
if (basename && location.basename == null) {

@@ -48,2 +62,4 @@ if (location.pathname.indexOf(basename) === 0) {

function prependBasename(location) {
checkBaseHref();
if (!basename) return location;

@@ -93,4 +109,8 @@

function createLocation() {
return addBasename(history.createLocation.apply(history, arguments));
function createLocation(location) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));
}

@@ -97,0 +117,0 @@

@@ -5,8 +5,6 @@ 'use strict';

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
import warning from 'warning';
import { parse, stringify } from 'query-string';
import runTransitionHook from './runTransitionHook';
import parsePath from './parsePath';
import { parsePath } from './PathUtils';
import deprecate from './deprecate';

@@ -24,3 +22,3 @@

for (var p in object) {
if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true;
if (Object.prototype.hasOwnProperty.call(object, p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true;
}return false;

@@ -36,9 +34,8 @@ }

var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var history = createHistory(options);
var stringifyQuery = options.stringifyQuery;
var parseQueryString = options.parseQueryString;
var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);
var history = createHistory(historyOptions);
if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;

@@ -65,4 +62,7 @@

var queryString = undefined;
if (!query || (queryString = stringifyQuery(query)) === '') return location;
var searchBaseSpec = location[SEARCH_BASE_KEY];
var queryString = query ? stringifyQuery(query) : '';
if (!searchBaseSpec && !queryString) {
return location;
}

@@ -73,3 +73,2 @@ process.env.NODE_ENV !== 'production' ? warning(stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;

var searchBaseSpec = location[SEARCH_BASE_KEY];
var searchBase = undefined;

@@ -82,3 +81,6 @@ if (searchBaseSpec && location.search === searchBaseSpec.search) {

var search = searchBase + (searchBase ? '&' : '?') + queryString;
var search = searchBase;
if (queryString) {
search += (search ? '&' : '?') + queryString;
}

@@ -113,6 +115,4 @@ return _extends({}, location, (_extends2 = {

function createPath(location, query) {
//warning(
// !query,
// 'the query argument to createPath is deprecated; use a location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? warning(!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;
return history.createPath(appendQuery(location, query || location.query));

@@ -122,11 +122,17 @@ }

function createHref(location, query) {
//warning(
// !query,
// 'the query argument to createHref is deprecated; use a location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? warning(!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;
return history.createHref(appendQuery(location, query || location.query));
}
function createLocation() {
return addQuery(history.createLocation.apply(history, arguments));
function createLocation(location) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));
if (location.query) {
fullLocation.query = location.query;
}
return addQuery(fullLocation);
}

@@ -133,0 +139,0 @@

"use strict";
exports.__esModule = true;
var _slice = Array.prototype.slice;
exports.loopAsync = loopAsync;
function loopAsync(turns, work, callback) {
var currentTurn = 0;
var isDone = false;
var currentTurn = 0,
isDone = false;
var sync = false,
hasNext = false,
doneArgs = undefined;
function done() {
isDone = true;
if (sync) {
// Iterate instead of recursing if possible.
doneArgs = [].concat(_slice.call(arguments));
return;
}
callback.apply(this, arguments);

@@ -16,9 +26,31 @@ }

function next() {
if (isDone) return;
if (isDone) {
return;
}
if (currentTurn < turns) {
hasNext = true;
if (sync) {
// Iterate instead of recursing if possible.
return;
}
sync = true;
while (!isDone && currentTurn < turns && hasNext) {
hasNext = false;
work.call(this, currentTurn++, next, done);
} else {
done.apply(this, arguments);
}
sync = false;
if (isDone) {
// This means the loop finished synchronously.
callback.apply(this, doneArgs);
return;
}
if (currentTurn >= turns && hasNext) {
isDone = true;
callback();
}
}

@@ -25,0 +57,0 @@

@@ -15,2 +15,4 @@ 'use strict';

var _PathUtils = require('./PathUtils');
var _ExecutionEnvironment = require('./ExecutionEnvironment');

@@ -26,6 +28,2 @@

var _parsePath = require('./parsePath');
var _parsePath2 = _interopRequireDefault(_parsePath);
/**

@@ -64,6 +62,6 @@ * Creates and returns a history object that uses HTML5's history API

if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);
if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);
}
var location = _parsePath2['default'](path);
var location = _PathUtils.parsePath(path);

@@ -70,0 +68,0 @@ return history.createLocation(_extends({}, location, { state: state }), undefined, key);

@@ -19,2 +19,4 @@ 'use strict';

var _PathUtils = require('./PathUtils');
var _ExecutionEnvironment = require('./ExecutionEnvironment');

@@ -30,6 +32,2 @@

var _parsePath = require('./parsePath');
var _parsePath2 = _interopRequireDefault(_parsePath);
function isAbsolutePath(path) {

@@ -93,3 +91,3 @@ return typeof path === 'string' && path.charAt(0) === '/';

var location = _parsePath2['default'](path);
var location = _PathUtils.parsePath(path);

@@ -96,0 +94,0 @@ return history.createLocation(_extends({}, location, { state: state }), undefined, key);

@@ -1,2 +0,1 @@

//import warning from 'warning'
'use strict';

@@ -10,2 +9,6 @@

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _deepEqual = require('deep-equal');

@@ -15,2 +18,4 @@

var _PathUtils = require('./PathUtils');
var _AsyncUtils = require('./AsyncUtils');

@@ -28,6 +33,2 @@

var _parsePath = require('./parsePath');
var _parsePath2 = _interopRequireDefault(_parsePath);
var _deprecate = require('./deprecate');

@@ -55,4 +56,4 @@

var go = options.go;
var getUserConfirmation = options.getUserConfirmation;
var keyLength = options.keyLength;
var getUserConfirmation = options.getUserConfirmation;

@@ -157,3 +158,3 @@ if (typeof keyLength !== 'number') keyLength = DefaultKeyLength;

if (nextPath === prevPath) nextLocation.action = _Actions.REPLACE;
if (nextPath === prevPath && _deepEqual2['default'](location.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE;
}

@@ -215,9 +216,5 @@

if (typeof action === 'object') {
//warning(
// false,
// 'The state (2nd) argument to history.createLocation is deprecated; use a ' +
// 'location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'The state (2nd) argument to history.createLocation is deprecated; use a ' + 'location descriptor instead') : undefined;
if (typeof location === 'string') location = _parsePath2['default'](location);
if (typeof location === 'string') location = _PathUtils.parsePath(location);

@@ -262,3 +259,3 @@ location = _extends({}, location, { state: action });

function pushState(state, path) {
if (typeof path === 'string') path = _parsePath2['default'](path);
if (typeof path === 'string') path = _PathUtils.parsePath(path);

@@ -270,3 +267,3 @@ push(_extends({ state: state }, path));

function replaceState(state, path) {
if (typeof path === 'string') path = _parsePath2['default'](path);
if (typeof path === 'string') path = _PathUtils.parsePath(path);

@@ -273,0 +270,0 @@ replace(_extends({ state: state }, path));

@@ -1,2 +0,1 @@

//import warning from 'warning'
'use strict';

@@ -10,8 +9,10 @@

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _Actions = require('./Actions');
var _parsePath = require('./parsePath');
var _PathUtils = require('./PathUtils');
var _parsePath2 = _interopRequireDefault(_parsePath);
function createLocation() {

@@ -24,10 +25,6 @@ var location = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0];

if (typeof location === 'string') location = _parsePath2['default'](location);
if (typeof location === 'string') location = _PathUtils.parsePath(location);
if (typeof action === 'object') {
//warning(
// false,
// 'The state (2nd) argument to createLocation is deprecated; use a ' +
// 'location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'The state (2nd) argument to createLocation is deprecated; use a ' + 'location descriptor instead') : undefined;

@@ -34,0 +31,0 @@ location = _extends({}, location, { state: action });

@@ -17,2 +17,4 @@ 'use strict';

var _PathUtils = require('./PathUtils');
var _Actions = require('./Actions');

@@ -24,6 +26,2 @@

var _parsePath = require('./parsePath');
var _parsePath2 = _interopRequireDefault(_parsePath);
function createStateStorage(entries) {

@@ -92,3 +90,2 @@ return entries.filter(function (entry) {

var entry = entries[current];
var key = entry.key;
var basename = entry.basename;

@@ -100,12 +97,14 @@ var pathname = entry.pathname;

var state = undefined;
if (key) {
var key = undefined,
state = undefined;
if (entry.key) {
key = entry.key;
state = readState(key);
} else {
key = history.createKey();
state = null;
key = history.createKey();
entry.key = key;
}
var location = _parsePath2['default'](path);
var location = _PathUtils.parsePath(path);

@@ -112,0 +111,0 @@ return history.createLocation(_extends({}, location, { state: state }), undefined, key);

@@ -1,15 +0,19 @@

//import warning from 'warning'
'use strict';
"use strict";
exports.__esModule = true;
exports.__esModule = true;
function deprecate(fn) {
return fn;
//return function () {
// warning(false, '[history] ' + message)
// return fn.apply(this, arguments)
//}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
function deprecate(fn, message) {
return function () {
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, '[history] ' + message) : undefined;
return fn.apply(this, arguments);
};
}
exports["default"] = deprecate;
module.exports = exports["default"];
exports['default'] = deprecate;
module.exports = exports['default'];

@@ -15,3 +15,4 @@ /*eslint-disable no-empty */

var KeyPrefix = '@@History/';
var QuotaExceededError = 'QuotaExceededError';
var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR'];
var SecurityError = 'SecurityError';

@@ -25,3 +26,7 @@

try {
window.sessionStorage.setItem(createKey(key), JSON.stringify(state));
if (state == null) {
window.sessionStorage.removeItem(createKey(key));
} else {
window.sessionStorage.setItem(createKey(key), JSON.stringify(state));
}
} catch (error) {

@@ -36,3 +41,3 @@ if (error.name === SecurityError) {

if (error.name === QuotaExceededError && window.sessionStorage.length === 0) {
if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) {
// Safari "private mode" throws QuotaExceededError.

@@ -39,0 +44,0 @@ process.env.NODE_ENV !== 'production' ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined;

@@ -65,7 +65,2 @@ 'use strict';

}
// FIXME: Work around our browser history not working correctly on Chrome
// iOS: https://github.com/rackt/react-router/issues/2565
if (ua.indexOf('CriOS') !== -1) {
return false;
}
return window.history && 'pushState' in window.history;

@@ -72,0 +67,0 @@ }

@@ -9,6 +9,10 @@ 'use strict';

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _ExecutionEnvironment = require('./ExecutionEnvironment');
var _PathUtils = require('./PathUtils');
var _runTransitionHook = require('./runTransitionHook');

@@ -18,10 +22,2 @@

var _extractPath = require('./extractPath');
var _extractPath2 = _interopRequireDefault(_extractPath);
var _parsePath = require('./parsePath');
var _parsePath2 = _interopRequireDefault(_parsePath);
var _deprecate = require('./deprecate');

@@ -34,17 +30,33 @@

var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var history = createHistory(options);
var basename = options.basename;
var historyOptions = _objectWithoutProperties(options, ['basename']);
var checkedBaseHref = false;
var history = createHistory(historyOptions);
function checkBaseHref() {
if (checkedBaseHref) {
return;
}
// Automatically use the value of <base href> in HTML
// documents as basename if it's not explicitly given.
if (basename == null && _ExecutionEnvironment.canUseDOM) {
var base = document.getElementsByTagName('base')[0];
// Automatically use the value of <base href> in HTML
// documents as basename if it's not explicitly given.
if (basename == null && _ExecutionEnvironment.canUseDOM) {
var base = document.getElementsByTagName('base')[0];
var baseHref = base && base.getAttribute('href');
if (base) basename = _extractPath2['default'](base.href);
if (baseHref != null) {
basename = baseHref;
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'Automatically setting basename using <base href> is deprecated and will ' + 'be removed in the next major release. The semantics of <base href> are ' + 'subtly different from basename. Please pass the basename explicitly in ' + 'the options to createHistory') : undefined;
}
}
checkedBaseHref = true;
}
function addBasename(location) {
checkBaseHref();
if (basename && location.basename == null) {

@@ -65,5 +77,7 @@ if (location.pathname.indexOf(basename) === 0) {

function prependBasename(location) {
checkBaseHref();
if (!basename) return location;
if (typeof location === 'string') location = _parsePath2['default'](location);
if (typeof location === 'string') location = _PathUtils.parsePath(location);

@@ -110,4 +124,8 @@ var pname = location.pathname;

function createLocation() {
return addBasename(history.createLocation.apply(history, arguments));
function createLocation(location) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));
}

@@ -117,3 +135,3 @@

function pushState(state, path) {
if (typeof path === 'string') path = _parsePath2['default'](path);
if (typeof path === 'string') path = _PathUtils.parsePath(path);

@@ -125,3 +143,3 @@ push(_extends({ state: state }, path));

function replaceState(state, path) {
if (typeof path === 'string') path = _parsePath2['default'](path);
if (typeof path === 'string') path = _PathUtils.parsePath(path);

@@ -128,0 +146,0 @@ replace(_extends({ state: state }, path));

@@ -9,4 +9,2 @@ 'use strict';

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var _warning = require('warning');

@@ -22,6 +20,4 @@

var _parsePath = require('./parsePath');
var _PathUtils = require('./PathUtils');
var _parsePath2 = _interopRequireDefault(_parsePath);
var _deprecate = require('./deprecate');

@@ -41,3 +37,3 @@

for (var p in object) {
if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true;
if (Object.prototype.hasOwnProperty.call(object, p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true;
}return false;

@@ -53,9 +49,8 @@ }

var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var history = createHistory(options);
var stringifyQuery = options.stringifyQuery;
var parseQueryString = options.parseQueryString;
var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']);
var history = createHistory(historyOptions);
if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;

@@ -82,10 +77,12 @@

var queryString = undefined;
if (!query || (queryString = stringifyQuery(query)) === '') return location;
var searchBaseSpec = location[SEARCH_BASE_KEY];
var queryString = query ? stringifyQuery(query) : '';
if (!searchBaseSpec && !queryString) {
return location;
}
process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;
if (typeof location === 'string') location = _parsePath2['default'](location);
if (typeof location === 'string') location = _PathUtils.parsePath(location);
var searchBaseSpec = location[SEARCH_BASE_KEY];
var searchBase = undefined;

@@ -98,3 +95,6 @@ if (searchBaseSpec && location.search === searchBaseSpec.search) {

var search = searchBase + (searchBase ? '&' : '?') + queryString;
var search = searchBase;
if (queryString) {
search += (search ? '&' : '?') + queryString;
}

@@ -129,6 +129,4 @@ return _extends({}, location, (_extends2 = {

function createPath(location, query) {
//warning(
// !query,
// 'the query argument to createPath is deprecated; use a location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;
return history.createPath(appendQuery(location, query || location.query));

@@ -138,11 +136,17 @@ }

function createHref(location, query) {
//warning(
// !query,
// 'the query argument to createHref is deprecated; use a location descriptor instead'
//)
process.env.NODE_ENV !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;
return history.createHref(appendQuery(location, query || location.query));
}
function createLocation() {
return addQuery(history.createLocation.apply(history, arguments));
function createLocation(location) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));
if (location.query) {
fullLocation.query = location.query;
}
return addQuery(fullLocation);
}

@@ -152,3 +156,3 @@

function pushState(state, path, query) {
if (typeof path === 'string') path = _parsePath2['default'](path);
if (typeof path === 'string') path = _PathUtils.parsePath(path);

@@ -160,3 +164,3 @@ push(_extends({ state: state }, path, { query: query }));

function replaceState(state, path, query) {
if (typeof path === 'string') path = _parsePath2['default'](path);
if (typeof path === 'string') path = _PathUtils.parsePath(path);

@@ -163,0 +167,0 @@ replace(_extends({ state: state }, path, { query: query }));

The MIT License (MIT)
Copyright (c) 2015 Michael Jackson
Copyright (c) 2015-2016 Michael Jackson

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

@@ -9,7 +9,11 @@ {

"_from": "history@*",
"_id": "history@1.17.0",
"_id": "history@2.1.1",
"_inCache": true,
"_installable": true,
"_location": "/history",
"_nodeVersion": "5.0.0",
"_nodeVersion": "5.9.1",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/history-2.1.1.tgz_1461769275780_0.1540935467928648"
},
"_npmUser": {

@@ -19,3 +23,3 @@ "email": "mjijackson@gmail.com",

},
"_npmVersion": "3.4.1",
"_npmVersion": "3.7.3",
"_phantomChildren": {},

@@ -33,4 +37,4 @@ "_requested": {

],
"_resolved": "https://registry.npmjs.org/history/-/history-1.17.0.tgz",
"_shasum": "c5483caa5a1d1fea00a1a7d8d19b874016711d29",
"_resolved": "https://registry.npmjs.org/history/-/history-2.1.1.tgz",
"_shasum": "7490ff80c9d42e5b27f46898fcfc7311c6f685e3",
"_shrinkwrap": null,

@@ -43,3 +47,3 @@ "_spec": "history@*",

"bugs": {
"url": "https://github.com/rackt/history/issues"
"url": "https://github.com/mjackson/history/issues"
},

@@ -52,21 +56,18 @@ "dependencies": {

},
"description": "A minimal, functional history implementation for JavaScript",
"description": "Manage browser history with JavaScript",
"devDependencies": {
"assert": "1.3.0",
"babel": "^5.4.7",
"babel-core": "^5.4.7",
"babel-eslint": "^3.1.23",
"babel-loader": "^5.0.0",
"babel": "^5.8.35",
"babel-core": "^5.8.35",
"babel-eslint": "^4.1.8",
"babel-loader": "^5.4.0",
"babel-plugin-dev-expression": "^0.1.0",
"eslint": "1.4.1",
"eslint-config-rackt": "1.0.0",
"eslint-plugin-react": "3.3.2",
"eslint": "^1.10.3",
"eslint-config-rackt": "^1.1.1",
"eslint-plugin-react": "^3.16.1",
"expect": "^1.12.0",
"gzip-size": "^3.0.0",
"isparta-loader": "^1.0.0",
"karma": "^0.13.3",
"karma-browserstack-launcher": "^0.1.3",
"karma-chrome-launcher": "^0.2.0",
"karma-coverage": "^0.5.3",
"karma-coveralls": "^1.1.2",
"karma-mocha": "^0.2.0",

@@ -77,3 +78,4 @@ "karma-mocha-reporter": "^1.0.4",

"mocha": "^2.0.1",
"pretty-bytes": "^2.0.1",
"pretty-bytes": "^3.0.1",
"readline-sync": "^1.4.1",
"rimraf": "^2.4.2",

@@ -85,15 +87,14 @@ "webpack": "^1.4.13",

"dist": {
"shasum": "c5483caa5a1d1fea00a1a7d8d19b874016711d29",
"tarball": "http://registry.npmjs.org/history/-/history-1.17.0.tgz"
"shasum": "7490ff80c9d42e5b27f46898fcfc7311c6f685e3",
"tarball": "https://registry.npmjs.org/history/-/history-2.1.1.tgz"
},
"files": [
"*.md",
"docs",
"es6",
"lib",
"npm-scripts",
"modules/*.js",
"umd"
],
"gitHead": "daf0bd52b8f3bc862c58faf4c7d5a40c86afed9e",
"homepage": "https://github.com/rackt/history#readme",
"gitHead": "909088007d64b88823341d485347c24deca4e1f0",
"homepage": "https://github.com/mjackson/history#readme",
"jsnext:main": "es6/index",
"keywords": [

@@ -107,4 +108,4 @@ "history",

{
"name": "mjackson",
"email": "mjijackson@gmail.com"
"email": "mjijackson@gmail.com",
"name": "mjackson"
}

@@ -117,6 +118,6 @@ ],

"type": "git",
"url": "git+https://github.com/rackt/history.git"
"url": "git+https://github.com/mjackson/history.git"
},
"scripts": {
"build": "npm run build-cjs && npm run build-es6",
"build": "node ./scripts/build.js",
"build-cjs": "rimraf lib && babel ./modules --stage 0 --loose all --plugins dev-expression -d lib --ignore '__tests__'",

@@ -127,3 +128,4 @@ "build-es6": "rimraf es6 && babel ./modules --stage 0 --loose all --plugins dev-expression -d es6 --blacklist=es6.modules --ignore '__tests__'",

"lint": "eslint modules",
"postinstall": "node ./npm-scripts/postinstall.js",
"prepublish": "npm run build",
"release": "node ./scripts/release.js",
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js",

@@ -136,3 +138,3 @@ "test": "npm run lint && karma start"

],
"version": "1.17.0"
"version": "2.1.1"
}
# history [![Travis][build-badge]][build] [![npm package][npm-badge]][npm]
[build-badge]: https://img.shields.io/travis/mjackson/history/master.svg?style=flat-square
[build]: https://travis-ci.org/mjackson/history
[npm-badge]: https://img.shields.io/npm/v/history.svg?style=flat-square
[npm]: https://www.npmjs.org/package/history
[`history`](https://www.npmjs.com/package/history) is a JavaScript library that lets you easily manage session history in browsers, testing environments, and (soon, via [React Native](https://facebook.github.io/react-native/)) native devices. `history` abstracts away the differences in these different platforms and provides a minimal API that lets you manage the history stack, navigate, confirm navigation, and persist state between sessions. `history` is library-agnostic and may easily be included in any JavaScript project.
[![Coveralls][coveralls-badge]][coveralls]
[![Discord][discord-badge]][discord]
## Docs & Help

@@ -20,3 +23,3 @@

$ npm install history
$ npm install --save history

@@ -48,7 +51,7 @@ Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:

let history = createHistory()
const history = createHistory()
// Listen for changes to the current location. The
// listener is called once immediately.
let unlisten = history.listen(location => {
const unlisten = history.listen(location => {
console.log(location.pathname)

@@ -67,3 +70,3 @@ })

You can find many more examples [in the documentation](https://github.com/rackt/history/tree/master/docs)!
You can find many more examples [in the documentation](https://github.com/mjackson/history/tree/master/docs)!

@@ -75,13 +78,1 @@ ## Thanks

Also, thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to run our build in real browsers.
[build-badge]: https://img.shields.io/travis/rackt/history/master.svg?style=flat-square
[build]: https://travis-ci.org/rackt/history
[npm-badge]: https://img.shields.io/npm/v/history.svg?style=flat-square
[npm]: https://www.npmjs.org/package/history
[coveralls-badge]: https://img.shields.io/coveralls/rackt/history/master.svg?style=flat-square
[coveralls]: https://coveralls.io/github/rackt/history
[discord-badge]: https://img.shields.io/badge/Discord-join%20chat%20%E2%86%92-738bd7.svg?style=flat-square
[discord]: https://discord.gg/0ZcbPKXt5bYaNQ46
{
"name": "biometry",
"description": "Biometry user interface",
"version": "0.3.0",
"version": "0.4.0",
"keywords": [

@@ -16,13 +16,15 @@ "biometrics"

"dependencies": {
"history": "*",
"moment": "*",
"react": "*",
"react-dom": "*",
"react-redux": "*",
"redux": "*"
"history": "2.1.1",
"moment": "2.13.0",
"react": "15.0.2",
"react-dom": "15.0.2",
"react-redux": "4.4.5",
"redux": "3.5.2",
"tarry": "0.3.4"
},
"devDependencies": {
"babel-core": "^5.0.0",
"babel-loader": "^5.0.0",
"babel-plugin-react-transform": "^1.1.0",
"babel-core": "*",
"babel-loader": "*",
"babel-plugin-react-transform": "*",
"babel-preset-es2015": "*",
"css-loader": "*",

@@ -33,14 +35,9 @@ "declarations": "*",

"less-loader": "*",
"react-hot-loader": "*",
"react-transform-catch-errors": "*",
"react-transform-hmr": "*",
"redux-devtools": "*",
"style-loader": "*",
"ts-loader": "*",
"typescript": "*",
"webpack": "*",
"webpack-dev-middleware": "*",
"webpack-dev-server": "*",
"webpack-hot-middleware": "*"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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