2.1.7 • Published 2 years ago
komerce-packages v2.1.7
komerce-package
⚙️ Install
Install it locally in your project folder:
npm i komerce-package
# Or Yarn
yarn add komerce-package
# Or pnpm
pnpm add komerce-packageYou can also install it globally but it's not recommended.
📖 Usage
Bundle files
import { bundle } from 'komerce-package'📚 List Packages
utils
cookies- getCookies, setCookies, removeCookiesformatDate-(dayjs)Converts a timestamp to a human-readable relative time.find- Finds the first element in the array that satisfies the provided testing function.generate-acronym- Generate acronym from stringgenerate key- Generate key for encryptionget- Retrieves a value from an object using the specified path.includes- Checks if a value is present in an array.isAlpha- Checks if the given string consists of only alphabets.isEmpty- Checks if the given value is empty.isNull- Checks if a value is null.localstorage- getLs, setLs, removeLs enryption with secrety keynotification- notification with antdomit- Creates a new object by omitting specified keys from the source object.request- Makes a GET and POST request to the general response json.secure- encryption vernam cipher with generate keyxor string- encryption xor string with generate key
storage
cookies- getCookies, setCookies, removeCooies yang sudah di modifikasi dengan enkripsilocalstorage- getLs, setLs, removeLs yang sudah di modifikasi dengan enkripsi
headers
postRequest- Makes a POST request to the specified URL with the provided request body and returns the response data.listRequest- Makes a GET request to the specified URL and returns the response data array.singleRequest- Makes a GET request to the specified URL and returns the response data object.