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

@anselan/maprange

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anselan/maprange - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

16

dist/index.test.js

@@ -47,2 +47,18 @@ "use strict";

});
describe('clamping', () => {
test('200% clamped at 100%', () => {
const value = 2;
expect(_1.default(value, 0, 1, 0, 100, true)).toBe(100);
});
test('clamp the bottom end', () => {
const value = -10;
expect(_1.default(value, -1, 1, -1000, 1000, true)).toBe(-1000);
});
});
// describe('default input range [0,1]', () => {
// test('halfway', () => {
// const value = 0.5;
// expect(remap(value, 0, 100)).toBe(50)
// })
// })
//# sourceMappingURL=index.test.js.map

2

package.json
{
"name": "@anselan/maprange",
"version": "0.2.1",
"version": "0.2.2",
"description": "Map values from one range to another",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -47,2 +47,22 @@ import remap from '.'

})
})
})
describe('clamping', () => {
test('200% clamped at 100%', () => {
const value = 2;
expect(remap(value, 0, 1, 0, 100, true)).toBe(100)
})
test('clamp the bottom end', () => {
const value = -10;
expect(remap(value, -1, 1, -1000, 1000, true)).toBe(-1000)
})
})
// describe('default input range [0,1]', () => {
// test('halfway', () => {
// const value = 0.5;
// expect(remap(value, 0, 100)).toBe(50)
// })
// })

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