Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
cherry3
Advanced tools
Readme
Using npm:
$ npm install cherry3
Using yarn:
$ yarn add cherry3
Using pnpm:
$ pnpm add cherry3
import { Model, Schema, Types } from 'cherry3';
/* const { Model, Schema, Types } = require('cherry3'); For CommonJS */
// Define a schema for a collection
const userSchema = Schema({
username: { type: Types.String, default: 'fivesobes' },
age: Types.Number,
email: { type: Types.String, default: "support@luppux.com" },
isAdmin: Types.Boolean,
interests: Types.Array,
balance: Types.Float,
date: Types.Date
});
// Create a model for the "users" collection
const UserModel = new Model('Users', userSchema);
// Example data
const userData = {
username: 'fivesobes',
age: 20,
email: 'support@luppux.com',
isAdmin: false,
interests: ['coding', 'reading', 'ertus-mom'],
};
(async () => {
// CRUD operations
try {
/* FIND USERS */
// Find multiple users with conditions
const users = await UserModel.find({ age: 20, isAdmin: false });
console.log(users);
} catch (error) {
console.error('Error performing CRUD operations:', error.message);
}
})();
import { Types } from 'cherry3';
Types.Number // Example => 5
Types.Object // Example => { test:"data text", test3: 5 }
Types.Date // Example => 1.03.2024
Types.String // Example => "test data text"
Types.Boolean // Example => true or false
Types.Array // Example => [ "five" , "so" , 5 ]
Cherry3 is licensed under the Apache License 2.0 License. See the LICENSE file for details.
FAQs
Cherry3 is a SQlite object modeling tool designed to work in an asynchronous environment.
The npm package cherry3 receives a total of 56 weekly downloads. As such, cherry3 popularity was classified as not popular.
We found that cherry3 demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
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.