Socket
Socket
Sign inDemoInstall

pathington

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pathington - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

CHANGELOG.md

20

dist/pathington.js

@@ -84,9 +84,8 @@ (function webpackUniversalModuleDefinition(root, factory) {

/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return INVALID_JAVASCRIPT_LEADING_CHARACTER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return QUOTES_REGEXP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return QUOTES_GLOBAL_REGEXP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return WHITE_SPACE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return QUOTES_REGEXP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WHITE_SPACE; });
/**
* @constant {RegExp} DOTTY_WITH_BRACKETS_SYNTAX_REGEXP
*/
var DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = /\w+|"[^"]+"/g;
var DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = /[a-zA-Z0-9_$]+|"[^"]+"|`[^`]+`|'[^']+'/g;

@@ -109,7 +108,2 @@ /**

/**
* @constant {RegExp} QUOTES_GLOBAL_REGEXP
*/
var QUOTES_GLOBAL_REGEXP = new RegExp(('' + QUOTES_REGEXP).slice(1, -1), 'g');
/**
* @constant {RegExp} WHITE_SPACE

@@ -152,3 +146,3 @@ */

if (quote && (quote.length !== 1 || !__WEBPACK_IMPORTED_MODULE_0__constants__["e" /* QUOTES_REGEXP */].test(quote))) {
if (quote && (quote.length !== 1 || !__WEBPACK_IMPORTED_MODULE_0__constants__["d" /* QUOTES_REGEXP */].test(quote))) {
throw new SyntaxError('quote passed is invalid, must be ", `, or \'.');

@@ -177,3 +171,3 @@ }

if (typeof path === 'string') {
return path ? path.replace(__WEBPACK_IMPORTED_MODULE_0__constants__["d" /* QUOTES_GLOBAL_REGEXP */], '"').match(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DOTTY_WITH_BRACKETS_SYNTAX_REGEXP */]).map(__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* getNormalizedParseKey */]) : [];
return path ? ~path.indexOf('.') || ~path.indexOf('[') ? path.match(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DOTTY_WITH_BRACKETS_SYNTAX_REGEXP */]).map(__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* getNormalizedParseKey */]) : [path] : [];
}

@@ -208,3 +202,3 @@

var isQuotedKey = function isQuotedKey(key) {
return __WEBPACK_IMPORTED_MODULE_0__constants__["e" /* QUOTES_REGEXP */].test(key[0]) && key[0] === key[key.length - 1];
return __WEBPACK_IMPORTED_MODULE_0__constants__["d" /* QUOTES_REGEXP */].test(key[0]) && key[0] === key[key.length - 1];
};

@@ -235,3 +229,3 @@

var shouldBeInQuotes = function shouldBeInQuotes(key) {
return __WEBPACK_IMPORTED_MODULE_0__constants__["b" /* INVALID_JAVASCRIPT_CHARACTERS */].test(key) || __WEBPACK_IMPORTED_MODULE_0__constants__["f" /* WHITE_SPACE */].test(key) || key.length > 1 && __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* INVALID_JAVASCRIPT_LEADING_CHARACTER */].test(key[0]);
return __WEBPACK_IMPORTED_MODULE_0__constants__["b" /* INVALID_JAVASCRIPT_CHARACTERS */].test(key) || __WEBPACK_IMPORTED_MODULE_0__constants__["e" /* WHITE_SPACE */].test(key) || key.length > 1 && __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* INVALID_JAVASCRIPT_LEADING_CHARACTER */].test(key[0]);
};

@@ -238,0 +232,0 @@

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

!(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pathington",[],t):"object"==typeof exports?exports.pathington=t():e.pathington=t()})("undefined"!=typeof self?self:this,(function(){return (function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)})([(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/\w+|"[^"]+"/g,o=/[^A-Za-z0-9_$]/,u=/[^A-Za-z_$]/,i=/['|"|`]/,a=new RegExp((""+i).slice(1,-1),"g"),f=/\s/g,c=function(e){return i.test(e[0])&&e[0]===e[e.length-1]},s=function(e){return"number"==typeof e||!isNaN(+e)||c(e)},p=function(e){return o.test(e)||f.test(e)||e.length>1&&u.test(e[0])},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'"';return function(t,n){var r=p(n)?""+e+n+e:n;return s(r)?t+"["+r+"]":t+"."+r}},d=function(e){return c(e)?e.slice(1,-1):isNaN(+e)?e:+e};n.d(t,"create",(function(){return y})),n.d(t,"parse",(function(){return g}));var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'"';if(!Array.isArray(e))throw new ReferenceError("path passed must be an array");if(t&&(1!==t.length||!i.test(t)))throw new SyntaxError("quote passed is invalid, must be \", `, or '.");var n=e.reduce(l(t),"");return"."===n[0]?n.slice(1):n},g=function(e){return Array.isArray(e)?e.map(d):"string"==typeof e?e?e.replace(a,'"').match(r).map(d):[]:[e]}})])}));
!(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pathington",[],t):"object"==typeof exports?exports.pathington=t():e.pathington=t()})("undefined"!=typeof self?self:this,(function(){return (function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)})([(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/[a-zA-Z0-9_$]+|"[^"]+"|`[^`]+`|'[^']+'/g,o=/[^A-Za-z0-9_$]/,u=/[^A-Za-z_$]/,i=/['|"|`]/,f=/\s/g,a=function(e){return i.test(e[0])&&e[0]===e[e.length-1]},s=function(e){return"number"==typeof e||!isNaN(+e)||a(e)},c=function(e){return o.test(e)||f.test(e)||e.length>1&&u.test(e[0])},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'"';return function(t,n){var r=c(n)?""+e+n+e:n;return s(r)?t+"["+r+"]":t+"."+r}},d=function(e){return a(e)?e.slice(1,-1):isNaN(+e)?e:+e};n.d(t,"create",(function(){return l})),n.d(t,"parse",(function(){return y}));var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'"';if(!Array.isArray(e))throw new ReferenceError("path passed must be an array");if(t&&(1!==t.length||!i.test(t)))throw new SyntaxError("quote passed is invalid, must be \", `, or '.");var n=e.reduce(p(t),"");return"."===n[0]?n.slice(1):n},y=function(e){return Array.isArray(e)?e.map(d):"string"==typeof e?e?~e.indexOf(".")||~e.indexOf("[")?e.match(r).map(d):[e]:[]:[e]}})])}));
/**
* @constant {RegExp} DOTTY_WITH_BRACKETS_SYNTAX_REGEXP
*/
export var DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = /\w+|"[^"]+"/g;
export var DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = /[a-zA-Z0-9_$]+|"[^"]+"|`[^`]+`|'[^']+'/g;

@@ -22,9 +22,4 @@ /**

/**
* @constant {RegExp} QUOTES_GLOBAL_REGEXP
*/
export var QUOTES_GLOBAL_REGEXP = new RegExp(('' + QUOTES_REGEXP).slice(1, -1), 'g');
/**
* @constant {RegExp} WHITE_SPACE
*/
export var WHITE_SPACE = /\s/g;
// constants
import { DOTTY_WITH_BRACKETS_SYNTAX_REGEXP, QUOTES_GLOBAL_REGEXP, QUOTES_REGEXP } from './constants';
import { DOTTY_WITH_BRACKETS_SYNTAX_REGEXP, QUOTES_REGEXP } from './constants';

@@ -48,3 +48,3 @@ // utils

if (typeof path === 'string') {
return path ? path.replace(QUOTES_GLOBAL_REGEXP, '"').match(DOTTY_WITH_BRACKETS_SYNTAX_REGEXP).map(getNormalizedParseKey) : [];
return path ? ~path.indexOf('.') || ~path.indexOf('[') ? path.match(DOTTY_WITH_BRACKETS_SYNTAX_REGEXP).map(getNormalizedParseKey) : [path] : [];
}

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

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

'use strict';
"use strict";

@@ -7,3 +7,3 @@ exports.__esModule = true;

*/
var DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = exports.DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = /\w+|"[^"]+"/g;
var DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = exports.DOTTY_WITH_BRACKETS_SYNTAX_REGEXP = /[a-zA-Z0-9_$]+|"[^"]+"|`[^`]+`|'[^']+'/g;

@@ -26,9 +26,4 @@ /**

/**
* @constant {RegExp} QUOTES_GLOBAL_REGEXP
*/
var QUOTES_GLOBAL_REGEXP = exports.QUOTES_GLOBAL_REGEXP = new RegExp(('' + QUOTES_REGEXP).slice(1, -1), 'g');
/**
* @constant {RegExp} WHITE_SPACE
*/
var WHITE_SPACE = exports.WHITE_SPACE = /\s/g;

@@ -55,3 +55,3 @@ 'use strict';

if (typeof path === 'string') {
return path ? path.replace(_constants.QUOTES_GLOBAL_REGEXP, '"').match(_constants.DOTTY_WITH_BRACKETS_SYNTAX_REGEXP).map(_utils.getNormalizedParseKey) : [];
return path ? ~path.indexOf('.') || ~path.indexOf('[') ? path.match(_constants.DOTTY_WITH_BRACKETS_SYNTAX_REGEXP).map(_utils.getNormalizedParseKey) : [path] : [];
}

@@ -58,0 +58,0 @@

@@ -90,3 +90,3 @@ {

},
"version": "1.0.1"
"version": "1.0.2"
}

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