New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

use-cornify

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-cornify

🦄 Put unicorns and rainbows on any website on the Internet with a single React Hook!

latest
Source
npmnpm
Version
0.3.5
Version published
Weekly downloads
7
75%
Maintainers
1
Weekly downloads
 
Created
Source

🦄 Unicorns and Rainbows Easter Egg with this React Hook!

Build Status GitHub issues semantic-release

The Cornify script gives you the magical power to put unicorns and rainbows on any website on the Internet. Since 2009, it has served over 400 million unicorns and rainbows. How wonderful indeed.

And today: You can use it as a React Hook!

🎉 How to use the hook

Check out the /example directory for a full fletched example of the hook. A demo can be found here: use-cornify.surge.sh

Start cornifying by adding the below code. Then start entering the Konami code and see the magic happen instantly!

Pro Tip: Use as an easter egg on your next website!

Konami code: ↑ ↑ ↓ ↓ ← → ← → b a

/**
 * useCornify
 * 
 * @param {string[]} [keys=['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a']]
 * @param {boolean} [addCupcakeButton=true] 
 * @param {boolean} [addMagicalWords=true]
 * @param {string} [younicorns]
 */
const { remove } = useCornify({
  keys: ['ArrowUp', 'ArrowDown', 'Enter'],
  showCupCakeButton: false,
  addMagicalWords: false,
  younicorns: '12,957,826,716,386'
})

// To manually remove all unicorns
remove()

🙈 Add summing Younicorns

These days, you can create your own personal unicorns on Cornify. They are called Younicorns. If you want the Cornify script to show your Younicorns, you can provide a list of Younicorn IDs to the script, like this:

useCornify({ younicorns: "12,957,826,716,386" });

To find the IDs, navigate your browser to a Younicorn page and look at the URL. It will include a number - that's the ID.

🙌 Credits

Big thanks to:

Unicorns & Rainbows On-Demand
http://www.cornify.com

Keywords

react

FAQs

Package last updated on 17 Jan 2021

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