Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

knex-types

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knex-types - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

13

main.js

@@ -102,3 +102,3 @@ "use strict";

output.write(` ${x.column}: ${type};\n`);
output.write(` ${sanitize(x.column)}: ${type};\n`);

@@ -184,2 +184,13 @@ if (!(columns[i + 1] && columns[i + 1].table === x.table)) {

}
}
/**
* Wraps the target property identifier into quotes in case it contains any
* invalid characters.
*
* @see https://developer.mozilla.org/docs/Glossary/Identifier
*/
function sanitize(name) {
return /^[a-zA-Z$_][a-zA-Z$_0-9]*$/.test(name) ? name : JSON.stringify(name);
}

2

package.json
{
"name": "knex-types",
"version": "0.3.1",
"version": "0.3.2",
"description": "Generates TypeScript definitions (types) from a (PostgreSQL) database schema.",

@@ -5,0 +5,0 @@ "keywords": [

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