
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
policy-generator
Advanced tools
Generate policies for online stores in no time.
Using npm:
$ npm install policy-generator --save
Using yarn:
$ yarn add policy-generator
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.router(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
Currently we support only the following types of policies:
We may add more types of policies in future versions.
Currently we support only the following languages:
We may add more languages in future versions.
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.
As policy templates were used policies generated with Shopify.
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
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
We found that policy-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.