New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@esm/cookie-consent-banner

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esm/cookie-consent-banner - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

dist-src/build.js

57

dist-node/index.js

@@ -5,20 +5,47 @@ 'use strict';

/*
*
* 🐹 Oh hi there! Welcome to your brand new pika package!
*
* If this is your first time, take a second to familiarize yourself with the editor.
* Then, whenever you're ready, delete all of this and start writing!
*
* We can't wait to see what you build!
*
* Yours,
* The Pika Team
*/
// PS: Here's a dumb placeholder function to help you get started:
function main() {
return `<div>Cookie consent banner here.</div>`;
function build(position) {
let modalCss = '';
let innerCss = '';
if (position === 'modal') {
// open the banner as modal
modalCss = `
position: fixed;
left:50%;
`;
innerCss = `
position: relative;
left:-50%;
`;
}
return {
css: {
modal: modalCss,
inner: innerCss
}
};
}
function main(options) {
const {
position
} = options;
const {
text,
buttonText,
buttonCallback
} = options;
const {
css
} = build(position);
return `<div style='${css.modal}'>
<div style='${css.inner}'>
${text}
<button onclick=${buttonCallback}>${buttonText}</button>
</div>
</div>`;
}
exports.main = main;
//# sourceMappingURL=index.js.map

@@ -1,16 +0,12 @@

/*
*
* 🐹 Oh hi there! Welcome to your brand new pika package!
*
* If this is your first time, take a second to familiarize yourself with the editor.
* Then, whenever you're ready, delete all of this and start writing!
*
* We can't wait to see what you build!
*
* Yours,
* The Pika Team
*/
// PS: Here's a dumb placeholder function to help you get started:
export function main() {
return `<div>Cookie consent banner here.</div>`;
import build from './build';
export function main(options) {
const { position } = options;
const { text, buttonText, buttonCallback } = options;
const { css } = build(position);
return `<div style='${css.modal}'>
<div style='${css.inner}'>
${text}
<button onclick=${buttonCallback}>${buttonText}</button>
</div>
</div>`;
}

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

declare function main(): string;
declare function main(options: any): string;
export { main };

@@ -1,19 +0,36 @@

/*
*
* 🐹 Oh hi there! Welcome to your brand new pika package!
*
* If this is your first time, take a second to familiarize yourself with the editor.
* Then, whenever you're ready, delete all of this and start writing!
*
* We can't wait to see what you build!
*
* Yours,
* The Pika Team
*/
// PS: Here's a dumb placeholder function to help you get started:
function main() {
return `<div>Cookie consent banner here.</div>`;
function build(position) {
let modalCss = '';
let innerCss = '';
if (position === 'modal') {
// open the banner as modal
modalCss = `
position: fixed;
left:50%;
`;
innerCss = `
position: relative;
left:-50%;
`;
}
return {
css: {
modal: modalCss,
inner: innerCss
}
};
}
function main(options) {
const { position } = options;
const { text, buttonText, buttonCallback } = options;
const { css } = build(position);
return `<div style='${css.modal}'>
<div style='${css.inner}'>
${text}
<button onclick=${buttonCallback}>${buttonText}</button>
</div>
</div>`;
}
export { main };
//# sourceMappingURL=index.js.map
{
"name": "@esm/cookie-consent-banner",
"description": "Web-native library for easy & customisable cookie-banners",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "files": [

# @hwclass/cookie-consent-banner
A new package.
Web-native library for easy & customisable cookie-banners.

Sorry, the diff of this file is not supported yet

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