1.0.6 • Published 9 months ago

ecomm-identifier v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

Usage

To use this package, import the getPlatformByUrl function and call it with a URL as the argument:

TypeScript:

import { getPlatformByUrl } from "ecomm-identifier";
const url = "http://swiftoutside.com";
const platform = await getPlatformByUrl(url);
console.log(platform);
//{ name: 'WooCommerce', url: 'http://swiftoutside.com', success: true }

JS:

const { getPlatformByUrl } = require("ecomm-identifier");
const url = "http://swiftoutside.com";
const platform = await getPlatformByUrl(url);
console.log(platform);
//{ name: 'WooCommerce', url: 'http://swiftoutside.com', success: true }

Alternatively, you can import the getPlatformByHtml function and call it with an HTML string as the argument:

import { getPlatformByHtml } from "ecomm-identifier";
const html = "<html><head><title>Swift Outside</title></head><body></body></html>";
const platform = await getPlatformByHtml(html);
console.log(platform);
//{ name: 'WooCommerce', url: 'http://swiftoutside.com', success: true }
const { getPlatformByHtml } = require("ecomm-identifier");
const html = "<html><head><title>Swift Outside</title></head><body></body></html>";
const platform = await getPlatformByHtml(html);
console.log(platform);
//{ name: 'WooCommerce', url: 'http://swiftoutside.com', success: true }

Supported Platforms

  • BigCommerce
  • Ecwid
  • Lightspeed
  • Magento
  • Shopify
  • Square
  • Squarespace
  • Wix
  • WooCommerce

TODO:

  • Add more platforms
  • Add tests
  • Automate deployment
1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago