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

@harvest-profit/model-helpers

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harvest-profit/model-helpers

All the calculations

  • 1.11.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61
decreased by-1.61%
Maintainers
4
Weekly downloads
 
Created
Source
Harvest Profit

CircleCI codecov

You can find the documentation here

Installation

You will need an NPM access token to access this repo.

Simply run the following to install:

yarn add @harvest-profit/model-helpers

Usage

To use this package, just give it a try!

import { Contract } from '@harvest-profit/model-helpers';

const contractUrl = Contract.translateContractTypeToName('hedge_to_arrive');
console.log(contractUrl); // Outputs: `Hedge To Arrive`

Additional Notes

You should NEVER be checking what type the contract is, or setting the contract type without using the module defined types. Example:

// Example of BAD
if (contract.type_name === 'cashsale') {
   // ... do something
 }
// Example of GOOD
if (Contract.isCashSaleType(contract.type_name)) {
   // ... do something
 }

Development

Clone this repo, and begin committing changes. PRs are preferred over committing directly to master.

To run tests locally on your machine, run the following:

yarn run test

To preview documentation locally on your machine, run the following:

yarn run build-docs

After merging your pull request, consider updating the documentation with the following command:

yarn run publish-docs

Publishing

This package is published as a Private NPM Module.

To publish to the private NPM registry, simply run the following, after bumping the package.json version:

# Publish using Yarn
yarn publish

# Or publish using NPM
npm publish

License

Copyright 2017-Present Harvest Profit. This repo contains private code. No copying or external use permitted.

FAQs

Package last updated on 30 Aug 2019

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