New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

convex-helpers

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convex-helpers - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

29

dist/server/index.js

@@ -1,1 +0,28 @@

"use strict";
import { defineTable } from "convex/server";
import { v } from "convex/values";
/**
*
* @param name The table name. This should also be used in defineSchema.
* @param fields Table fields, as you'd pass to defineTable.
* @returns Object of shape: {
* table: from defineTable,
* withSystemFields: Input fields with _id and _creationTime,
* withoutSystemFields: The fields passed in,
* doc: a validator for the table doc as a v.object(). This is useful when
* defining arguments to actions where you're passing whole documents.
* }
*/
export function Table(name, fields) {
const table = defineTable(fields);
const withSystemFields = {
...fields,
_id: v.id(name),
_creationTime: v.number(),
};
return {
table,
doc: v.object(withSystemFields),
withoutSystemFields: fields,
withSystemFields,
};
}

2

package.json
{
"name": "convex-helpers",
"version": "0.1.4",
"version": "0.1.5",
"description": "A collection of useful code to complement the official convex package.",

@@ -5,0 +5,0 @@ "exports": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc