Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

policy-generator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

policy-generator

Generate policies for online stores in no time.

Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
8
60%
Maintainers
1
Weekly downloads
 
Created
Source

Policy Generator

Generate policies for online stores in no time.

Installation

Using npm:

$ npm install policy-generator --save

Using yarn:

$ yarn add policy-generator

Usage

Standalone:

// Load the module.
const policy = require('policy-generator')

// You should pass your company information to generated policies.
// Given information is replaced in the templates.
let info = {
  // The name of your website.
  app: 'FooBar',

  // The name of your company.
  company: 'FooBar Limited',

  // The street address of your company.
  street: 'Foo Bar 123/4',

  // The city / town where your company is registered.
  city: 'Foobar',

  // The state / county where your company is registered.
  state: 'Barbaz',

  // The zip / postal code of your company.
  zip: 'FOO BAR',

  // The country where your company is registered.
  country: 'Foo Bar',

  // Your company's contact email.
  email: 'foo@bar.baz'
}

// Get the `Terms of Service` in `English`.
policy.tos('en', info) // [Object]

// Get the `Privacy Policy` in `English`.
policy.privacy('en', info) // [Object]

// Get the full `Returns Policy` in `English`.
policy.returns('en', info) // [Object]

In ExpressJS:

// Load the module.
const policy = require('policy-generator')

// The Express app.
const app = express()

// Generate policy routes in locale found in `res.locals.locale`.
// Note: the `info` object is the same as in standalone usage.
app.use(policy.routes(info))

// Next you should be able to access policies by URL.

// For `Terms of Service` access:
// http://localhost:3000/policies/tos

// For `Privacy Policy` access:
// http://localhost:3000/policies/privacy

// For `Returns Policy` access:
// http://localhost:3000/policies/returns

Supported Policies

Currently we support only the following types of policies:

  • Terms Of Service
  • Privacy Policy
  • Returns Policy

We may add more types of policies in future versions.

Supported Languages

Currently we support only the following languages:

  • English (en)

We may add more languages in future versions.

Note

This policies are intended to be used by small online stores, so if you run a big business these policies may not be what you need.

We may enhance functionality of the policy-generator in future versions.

Credits

As policy templates were used policies generated with Shopify.

License

The MIT License (MIT)

Copyright (c) 2017 Ion Suman sumanion122@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FAQs

Package last updated on 06 May 2017

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