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

convert-units

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-units - npm Package Compare versions

Comparing version 0.0.5 to 0.0.7

2

lib/definitions/volume.js

@@ -29,3 +29,3 @@ var metric

}
, tbsp: {
, Tbs: {
name: {

@@ -32,0 +32,0 @@ singular: 'Tablespoon'

{
"name": "convert-units",
"version": "0.0.5",
"version": "0.0.7",
"description": "Convert between quantities in different units",

@@ -5,0 +5,0 @@ "main": "lib",

@@ -7,3 +7,3 @@ var convert = require('../lib')

var actual = convert().from('ltr').possibilities()
, expected = [ 'ml', 'ltr', 'tsp', 'tbsp', 'fl-oz', 'cup', 'pnt', 'qt', 'gal' ];
, expected = [ 'ml', 'ltr', 'tsp', 'Tbs', 'fl-oz', 'cup', 'pnt', 'qt', 'gal' ];
assert.deepEqual(actual, expected);

@@ -32,3 +32,3 @@ };

var actual = convert().possibilities('volume')
, expected = [ 'ml', 'ltr', 'tsp', 'tbsp', 'fl-oz', 'cup', 'pnt', 'qt', 'gal' ];
, expected = [ 'ml', 'ltr', 'tsp', 'Tbs', 'fl-oz', 'cup', 'pnt', 'qt', 'gal' ];
assert.deepEqual(actual, expected);

@@ -35,0 +35,0 @@ };

@@ -28,11 +28,11 @@ var convert = require('../lib')

tests['fl-oz to tbsp'] = function () {
assert.strictEqual( convert(4).from('fl-oz').to('tbsp') , 8);
assert.strictEqual( convert(4).from('fl-oz').to('Tbs') , 8);
};
tests['tbsp to fl-oz'] = function () {
assert.strictEqual( convert(2).from('tbsp').to('fl-oz') , 1);
tests['Tbs to fl-oz'] = function () {
assert.strictEqual( convert(2).from('Tbs').to('fl-oz') , 1);
};
tests['tbsp to tbsp'] = function () {
assert.strictEqual( convert(140).from('tbsp').to('tbsp') , 140);
tests['Tbs to Tbs'] = function () {
assert.strictEqual( convert(140).from('Tbs').to('Tbs') , 140);
};

@@ -39,0 +39,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