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

@lrnwebcomponents/anchor-behaviors

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/anchor-behaviors - npm Package Compare versions

Comparing version 3.0.5 to 4.0.0

rollup.config.mjs

11

anchor-behaviors.story.js

@@ -41,7 +41,8 @@ import { storiesOf } from "@storybook/polymer";

// ensure ke-bab case
let kebab = key.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, function (
match
) {
return "-" + match.toLowerCase();
});
let kebab = key.replace(
/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,
function (match) {
return "-" + match.toLowerCase();
}
);
elementDemo += ` ${kebab}="${binding[key]}"`;

@@ -48,0 +49,0 @@ }

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

!function(r){"function"==typeof define&&define.amd?define(r):r()}(function(){"use strict";window.AnchorBehaviors=window.AnchorBehaviors||{},window.AnchorBehaviors.getTarget=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=function(){var r=window.location.hash.substring(1).replace(/^(.+)&?/,"id=$1")||window.location.search.substring(1)||"",e=r?'{"'.concat(decodeURI(r).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"'),'"}'):"{}",o=e&&function(r){try{JSON.parse(r)}catch(r){return!1}return!0}(e)?JSON.parse(e):{};window.AnchorBehaviors.params=o};return window.AnchorBehaviors.target||(window.AnchorBehaviors.params||("complete"===document.readyState&&e(),window.onload=e()),window.AnchorBehaviors.target=document.getElementById(window.AnchorBehaviors.params.id)||document.getElementById("#".concat(window.AnchorBehaviors.params.id))||document.querySelector('[resource="#'.concat(window.AnchorBehaviors.params.id||window.AnchorBehaviors.params.resource,'"]'))||document.querySelector('[resource="'.concat(window.AnchorBehaviors.params.id||window.AnchorBehaviors.params.resource,'"]'))||function(r,e){if(r&&(e.id||e.resource)){var o=r.id?r.id.replace(/#/g,""):null,n=r.resource?r.resource.replace(/#/g,""):null,a=e.id?e.id.replace(/#/g,""):null,i=e.resource?e.resource.replace(/#/g,""):null;if(o&&o===a||o&&o===i||n&&n===a||n&&n===i)return r}}(r,window.AnchorBehaviors.params)||null,window.AnchorBehaviors.target&&window.AnchorBehaviors.target.scrollIntoView()),window.AnchorBehaviors.target}});
!function(r){"function"==typeof define&&define.amd?define(r):r()}((function(){"use strict";
/**
* Copyright 2018 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/window.AnchorBehaviors=window.AnchorBehaviors||{},window.AnchorBehaviors.getTarget=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=function(){var r=window.location.hash.substring(1).replace(/^(.+)&?/,"id=$1")||window.location.search.substring(1)||"",e=r?'{"'.concat(decodeURI(r).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"'),'"}'):"{}",o=e&&function(r){try{JSON.parse(r)}catch(r){return!1}return!0}(e)?JSON.parse(e):{};window.AnchorBehaviors.params=o},o=function(r,e){if(r&&(e.id||e.resource)){var o=r.id?r.id.replace(/#/g,""):null,n=r.resource?r.resource.replace(/#/g,""):null,a=e.id?e.id.replace(/#/g,""):null,i=e.resource?e.resource.replace(/#/g,""):null;if(o&&o===a||o&&o===i||n&&n===a||n&&n===i)return r}};return window.AnchorBehaviors.target||(window.AnchorBehaviors.params||("complete"===document.readyState&&e(),window.onload=e()),window.AnchorBehaviors.target=document.getElementById(window.AnchorBehaviors.params.id)||document.getElementById("#".concat(window.AnchorBehaviors.params.id))||document.querySelector('[resource="#'.concat(window.AnchorBehaviors.params.id||window.AnchorBehaviors.params.resource,'"]'))||document.querySelector('[resource="'.concat(window.AnchorBehaviors.params.id||window.AnchorBehaviors.params.resource,'"]'))||o(r,window.AnchorBehaviors.params)||null,window.AnchorBehaviors.target&&window.AnchorBehaviors.target.scrollIntoView()),window.AnchorBehaviors.target}}));

@@ -20,3 +20,3 @@ {

},
"version": "3.0.5",
"version": "4.0.0",
"description": "handles anchors and params in the url",

@@ -32,9 +32,11 @@ "repository": {

"scripts": {
"test": "wct --configFile ../../wct.conf.json node_modules/@lrnwebcomponents/anchor-behaviors/test/",
"start": "yarn run dev",
"build": "gulp --gulpfile=gulpfile.cjs && rollup -c && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && wca analyze \"**/*.js\" --format vscode --outFile vscode-html-custom-data.json",
"build": "gulp --gulpfile=gulpfile.cjs && node --experimental-json-modules ../../node_modules/.bin/rollup --config && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && wca analyze \"**/*.js\" --format vscode --outFile vscode-html-custom-data.json",
"dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"",
"watch": "gulp dev --gulpfile=gulpfile.cjs",
"serve": "es-dev-server -c ../../es-dev-server.config.js",
"lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs"
"lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs",
"test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs",
"test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --watch",
"test:browsers": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium firefox webkit"
},

@@ -49,9 +51,14 @@ "author": {

"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^3.0.0",
"@lrnwebcomponents/deduping-fix": "^4.0.0",
"@open-wc/testing": "2.5.33",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",
"@polymer/iron-demo-helpers": "3.1.0",
"@web/test-runner": "0.13.5",
"@web/test-runner-commands": "0.4.5",
"@web/test-runner-playwright": "0.8.6",
"@web/test-runner-puppeteer": "0.10.0",
"@webcomponents/webcomponentsjs": "2.5.0",
"concurrently": "5.3.0",
"gulp-babel": "8.0.0",
"lodash": "4.17.19",
"lodash": "^4.17.21",
"polymer-build": "3.1.4",

@@ -70,3 +77,3 @@ "polymer-cli": "1.9.11",

],
"gitHead": "77e096e6b3d188fabdd9ba02481140e8deee03cc"
"gitHead": "e877f54ece91fb0b2f7aba62f9f9fd15060600f2"
}
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