New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

seven-ten

Package Overview
Dependencies
Maintainers
9
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seven-ten

React client for Seven-Ten

latest
npmnpm
Version
3.4.6
Version published
Weekly downloads
222
16.84%
Maintainers
9
Weekly downloads
 
Created
Source

Seven-Ten Client

Client for Seven-Ten

Build Status

Getting started

# clone the repository and install the dependencies
git clone https://github.com/zooniverse/Seven-Ten-Client.git
cd Seven-Ten-Client
npm install .
  • Run the tests with npm test
  • Lint the code with npm run lint
  • Release a version with npm run version, also
    • Transpiles the source
    • Tags a release

Client usage

Client

Communicates with the API.

Client.config = {
  host: 'https://seven-ten-staging.zooniverse.org', // The API host
  headers: zooAPI.headers // Headers (e.g. Authentication) to send with requests
};

Client.current(); // Provides a singleton client instance
Split

Manages the current splits

Split.load('owner/project-name').then((splits) => {
  // ...
}); // Load all active splits by project slug

// To create metric-tracking events for splits;
Split.classificationCreated(classification);
// or
Split.classifierVisited();

Component usage

TextSplit

Provides a component that displays a text split.

splitKey corresponds to split.key

textKey corresponds to the property storing text in variant.value

<TextSplit
  splitKey="landing.text"
  textKey="description"
  splits={this.props.splits}
  default="The default description"
/>
VisibilitySplit

Provides a component that toggles element visibility

splitKey corresponds to split.key

elementKey corresponds to the property storing the on/off boolean in variant.value

<VisibilitySplit
  splitKey="mini-course.visible"
  elementKey="button"
  splits={this.props.splits}
>
  <p>This will be shown if it's visible, otherwise it won't</p>
</VisibilitySplit>

FAQs

Package last updated on 23 Sep 2021

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