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

awesome-copyright

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-copyright

Awesome copyright notice for React and VanillaJS with auto-renewal of the year.

  • 1.1.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NPM version Build npm-typescript License

Awesome copyright notice for Kuse and VanillaJS with auto-renewal of the year.

What is it for?

There is only one practical application - to create copyright notices with automatic replacement of the copyright renewal year. This is an npm test package created for one purpose - to learn how to create npm packages.

Installation:

npm install awesome-copyright

or

yarn add awesome-copyright

Usage :

In React

Add Copyright to your component:

import React from 'react'
import ReactDOM from 'react-dom/client'

import * as Copyright from "awesome-copyright";

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
  <React.StrictMode>
    <div>
      <footer>

        <Copyright.React // Use React component
          year={2022}
          yearOnly={false}
          creator="Igor Teplostanski"
          message="By"
          styles="copyright"
          creatorStyle="copyright__creator"
        />

      </footer>
    </div>
  </React.StrictMode>
)

In Vanilla JS

Add Copyright to your component:

import * as Copyright from "awesome-copyright";

Copyright.Vanilla({ // Use Vanilla js
  element: document.querySelector<HTMLDivElement>('#copyright')!,
  yearOnly: false,
  yearStyle: 'test',
});

ParamsTypeExampleDefault stateDescription
yearstring/number2023/"2023"current yearYear of copyright start
yearOnlybooleantrue/falsefalseShow only the Year the copyright started. It is disabled by default and if the current year differs from the year of the beginning, it shows the years in the format '2000-2023'
creatorstring"John Doe"""Name of the copyright holder.
copystring"®""©"Copyright symbol
messagestring"Create by"""The text before the creator 's name
stylessrting"copyright""" ( Only for React component )Styles the root block of the component. Accepts a string with the CSS class name/names
yearStylestring"year"""Styles the year block of the component. Accepts a string with the CSS class name/names
messageStylestring"message"""Styles the message block of the component. Accepts a string with the CSS class name/names name
copyStylestring"copy-symbol"""Styles the copy symobl block of the component. Accepts a string with the CSS class name/names
creatorStylestring"name"""Styles the creator block of the component. Accepts a string with the CSS class name/names
elementstring"#copyright"Required parameter for VanillaHTML element id

Keywords

FAQs

Package last updated on 12 Jun 2023

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