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

@hypermode/modus-sdk-as

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hypermode/modus-sdk-as - npm Package Compare versions

Comparing version 0.14.2 to 0.15.0-alpha.1

assembly/dynamicmap.ts

8

assembly/index.ts

@@ -33,1 +33,9 @@ /*

export { auth };
import * as neo4j from "./neo4j";
export { neo4j };
import * as utils from "./utils";
export { utils };
export * from "./dynamicmap";

16

assembly/vectors.ts

@@ -240,5 +240,5 @@ /*

*/
export function magnitude<T extends number>(a: T[]): f64 {
export function magnitude<T extends number>(a: T[]): T {
checkValidArray(a);
return sqrt<f64>(dot(a, a));
return sqrt<f64>(dot(a, a)) as T;
}

@@ -252,8 +252,8 @@

*/
export function normalize<T extends number>(a: T[]): f64[] {
export function normalize<T extends number>(a: T[]): T[] {
checkValidArray(a);
const magnitudeValue = magnitude(a);
const result: f64[] = new Array<f64>(a.length);
const result: T[] = new Array<T>(a.length);
for (let i = 0; i < a.length; i++) {
result[i] = (a[i] as f64) / magnitudeValue;
result[i] = ((a[i] as T) / magnitudeValue) as T;
}

@@ -299,5 +299,5 @@ return result;

*/
export function mean<T extends number>(a: T[]): f64 {
export function mean<T extends number>(a: T[]): T {
checkValidArray(a);
return f64(sum(a)) / f64(a.length);
return (sum(a) / a.length) as T;
}

@@ -377,5 +377,5 @@

for (let i = 0; i < a.length; i++) {
sum += f64(a[i] - b[i]) ** 2;
sum += (a[i] - b[i]) ** 2;
}
return sqrt<f64>(sum);
}
{
"name": "@hypermode/modus-sdk-as",
"version": "0.14.2",
"version": "0.15.0-alpha.1",
"repository": "github:hypermodeinc/modus",

@@ -29,12 +29,12 @@ "description": "Modus SDK for AssemblyScript",

"devDependencies": {
"@eslint/js": "^9.15.0",
"@eslint/js": "^9.16.0",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.10.0",
"@types/node": "^22.10.1",
"as-test": "^0.3.5",
"assemblyscript": "^0.27.31",
"assemblyscript-prettier": "^3.0.1",
"eslint": "^9.15.0",
"prettier": "^3.4.1",
"eslint": "^9.16.0",
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0",
"typescript-eslint": "^8.17.0",
"visitor-as": "^0.11.4"

@@ -41,0 +41,0 @@ },

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