{"_id":"stegano.db","_rev":"47-648afc6df26eaa782c62b3a550b49c9f","name":"stegano.db","dist-tags":{"latest":"4.7.2"},"versions":{"4.7.2":{"name":"stegano.db","version":"4.7.2","keywords":["db","quick.db","json"],"author":{"name":"Kisakay"},"license":"MIT","_id":"stegano.db@4.7.2","maintainers":[{"name":"kisakay","email":"anaissaraiva@hotmail.com"}],"homepage":"https://gitlab.com/ihrz/SteganoDB#readme","bugs":{"url":"https://gitlab.com/ihrz/SteganoDB/issues"},"dist":{"shasum":"85bf3a7a6e31c172f205672c797819032c0b427a","tarball":"https://registry.npmjs.org/stegano.db/-/stegano.db-4.7.2.tgz","fileCount":13,"integrity":"sha512-NlEAuNNIT39sBCwvbgrjBrW6XkrjYQOZUAmAxSjj7V01egmXr46fffzaqKwBSZzRjkMx7KL+3lZ27KH991qJHQ==","signatures":[{"sig":"MEUCIH03CKcvQL+TX82FJj3uTB3n3bvyWgZF5yKjYUVlzwaeAiEA42X7lZcBPamNcWJ1tMTijl9sU/hk6UgsILa1pmekCUo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74396},"main":"./lib/index.js","types":"./lib/index.d.ts","gitHead":"575674a5d57ab468ae138b10e9ea35cb20c33f74","scripts":{"test":"npx tsc && node demo.ts","build":"npx tsc"},"_npmUser":{"name":"kisakay","email":"anaissaraiva@hotmail.com"},"repository":{"url":"git+https://gitlab.com/ihrz/SteganoDB.git","type":"git"},"_npmVersion":"10.9.3","description":"Database in png lmao","directories":{"lib":"lib"},"_nodeVersion":"22.18.0","dependencies":{"steggy-noencrypt":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.3","typescript":"^5.5.4","@types/jest":"^29.5.14","@types/node":"^22.4.1"},"_npmOperationalInternal":{"tmp":"tmp/stegano.db_4.7.2_1757003113862_0.7457212318617856","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2025-09-04T16:25:13.862Z","modified":"2026-04-17T15:04:13.298Z","1.0.0":"2024-03-17T19:15:36.555Z","1.0.1":"2024-03-17T19:23:47.492Z","1.0.2":"2024-03-17T19:55:34.694Z","1.0.3":"2024-03-17T19:57:12.269Z","1.0.4":"2024-03-17T21:15:08.971Z","1.0.5":"2024-03-17T21:16:34.511Z","1.0.6":"2024-03-17T21:33:36.228Z","1.0.7":"2024-03-17T21:52:51.828Z","1.0.8":"2024-03-19T18:05:55.148Z","1.0.9":"2024-03-19T18:13:06.851Z","1.0.10":"2024-03-26T17:55:33.138Z","1.2.1":"2024-03-26T18:34:28.559Z","1.2.2":"2024-03-29T16:57:45.135Z","1.2.3":"2024-03-29T17:02:17.302Z","1.2.4":"2024-04-07T18:56:13.776Z","1.2.5":"2024-04-19T16:44:03.789Z","1.3.0":"2024-05-27T20:37:34.624Z","1.3.1":"2024-05-28T12:27:27.941Z","2.0.0":"2024-06-28T08:18:57.192Z","3.0.0":"2024-08-08T16:22:47.172Z","3.1.0":"2024-08-08T16:39:40.320Z","3.1.1":"2024-08-08T16:42:32.518Z","3.2.0":"2024-08-08T16:57:03.068Z","3.3.0":"2024-08-14T12:01:50.425Z","3.4.0":"2024-08-15T13:33:33.153Z","3.5.0":"2024-08-18T07:50:14.485Z","4.0.0":"2024-08-20T14:09:18.621Z","4.0.1":"2024-09-08T17:08:48.045Z","4.1.0":"2024-12-12T10:43:40.259Z","4.2.0":"2024-12-24T17:49:25.791Z","4.3.0":"2025-04-24T09:50:38.439Z","4.3.1":"2025-04-24T14:07:00.038Z","4.3.2":"2025-04-24T16:28:51.386Z","4.3.3":"2025-04-24T16:41:09.017Z","4.3.4":"2025-04-24T16:42:46.017Z","4.3.5":"2025-04-24T16:45:25.713Z","4.3.6":"2025-04-24T16:48:12.891Z","4.3.7":"2025-04-24T16:56:30.137Z","4.3.8":"2025-05-07T08:57:23.847Z","4.4.0":"2025-06-19T08:37:16.510Z","4.5.0":"2025-06-19T16:39:47.143Z","4.6.0":"2025-06-19T16:43:06.147Z","4.7.0":"2025-06-19T16:46:15.962Z","4.7.1":"2025-07-04T20:30:34.082Z","4.7.2":"2025-09-04T16:25:14.071Z"},"bugs":{"url":"https://gitlab.com/ihrz/SteganoDB/issues"},"author":{"name":"Kisakay"},"license":"MIT","homepage":"https://gitlab.com/ihrz/SteganoDB#readme","keywords":["db","quick.db","json"],"repository":{"url":"git+https://gitlab.com/ihrz/SteganoDB.git","type":"git"},"description":"Database in png lmao","maintainers":[{"name":"kisakay","email":"anaissaraiva@hotmail.com"}],"readme":"# SteganoDB\r\n\r\n**SteganoDB** is a lightweight TypeScript library that allows you to store and retrieve data within images using steganography. It lets you embed JSON data into images, providing a creative and secure way to store sensitive information or configurations.\r\n\r\n## Features\r\n\r\n-   **Simple Interface**: Easy-to-use methods to set, get, and manage data within images.\r\n-   **TypeScript Support**: Written in TypeScript but compatible with both TypeScript and JavaScript projects.\r\n-   **Steganography**: Uses steganography techniques to hide data within images.\r\n-   **Data Concealment**: Supports hiding JSON data within images without encryption for quick retrieval.\r\n-   **Flexible Use**: Suitable for various applications, including storing configurations, sensitive data, or small datasets.\r\n\r\n## Installation\r\n\r\nYou can install SteganoDB via npm:\r\n\r\n```bash\r\n# Install with npm\r\nnpm install stegano.db\r\n\r\n# Install with yarn\r\nyarn add stegano.db\r\n\r\n# Install with bun\r\nbun i stegano.db\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nconst { SteganoDB } = require('stegano.db');\r\n\r\nconst db = new SteganoDB('./default.png');\r\n\r\nconst PlayerOne = {\r\n    nickname: 'Kisakay',\r\n    team: 'red',\r\n    areMod: false\r\n};\r\n\r\nconst PlayerTwo = {\r\n    nickname: 'Sown',\r\n    team: 'red',\r\n    areMod: false\r\n};\r\n\r\ndb.push('server.players', PlayerOne);\r\ndb.push('server.players', PlayerTwo);\r\n\r\nconsole.log(db.get('server.players'));\r\n/*\r\n[\r\n  {\r\n    nickname: \"Kisakay\",\r\n    team: \"red\",\r\n    areMod: false,\r\n  }, {\r\n    nickname: \"Sown\",\r\n    team: \"red\",\r\n    areMod: false,\r\n  }\r\n]\r\n*/\r\n\r\ndb.set('server.info', {\r\n    server_name: \"Kisakay's Server\",\r\n    slot: 3,\r\n    map: 'dust2'\r\n});\r\n\r\nconsole.log(db.get('server'));\r\n/*\r\n{\r\n  players: [\r\n    {\r\n      nickname: \"Kisakay\",\r\n      team: \"red\",\r\n      areMod: false,\r\n    }, {\r\n      nickname: \"Sown\",\r\n      team: \"red\",\r\n      areMod: false,\r\n    }\r\n  ],\r\n  info: {\r\n    server_name: \"Kisakay's Server\",\r\n    slot: 3,\r\n    map: \"dust2\",\r\n  },\r\n}\r\n*/\r\n\r\nconsole.log(db.get('server.info'));\r\n/*\r\n{\r\n    server_name: \"Kisakay's Server\",\r\n    slot: 3,\r\n    map: \"dust2\",\r\n}\r\n*/\r\n\r\ndb.add('server.info.slot', 10);\r\n// Server's slot is now at Current + 10 (3+10) : 13\r\n\r\ndb.sub('server.info.slot', 2);\r\n// Server's slot is now at Current - 2 (13-2) : 11\r\n\r\ndb.deleteAll();\r\n// Entirely clear the database !!\r\n\r\ndb.cache('server.info.lock', true, 3000);\r\n// Lock the server access for 3000 ms; (Erase the value after the time's up)\r\n\r\nconsole.log(db.all());\r\n// Return the entire database\r\n\r\nconsole.log(db.has('server.info.lock'));\r\n// Return true if the value exists else return false\r\n\r\ndb.delete('server');\r\n// Remove the object/value\r\n\r\ndb.table('anticheat');\r\n// Create another table\r\n```\r\n\r\n## Methods\r\n\r\n### `constructor(filePath?: string, options?: any)`\r\n\r\nInitializes a new instance of the SteganoDB class.\r\n\r\n-   `filePath`: Optional. The path to the image file used for storing data. Defaults to `./steganodb.png`.\r\n-   `options`: Optional. Additional options for the database.\r\n\r\n### `table(tableName: string): SteganoDB`\r\n\r\nCreates and returns a new SteganoDB instance for a specified table.\r\n\r\n-   `tableName`: The name of the table to create.\r\n\r\n### `get(key: string): any`\r\n\r\nRetrieves the value associated with the specified key.\r\n\r\n-   `key`: The key whose value should be retrieved. Supports nested keys using dot notation.\r\n\r\n### `has(key: string): boolean`\r\n\r\nChecks if a value exists for the specified key.\r\n\r\n-   `key`: The key to check for existence. Supports nested keys using dot notation.\r\n\r\n### `set(key: string, value: any): void`\r\n\r\nSets the value for the specified key.\r\n\r\n-   `key`: The key to set the value for. Supports nested keys using dot notation. The key cannot be null or contain spaces.\r\n-   `value`: The value to set.\r\n\r\n### `delete(key: string): void`\r\n\r\nDeletes the value associated with the specified key.\r\n\r\n-   `key`: The key whose value should be deleted. Supports nested keys using dot notation.\r\n\r\n### `cache(key: string, value: any, time: number): void`\r\n\r\nSets a temporary value for the specified key that will be automatically deleted after the specified time.\r\n\r\n-   `key`: The key to set the temporary value for. Supports nested keys using dot notation. The key cannot be null or contain spaces.\r\n-   `value`: The value to set.\r\n-   `time`: The time in milliseconds after which the value should be deleted. Must be a number.\r\n\r\n### `add(key: string, count: number): void`\r\n\r\nIncrements the value of the specified key by the specified count. If the key does not exist, it will be initialized to 0 before incrementing.\r\n\r\n-   `key`: The key whose value should be incremented. Supports nested keys using dot notation. The key cannot be null or contain spaces.\r\n-   `count`: The number to increment the value by. Must be a number.\r\n\r\n### `sub(key: string, count: number): void`\r\n\r\nDecrements the value of the specified key by the specified count. If the key does not exist, it will be initialized to 0 before decrementing.\r\n\r\n-   `key`: The key whose value should be decremented. Supports nested keys using dot notation. The key cannot be null or contain spaces.\r\n-   `count`: The number to decrement the value by. Must be a number.\r\n\r\n### `push(key: string, element: any): void`\r\n\r\nPushes an element to an array associated with the specified key. If the key does not exist, an array will be created.\r\n\r\n-   `key`: The key whose array should be appended to. Supports nested keys using dot notation. The key cannot be null or contain spaces.\r\n-   `element`: The element to push into the array.\r\n\r\n### `deleteAll(): void`\r\n\r\nClears all data in the database.\r\n\r\n### `all(): Array<{ id: string, value: any }>`\r\n\r\nReturns an array of all key-value pairs in the database.\r\n\r\n### `pull(key: string, element: any): void`\r\n\r\nPull an element of an array associated with the specified key\r\n\r\n\r\n## Creators\r\n\r\n-   [Kisakay](https://gitlab.com/Kisakay) (Anaïs)\r\n","readmeFilename":"README.md"}