npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nmi-agro/fpr-td-gen

v1.1.0

Published

A generator for the Technical Documentation of the EU Fertilizer Product Regulation

Downloads

1

Readme

License Badge JavaScript Style Guide

FPR-TD-GEN

A package to determine what needs to be included in the Technical Documentation for a fertilising product.

What

Producers of fertilising products can sell their product in the entire European Union by affixing the CE marking to their product. To do this, they need to demonstrate compliance with the Fertilising Product Regulation (FPR) which they do by compiling "Technical Documentation" (TD). Finding out what evidence needs to be in the TD can be laborious. This package helps to determine what needs to be included in the TD based on a minimum set of questions. After answering all questions, the user gets a checklist of all elements that must be present in the TD for the conformity assessment procedure.

This package provides the logic and the content but no UI. The package does not store or sent data to an external party and can be used freely under the EUPL-1.2 license.

Installation

Installation is done using the npm install command:


npm install @nmi-agro/fpr-td-gen

Documentation

The documentation of the package can be found here

Usage

To start, initialise a new Generator object


import { Generator } from 'fpr-td-gen' 

const generator = new Generator()

Then, repeat the following three methods of generator to 1. determine whether all questions have been answered, 2. get the next question, and 3. save the answer:


generator.allQuestionsAnswered() // returns boolean
generator.getNextQuestion()      // returns a Question object
generator.saveAnswer(answer)     // answer is stored in the generator object

Once all questions have been answered, the tasklist can be generated like:


generator.getTechnicalDocumentationTaskList()

The generator object including the answers to questions, can be exported to a .json file, both while answering questions and when all questions have been answered. Of cource, importing a .json file is also possible.


generator.saveToDisk('path/to/file.json')
generator.loadFromDisk('path/to/file.json')

Contributing

You can contribute by adding or improving translations and by reporting or fixing bugs at the FPR-TD-GEN github

Translations

Ideally the package works for the 24 languages of the EU You can add a new language by making a pull request. The first step for adding is new language is adding a code for the new language to the localesTypes type in 'shared.types.ts' such as 'nl', 'en', or 'fr'. Thereafter, the translations of the new language can be added to the questions in 'question_sets.ts' and tasks in 'tasklist_sets.ts'. Questions look like this and new translations can simply be added by adding new lines for the properties 'ask' (the question prompted to a user), 'placeholder' (an example answer that can be displayed for illustrative purpose), and 'help' (a description of the question):


{
      id: 'Q1',
      type: 'text',
      ask: {
        nl: 'Wat is de naam van uw product?',
        en: 'What is the name of your product?'
      },
      placeholder: {
        nl: 'bijv. Nmestof Ultra',
        en: 'e.g. N fertiliser Ultra'
      },
      help: {
        nl: 'Dit is de naam van het product.',
        en: 'This is the name of the product.'
      },
      options: null,
      cmcQuestion: false
    }

Translations for tasks can be done in a similar fashion, requiring a translation of the property 'taskName'. The properties 'taskDetails' and 'taskDescription' are optional.

Bugs

If you find a bug, please report it at https://github.com/AgroCares/fpr-td-gen/issues

License

Created by Nutriënten Management Instituut Licensed under EUPL-1.2 (European Union Public Licence V. 1.2) Source code available at https://github.com/AgroCares/fpr-td-gen fpr-td-gen