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

react-retailer-logos

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-retailer-logos - npm Package Compare versions

Comparing version 1.0.11 to 1.1.1

src/position-lookup.js

2

package.json
{
"name": "react-retailer-logos",
"version": "1.0.11",
"version": "1.1.1",
"description": "Sprite of retailer logos",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

import React from 'react';
import positionLookup from './position-lookup';
import brands from './brands';
const Sprite = ({ image, x, y, width, height, spriteWidth, spriteHeight, style }) => {
const bgX = (width / spriteWidth) * 448;
const bgY = (height / spriteHeight) * 768;
const bgX = (width / spriteWidth) * 896;
const bgY = (height / spriteHeight) * 3584;
const xMargin = 0; (width / spriteWidth) * 8;
const yMargin = 0; (height / spriteHeight) * 8;
const xMargin = 0;
const yMargin = 0;
const xPos = (width * x) + (xMargin * x);

@@ -27,18 +29,4 @@ const yPos = (height * y) + (yMargin * y);

const brandPositionLookup = [
['westelm.com', 'thenorthface.com', 'walmart.com', 'macys.com', 'uniqlo.com', 'jcrew.com', 'bestbuy.com'],
['bedbathandbeyond.com', 'urbanoutfitters.com', 'costco.com', 'rei.com', 'lululemon.com', 'madewell.com', 'lowes.com'],
['target.com', 'newegg.com', 'hm.com', 'freepeople.com', 'amazon.com', 'zappos.com', 'oldnavy.gap.com'],
['dickssportinggoods.com', 'qvc.com', 'restorationhardware.com', 'topshop.com', 'hillcity.gap.com', 'hollisterco.com', 'outdoorvoices.com'],
['revolve.com', 'coach.com', 'kohls.com', 'pier1.com', 'shopbop.com', 'patagonia.com', 'homedepot.com'],
['ralphlaren.com', 'jet.com', 'bananarepublic.gap.com', 'footlocker.com', 'toryburch.com', 'barnesandnoble.com', 'gamestop.com'],
['sephora.com', 'abercrombie.com', 'anntaylor.com', 'anthropologie.com', 'athleta.gap.com', 'bathandbodyworks.com', 'express.com'],
['eileenfisher.com', 'forever21.com', 'jcpenney.com', 'loft.com', 'menards.com', 'rebeccataylor.com', 'talbots.com'],
['theory.com', 'worldmarket.com', 'www.gap.com', 'www.gapfactory.com', 'bonobos.com', 'whitehouseblackmarket.com', 'victoriassecret.com'],
['nordstrom.com', 'bananarepublicfactory.gapfactory.com', 'jmclaughlin.com', 'rileyrose.com', 'backcountry.com', 'bloomingdales.com', 'shoes.com'],
['neimanmarcus.com', 'uniqlo.com', 'michaelkors.com', 'orvis.com', 'brooksbrothers.com', 'everlane.com', 'saksfifthavenue.com'],
['katespade.com', 'basspro.com']
];
exports.brands = brandPositionLookup.flat();
exports.brands = positionLookup.map(x => x.domain);

@@ -48,11 +36,12 @@ export default ({ sprite, brand, height, width, style }) => {

const SPRITE_WIDTH = 64;
const SPRITE_HEIGHT = 64;
const SPRITE_WIDTH = 128;
const SPRITE_HEIGHT = 128;
const N_ROWS = 10;
const N_ROWS = 28;
let x, y;
for(y=0; y<brandPositionLookup.length; y++) {
x = brandPositionLookup[y].indexOf(brand);
if (x > -1) {
break;
for (var i = 0; i < positionLookup.length; i++) {
if (positionLookup[i].domain===brand) {
x = positionLookup[i].column - 1;
y = positionLookup[i].row - 1;
}

@@ -59,0 +48,0 @@ }

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

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