{"id":18439794,"url":"https://github.com/bdmostafa/simplify","last_synced_at":"2025-08-20T11:12:47.117Z","repository":{"id":54534745,"uuid":"338285666","full_name":"bdmostafa/simplify","owner":"bdmostafa","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-15T06:30:33.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T21:37:46.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@mdmostafa/simplify","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdmostafa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-12T10:23:25.000Z","updated_at":"2021-02-24T15:15:33.000Z","dependencies_parsed_at":"2022-08-13T19:00:38.813Z","dependency_job_id":null,"html_url":"https://github.com/bdmostafa/simplify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdmostafa%2Fsimplify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdmostafa%2Fsimplify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdmostafa%2Fsimplify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdmostafa%2Fsimplify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdmostafa","download_url":"https://codeload.github.com/bdmostafa/simplify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904622,"owners_count":21180836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:26:36.902Z","updated_at":"2025-04-14T15:21:09.308Z","avatar_url":"https://github.com/bdmostafa.png","language":"JavaScript","readme":"# @mdmostafa/simplify\n\n[![npm (scoped)](https://img.shields.io/npm/v/@mdmostafa/simplify.svg)](https://www.npmjs.com/package/@mdmostafa/simplify)\n[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@mdmostafa/simplify.svg)](https://www.npmjs.com/package/@mdmostafa/simplify)\n\nRemoves all spaces from a string.\n\n## Install\n\n```\n$ npm install @mdmostafa/simplify\n```\n\n## Usage\n\n```js\nconst { makeString, makeToken, verifyToken, Events, encrypt, decrypt } = require(\"@mdmostafa/simplify\");\n\nmakeString(\"Bangla desh\");\n//=\u003e \"Bangladesh!\"\n\nmakeString(1234);\n//=\u003e Uncaught TypeError: makeString wants a string!\n//    at simplify (\u003canonymous\u003e:2:41)\n//    at \u003canonymous\u003e:1:1\n\nmakeToken(\"bangladesh\", \"secretKey\");\n//=\u003e 331d261003455b2b3659af7f8c046a4dc96a9bc0d0692d714cff35775e5a25aa\n\nmakeToken(\"\", \"secretKey\");\nmakeToken(\"bangladesh\", \"\");\n//=\u003e TypeError: hash wants a string and secret key!\n\nverifyToken(\"bangladesh\", \"secretKey\");\n//=\u003e Your key is valid\n\nverifyToken(\"bangladesh\", \"abcd\");\n//=\u003e Your key/string is not valid\n\nconst myEvent = new Events();\n\n// Event listening\nmyEvent.listen('loadMsg');\n//=\u003e Listening to your event...\n//=\u003e Hello Bangladesh!\n\n// creating event with message\nmyEvent.log('loadMsg', 'Hello Bangladesh!');\n\n// Encrypt - Decrypt Usages text or buffer\nconst secretKey = 'OVH6sdmpNWjRR+qC*(7rdxs01lwH654@';\n\nconst hash = encrypt('Hello Node JS!', secretKey);\n\nconst hashFromBuffer = encrypt(Buffer.from('Hello Node JS!', 'utf8'), secretKey);\n\nconsole.log(hash);\n\n//=\u003e {\n//=\u003e     iv: '418e5653829e3c902a4512e260ff356d',\n//=\u003e     content: '9e6e67bd5715c72a47fb6434cd6a'\n//=\u003e }\n\nconst txt = decrypt(hash, secretKey);\nconst txt2 = decrypt(hashFromBuffer, secretKey);\n\nconsole.log(txt); \n//=\u003e Hello Node JS!\nconsole.log(txt2); \n//=\u003e Hello Node JS!\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdmostafa%2Fsimplify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdmostafa%2Fsimplify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdmostafa%2Fsimplify/lists"}