Generate legal texts in markdown format. Lightweight, 0 dependencies. A good starter template to feed to ChatGPT or to use programmatically directly.
DISCLAIMER: OpenTerms is not a replacement for a lawyer and can't be held responsible for any damages you incur while using it's content. This software is provided "as is" under the MIT License with neither liability nor warranty.
import { appPrivacy, appTerms, webPrivacy, webTerms } from '@entva/openterms';
const options = {
company: 'Example, Inc.',
email: 'contact@example.com',
website: 'https://example.com',
address: '123 Example Str., 31337, State, Country'
};
// Currently supports 'en' and 'de' locales
const markdown = webTerms('en', options);
export type Options = {
company: string,
email: string,
appName: string,
minimumAge?: number,
updated?: string,
version?: string,
conditions?: {
shop?: boolean,
tracking?: boolean,
retargeting?: boolean,
gdpr?: boolean,
},
};
export type Options = {
company: string,
email: string,
appName: string,
updated?: string,
version?: string,
country?: string,
conditions?: {
shop?: boolean,
},
};
export type Options = {
company: string,
email: string,
minimumAge?: number,
updated?: string,
version?: string,
website: string,
conditions?: {
shop?: boolean,
tracking?: boolean,
retargeting?: boolean,
gdpr?: boolean,
},
};
export type Options = {
company: string,
email: string,
updated?: string,
version?: string,
website: string,
country?: string,
conditions?: {
shop?: boolean,
},
};
export type Options = {
email: string,
address?: string,
phone?: string,
vat?: string,
commercialRegister?: string,
};
You can use remove-markdown module to clean up any markup:
import removeMd from 'remove-markdown';
const text = removeMd(generator('en', options));
You can use marked to render HTML:
import marked from 'marked';
const text = marked(generator('en', options));
You can use react-markdown to avoid dangerouslySetInnerHTML:
import React from 'react';
import ReactMarkdown from 'react-markdown';
const node = <ReactMarkdown>{generator('en', options)}</ReactMarkdown>;