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

chronokinesis

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chronokinesis - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

28

dist/chronokinesis.js

@@ -118,8 +118,2 @@ var chronokinesis = (function (exports) {

/**
* Inspired by Time keeper - EEasy testing of time-dependent code.
*
* Veselin Todorov <hi@vesln.com>
* MIT License.
*/
var NativeDate = Date;

@@ -172,2 +166,6 @@ var nativeGetTimezoneOffset = NativeDate.prototype.getTimezoneOffset;

freezedAt = instantiate(Date, args);
if (isNaN(freezedAt)) {
reset();
throw new TypeError('Chronokinesis cannot freeze to invalid date, check your arguments. Chronokinesis is reset');
}
return freezedAt;

@@ -184,2 +182,6 @@ }

var travelToDate = instantiate(Date, args);
if (isNaN(travelToDate)) {
reset();
throw new TypeError('Chronokinesis cannot travel to invalid date, check your arguments. Chronokinesis is reset');
}
traveledTo = travelToDate.getTime();

@@ -299,16 +301,4 @@ started = NativeDate.now();

}
var chronokinesis_1 = chronokinesis.freeze;
var chronokinesis_2 = chronokinesis.defrost;
var chronokinesis_3 = chronokinesis.travel;
var chronokinesis_4 = chronokinesis.reset;
var chronokinesis_5 = chronokinesis.isKeepingTime;
var chronokinesis_6 = chronokinesis.timezone;
exports["default"] = chronokinesis;
exports.defrost = chronokinesis_2;
exports.freeze = chronokinesis_1;
exports.isKeepingTime = chronokinesis_5;
exports.reset = chronokinesis_4;
exports.timezone = chronokinesis_6;
exports.travel = chronokinesis_3;
exports.default = chronokinesis;

@@ -315,0 +305,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -115,8 +115,2 @@ function ownKeys(object, enumerableOnly) {

/**
* Inspired by Time keeper - EEasy testing of time-dependent code.
*
* Veselin Todorov <hi@vesln.com>
* MIT License.
*/
var NativeDate = Date;

@@ -169,2 +163,6 @@ var nativeGetTimezoneOffset = NativeDate.prototype.getTimezoneOffset;

freezedAt = instantiate(Date, args);
if (isNaN(freezedAt)) {
reset();
throw new TypeError('Chronokinesis cannot freeze to invalid date, check your arguments. Chronokinesis is reset');
}
return freezedAt;

@@ -181,2 +179,6 @@ }

var travelToDate = instantiate(Date, args);
if (isNaN(travelToDate)) {
reset();
throw new TypeError('Chronokinesis cannot travel to invalid date, check your arguments. Chronokinesis is reset');
}
traveledTo = travelToDate.getTime();

@@ -296,9 +298,3 @@ started = NativeDate.now();

}
var chronokinesis_1 = chronokinesis.freeze;
var chronokinesis_2 = chronokinesis.defrost;
var chronokinesis_3 = chronokinesis.travel;
var chronokinesis_4 = chronokinesis.reset;
var chronokinesis_5 = chronokinesis.isKeepingTime;
var chronokinesis_6 = chronokinesis.timezone;
export { chronokinesis as default, chronokinesis_2 as defrost, chronokinesis_1 as freeze, chronokinesis_5 as isKeepingTime, chronokinesis_4 as reset, chronokinesis_6 as timezone, chronokinesis_3 as travel };
export { chronokinesis as default };

@@ -62,2 +62,6 @@ /**

freezedAt = instantiate(Date, args);
if (isNaN(freezedAt)) {
reset();
throw new TypeError('Chronokinesis cannot freeze to invalid date, check your arguments. Chronokinesis is reset');
}
return freezedAt;

@@ -72,4 +76,7 @@ }

useFakeDate();
const travelToDate = instantiate(Date, args);
if (isNaN(travelToDate)) {
reset();
throw new TypeError('Chronokinesis cannot travel to invalid date, check your arguments. Chronokinesis is reset');
}

@@ -76,0 +83,0 @@ traveledTo = travelToDate.getTime();

{
"name": "chronokinesis",
"version": "4.0.0",
"version": "4.0.1",
"description": "Module for testing time-dependent code",

@@ -17,11 +17,10 @@ "author": {

},
"engines": {
"node": ">=12"
},
"scripts": {
"toc": "node generate-api-toc.js",
"test": "mocha",
"posttest": "eslint . --cache && npm run prepare",
"test:lcov": "c8 -r lcov npm t",
"prepare": "npm run toc && rollup -c"
"lint": "eslint . --cache",
"test:lcov": "c8 -r lcov mocha && npm run lint",
"posttest": "npm run lint && npm run dist",
"prepublishOnly": "npm run dist",
"dist": "npm run toc && rollup -c"
},

@@ -31,5 +30,3 @@ "files": [

"dist/chronokinesis.js",
"dist/index.es.js",
"LICENSE",
"README.md"
"dist/index.es.js"
],

@@ -54,5 +51,6 @@ "bugs": {

"@babel/preset-env": "^7.12.1",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^23.0.4",
"c8": "^7.12.0",
"chai": "^4.3.7",
"coveralls": "^3.1.0",
"eslint": "^8.29.0",

@@ -63,6 +61,4 @@ "lodash.clonedeep": "^4.5.0",

"moment": "^2.29.1",
"rollup": "^2.56.3",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0"
"rollup": "^3.7.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