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

@opendesign/octopus-common

Package Overview
Dependencies
Maintainers
15
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opendesign/octopus-common - npm Package Compare versions

Comparing version 3.0.0-rc.31 to 3.0.0-rc.32

dist/postprocessors/normalize-text/index.d.ts

5

dist/utils/as.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asFiniteNumber = exports.asNumber = exports.asString = exports.asBoolean = exports.asArray = void 0;
const common_1 = require("./common");
function asArray(value, defaultValue) {

@@ -46,6 +45,6 @@ if (Array.isArray(value)) {

function asFiniteNumber(value, defaultValue) {
if ((0, common_1.isFiniteNumber)(value)) {
if (typeof value === 'number' && Number.isFinite(value)) {
return value;
}
if ((0, common_1.isFiniteNumber)(defaultValue)) {
if (typeof defaultValue === 'number' && Number.isFinite(defaultValue)) {
return defaultValue;

@@ -52,0 +51,0 @@ }

4

dist/utils/common.d.ts

@@ -1,7 +0,5 @@

import type { GetPromiseValue } from './utility-types';
import type { GetPromiseValue } from '../utility-types';
export declare function JSONFromTypedArray(typedArray: Uint8Array): unknown;
export declare function deepInspect(value: unknown): string;
export declare function isObject(anyValue: unknown): anyValue is Record<string, unknown>;
export declare function isFiniteNumber(value: unknown): value is number;
export declare function isString(value: unknown): value is string;
export declare function getMapped<T, U>(value: unknown, map: {

@@ -8,0 +6,0 @@ [key: string]: T;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.uniqueIdFactory = exports.compareStrings = exports.push = exports.keys = exports.traverseAndFind = exports.getConvertedAsync = exports.getConverted = exports.getPresentProps = exports.getMapped = exports.isString = exports.isFiniteNumber = exports.isObject = exports.deepInspect = exports.JSONFromTypedArray = void 0;
exports.uniqueIdFactory = exports.compareStrings = exports.push = exports.keys = exports.traverseAndFind = exports.getConvertedAsync = exports.getConverted = exports.getPresentProps = exports.getMapped = exports.isObject = exports.deepInspect = exports.JSONFromTypedArray = void 0;
const util_1 = __importDefault(require("util"));

@@ -22,10 +22,2 @@ const isObjectLike_1 = __importDefault(require("lodash/isObjectLike"));

exports.isObject = isObject;
function isFiniteNumber(value) {
return Number.isFinite(value);
}
exports.isFiniteNumber = isFiniteNumber;
function isString(value) {
return typeof value === 'string';
}
exports.isString = isString;
function getMapped(value, map, defaultValue) {

@@ -32,0 +24,0 @@ if (typeof value !== 'string')

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

describe('mod', () => {
function testExample(N, modulo, result) {
function testModulo(N, modulo, result) {
test(`mod(${N}, ${modulo}) to be ${result}`, () => {

@@ -22,6 +22,6 @@ expect((0, math_1.mod)(N, modulo)).toBe(result);

];
examples.forEach((example) => testExample(...example));
examples.forEach((example) => testModulo(...example));
});
describe('sin', () => {
function testExample(N, result) {
function testTan(N, result) {
test(`sin(${N}) to be ${result}`, () => {

@@ -41,6 +41,6 @@ expect((0, math_1.sin)(N)).toBe(result);

];
examples.forEach((example) => testExample(...example));
examples.forEach((example) => testTan(...example));
});
describe('cos', () => {
function testExample(N, result) {
function testTan(N, result) {
test(`cos(${N}) to be ${result}`, () => {

@@ -61,6 +61,6 @@ expect((0, math_1.cos)(N)).toBe(result);

];
examples.forEach((example) => testExample(...example));
examples.forEach((example) => testTan(...example));
});
describe('tan', () => {
function testExample(N, result) {
function testTan(N, result) {
test(`tan(${N}) to be ${result}`, () => {

@@ -80,6 +80,6 @@ expect((0, math_1.tan)(N)).toBe(result);

];
examples.forEach((example) => testExample(...example));
examples.forEach((example) => testTan(...example));
});
describe('lerp', () => {
function testExample(x, y, ratio, result) {
function testTan(x, y, ratio, result) {
test(`lerp(${x}, ${y}, ${ratio}) to be ${result}`, () => {

@@ -97,6 +97,6 @@ expect((0, math_1.lerp)(x, y, ratio)).toBe(result);

];
examples.forEach((example) => testExample(...example));
examples.forEach((example) => testTan(...example));
});
describe('invLerp', () => {
function testExample(x, y, ratio, result) {
function testTan(x, y, ratio, result) {
test(`invLerp(${x}, ${y}, ${ratio}) to be ${result}`, () => {

@@ -114,3 +114,3 @@ expect((0, math_1.invLerp)(x, y, ratio)).toBe(result);

];
examples.forEach((example) => testExample(...example));
examples.forEach((example) => testTan(...example));
});
{
"name": "@opendesign/octopus-common",
"version": "3.0.0-rc.31",
"version": "3.0.0-rc.32",
"description": "General utility functions for Octopus 3 common cases.",
"license": "Apache-2.0",
"main": "dist/index.js",
"scripts": {

@@ -31,3 +30,3 @@ "build": "tsc --build ./tsconfig.json",

"ts-node": "10.4.0",
"typescript": "4.6.4"
"typescript": "4.7.4"
},

@@ -34,0 +33,0 @@ "files": [

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