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

es-abstract

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-abstract - npm Package Compare versions

Comparing version 1.8.1 to 1.8.2

5

CHANGELOG.md

@@ -0,1 +1,6 @@

1.8.2 / 2017-09-03
=================
* [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27)
* [Dev Deps] update `eslint`
1.8.1 / 2017-08-30

@@ -2,0 +7,0 @@ =================

2

es2015.js

@@ -67,3 +67,3 @@ 'use strict';

ToNumber: function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : toPrimitive(argument, 'number');
var value = isPrimitive(argument) ? argument : toPrimitive(argument, Number);
if (typeof value === 'symbol') {

@@ -70,0 +70,0 @@ throw new TypeError('Cannot convert a Symbol value to a number');

{
"name": "es-abstract",
"version": "1.8.1",
"version": "1.8.2",
"author": {

@@ -58,3 +58,3 @@ "name": "Jordan Harband",

"editorconfig-tools": "^0.1.1",
"eslint": "^4.5.0",
"eslint": "^4.6.1",
"foreach": "^2.0.5",

@@ -61,0 +61,0 @@ "jscs": "^3.0.7",

@@ -53,2 +53,10 @@ 'use strict';

t.test('dates', function (st) {
var invalid = new Date(NaN);
st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString');
var now = new Date();
st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString');
st.end();
});
t.end();

@@ -167,2 +175,10 @@ });

t.test('dates', function (st) {
var invalid = new Date(NaN);
st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN');
var now = Date.now();
st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp');
st.end();
});
t.end();

@@ -169,0 +185,0 @@ });

@@ -53,2 +53,10 @@ 'use strict';

t.test('dates', function (st) {
var invalid = new Date(NaN);
st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString');
var now = new Date();
st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString');
st.end();
});
t.end();

@@ -167,2 +175,10 @@ });

t.test('dates', function (st) {
var invalid = new Date(NaN);
st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN');
var now = Date.now();
st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp');
st.end();
});
t.end();

@@ -169,0 +185,0 @@ });

@@ -53,2 +53,10 @@ 'use strict';

t.test('dates', function (st) {
var invalid = new Date(NaN);
st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString');
var now = new Date();
st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString');
st.end();
});
t.end();

@@ -167,2 +175,10 @@ });

t.test('dates', function (st) {
var invalid = new Date(NaN);
st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN');
var now = Date.now();
st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp');
st.end();
});
t.end();

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