Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
bookman
Advanced tools
Readme
An Easy-To-Use JSON Database
Get support »
Report Bug
·
Request Feature
·
Some link
yarn add bookman
npm i bookman
/* BookmanDB Files */
const { Database, FSAdapter } = require("bookman");
/* Creating New Database */
const fsAdapter = new FSAdapter({
defaultDir: "database",
databaseName: "mydb",
});
const db = new Database(fsAdapter);
/* Setting a value in the database */
db.set("just.a.long.data.name", "Bookman is cool!"); // => "Bookman is cool!"
db.set("just.a.long.array", []); // => []
db.set("just.a.long.number", 1); // => 1
/* Getting a value in the database */
db.get("just.a.long.data"); // => { name: "Bookman is cool!" }
db.fetch("just.a.long.number"); // => 1
/* Check if data created */
db.has("just.a.long"); // => true
db.has("just.a.long.name"); // => false
/* Add specified data */
db.add("just.a.long.number", 1); // => 2
db.add("just.a.long.number", 5); // => 7
/* Subtract specified data */
db.subtract("just.a.long.number", 1); // => 6
db.subtract("just.a.long.number", 3); // => 3
/* Push specified data */
db.push("just.a.long.array", 2); // => [2]
db.push("just.a.long.array", null); // => [2, null, 3, "str1", {}]
db.push("just.a.long.array", 3); // => [2, null, 3]
db.push("just.a.long.array", "str1"); // => [2, null, 3, "str1"]
db.push("just.a.long.array", {}); // => [2, null, 3, "str1", {}]
/* Pop specified data */
db.pop("just.a.long.array"); // => [2, null, 3, "str1"]
/* Shift specified data */
db.shift("just.a.long.array"); // => [null, 3, "str1"]
/* Unshift specified data */
db.unshift("just.a.long.array", 5); // => [5, null, 3, "str1"]
/* Mapping data */
db.map(); // => { just: { a: { long: [Object] } } }
/* Deleting a value in the database */
db.delete("just.a.long"); // => { just: { a: { long: [Object] } } } has been deleted
/* Destroying database */
db.destroy(); // true
Copyright © 2021 Barış DEMİRCİ.
Distributed under the MIT License. See LICENSE
for more information.
Fell free to use GitHub's features.
git checkout -b feature/my-feature
)npm run format && npm run lint
)git commit -m 'my awesome feature my-feature'
)git push origin feature/my-feature
)Give a ⭐️ if this project helped you!
FAQs
[![stars](https://img.shields.io/github/stars/barbarbar338/bookman?color=yellow&logo=github&style=for-the-badge)](https://github.com/barbarbar338/bookman) [![license](https://img.shields.io/github/license/barbarbar338/bookman?logo=github&style=for-the-ba
The npm package bookman receives a total of 86 weekly downloads. As such, bookman popularity was classified as not popular.
We found that bookman demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.