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

wasm-ast-types

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wasm-ast-types - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

5

main/wasm.js

@@ -247,2 +247,3 @@ "use strict";

var camelize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var keys = Object.keys((_jsonschema$propertie3 = jsonschema.properties) !== null && _jsonschema$propertie3 !== void 0 ? _jsonschema$propertie3 : {});

@@ -255,6 +256,6 @@ if (!keys.length) return;

return t.tsPropertySignature(t.identifier(prop), t.tsTypeAnnotation(type));
return t.tsPropertySignature(camelize ? t.identifier((0, _case.camel)(prop)) : t.identifier(prop), t.tsTypeAnnotation(type));
});
var params = keys.map(function (prop) {
return t.objectProperty(t.identifier(prop), t.identifier(prop), false, true);
return t.objectProperty(camelize ? t.identifier((0, _case.camel)(prop)) : t.identifier(prop), camelize ? t.identifier((0, _case.camel)(prop)) : t.identifier(prop), false, true);
});

@@ -261,0 +262,0 @@ var obj = t.objectPattern((0, _toConsumableArray2["default"])(params));

6

module/wasm.js

@@ -190,3 +190,3 @@ import * as t from '@babel/types';

};
export const createTypedObjectParams = jsonschema => {
export const createTypedObjectParams = (jsonschema, camelize = true) => {
const keys = Object.keys(jsonschema.properties ?? {});

@@ -199,6 +199,6 @@ if (!keys.length) return;

} = getPropertyType(jsonschema, prop);
return t.tsPropertySignature(t.identifier(prop), t.tsTypeAnnotation(type));
return t.tsPropertySignature(camelize ? t.identifier(camel(prop)) : t.identifier(prop), t.tsTypeAnnotation(type));
});
const params = keys.map(prop => {
return t.objectProperty(t.identifier(prop), t.identifier(prop), false, true);
return t.objectProperty(camelize ? t.identifier(camel(prop)) : t.identifier(prop), camelize ? t.identifier(camel(prop)) : t.identifier(prop), false, true);
});

@@ -205,0 +205,0 @@ const obj = t.objectPattern([...params]);

{
"name": "wasm-ast-types",
"version": "0.0.9",
"version": "0.0.10",
"description": "CosmWasm TypeScript AST generation",

@@ -88,3 +88,3 @@ "author": "Dan Lynch <pyramation@gmail.com>",

},
"gitHead": "1d8886f8c415d2123010166ee491f88935c8ec1b"
"gitHead": "c68977bec42dfc57a0272965fba25660ebc04498"
}
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