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

empower-affiliate-search

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

empower-affiliate-search

A react component that can be used to filter results from a REST API sources.

  • 0.1.22
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-37.04%
Maintainers
3
Weekly downloads
 
Created
Source

A react component that can be used to filter results from a REST API sources.

Installation

Component

npm install empower-affiliate-search

Repository

  1. Run npm install
  2. After successful installation, run npm start

Initialization

import  AffiliateSearch  from  'empower-affiliate-search';

Usage

const  AFFILIATE_OPTIONS = [
	{
		"label": "Fruit Name",               
		"value": "fruit_name",                
		"type": "string",
	},
	{
		"label": "Status",
		"value": "fruit_status",
		"type": "multiple",
		"categoryOptions": [
			{
				"label":  "Fresh",
				"value":  "fresh"
			},
			{
				"label":  "Rotten",
				"value":  "rotten"
			}
		]
	},
]

const  extractValueFromAffiliate  = (val) => {
	...Statement
}

The getValue can be bind to a function of your choice to extract the value from the affiliate and shall be triggered upon enter.

<AffiliateSearch
	options={AFFILIATE_OPTIONS} 
	getValue={(val)  =>  extractValueFromAffiliate(val)}
/>
Result Value

The affiliate will produce the following value upon enter. The "AND" object literal represent the string option category while the "OR" represent the select option category.

{
    AND: { "fruit_name": "|test|" } ...other string option value,
    OR: { "fruit_status": ["fresh"] } ...other select option value
}

Documentation

Confluence - Affiliate Search

Developers

Jephunneh Viernes - jephunneh.viernes@empowerteams.io

Changelog:

  • 0.1.22 - Security Fix - Fix vulnerability issues in the package
  • 0.1.17 - Bug Fix - clearFilter props not working properly
  • 0.1.16 - Bug Fix - options props does not update when the value was changed
  • 0.1.15 - added isAffiliateDropdown props

FAQs

Package last updated on 21 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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