From b1acb370c7b5e5fb869c72601c07d4acc5928d26 Mon Sep 17 00:00:00 2001 From: Daniel Rosel Date: Wed, 1 Mar 2023 15:41:34 +0100 Subject: [PATCH] he attak --- README.md | 13 ++++++++++--- src/garlic.js | 5 +++-- src/package.json | 13 +++++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index dfdcb83..2df8c9f 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,25 @@ You write your code and text as you would any other day, just let garlic protect | POV | Result | |--------------|---------------------------------------| | You Write | `

This is a test piece of text

` | -| Scraper Sees | ![final](./media/final.png) | -| User Sees | ![user](./media/user.png) | +| Scraper Sees | ![final](https://raw.githubusercontent.com/velocitatem/garlic/main/media/final.png) | +| User Sees | ![user](https://raw.githubusercontent.com/velocitatem/garlic/main/media/user.png) | # How? Currently, this is in development, but the beta works like this: ## React + +Install the packages with `npm i garlic-react`, you should then import the `Garlic` class with: + +```js +import Garlic from 'garlic'; +``` + You just need to wrap your html in the `garlic()` method: ```js function App() { - return garlic( + return Garlic.clove(

Go away robots :)

diff --git a/src/garlic.js b/src/garlic.js index e1653f7..d75b854 100644 --- a/src/garlic.js +++ b/src/garlic.js @@ -38,7 +38,7 @@ class Garlic { } static encode(string) { - return btoa(string+this.salt); + return btoa(string+(this.salt || "")); } static decodeBase64(root) { for (let i = 0; i < root.childNodes.length; i++) { @@ -61,4 +61,5 @@ class Garlic { } -export default Garlic; + +module.exports = Garlic; diff --git a/src/package.json b/src/package.json index 7fe9388..b062510 100644 --- a/src/package.json +++ b/src/package.json @@ -1,13 +1,18 @@ { - "name": "garlic", - "version": "1.0.0", + "name": "garlic-react", +"author": "Daniel Alves Rosel", + "version": "1.0.2", "description": "", "main": "garlic.js", -"type": "module", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "keywords": ["garlic", "protection"], + "keywords": [ + "garlic", + "protection", + "privacy", + "security" + ], "author": "", "license": "ISC" }