

NPM - Meet my friend paul 👨🦰 👨🦰
source link: https://dev.to/luctst/npm-meet-my-friend-paul-3jo1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Make Paul appear on your page when you click
I have a friend called Paul, he loves beer and he works hard everyday, so I decided to honor him with this little package each time you'll click on a DOM element my friend Paul will appear randomly on your web page :) Enjoy !!
it is him 👇
Install 🚀
Use Paul via a CDN by including this script:
Add this script just before your </body>
closing tag:
<script crossorigin src="https://unpkg.com/@luctst/paul/umd/paul.client.min.js"></script>
You now have access to the Paul() function to see how to use it check the api section below.
Example 🖍
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Hi Paul 👨🦰</title>
</head>
<body>
<script crossorigin src="https://unpkg.com/@luctst/paul/umd/paul.client.min.js"></script>
<script>
Paul();
</script>
</body>
</html>
API 🧑
Paul([DOMElement], [friends])
The Paul
function create an img with my friend Paul.
-
DOMElement
{HTMLElement, optional} - If this argument is specified theclick
event will be attached on this DOM Element. -
friends
{Array, optional} - If this argument is specified the function will display randomly an img from thefriends
array.
Contribute 🍰
If you want to add other pictures, please do not hesitate to PR some pictures in this folder https://github.com/luctst/paul/tree/master/static
Happy coding ✨ 🦄
Recommend
-
83
My friend just solved his frame drop issues Add to FavoritesShare
-
47
So you are planning on learning something new — Node.js for example — and you need to download it first. You visit the project’s website, download an installer, go through the install...
-
50
-
36
Please meet Oriol Brafau , our newest Friend of Add-ons! Oriol is one of 23 volunteer community members who have landed code for theWebExtensions API in Firefox sinc...
-
52
Java Developers: var Is Your FriendClearing up confusion around Local Variable Type InferencePosted on 2018-08-14 by Todd Ginsberg
-
8
Paul Graham’s Friend Sold 80% of His Bitcoin For ETH – TrustnodesSilicon Valley’s father of startups, Paul Graham (pictured speaking at Y Combinator), is propping up eth to his 1.3 million Twitter followers in publicly stating:
-
14
Meet your new best friend: Product ops BY Andres Phillips ON AUGUST 18, 2021 ...
-
10
SPLUNK LIFE Meet the Splunktern: John Paul Francisco
-
15
Meet PNPM: The Faster, More Performant NPMAn introduction to pnpm, how it differs from npm, and the benefits you can gain from using pnpm instead of npm
-
4
Helpful friends are always there to answer questions, give advice, and support us in expressing ourselves better. Now, Instagram is taking friendship to a whole new level by building an AI friend just for you. This clever chatbot, similar to
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK