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

karl-common-util

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karl-common-util - npm Package Compare versions

Comparing version 1.3.3 to 1.3.5

20

dist/date/index.js

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

var month = this.getMonth() + 1;
var isLeapYear = this.getFullYear();
var isLeapYear = this.isLeapYear();
switch (month) {

@@ -81,2 +81,20 @@ case 1:

};
}
if (!Date.prototype.toMonday) {
Date.prototype.toMonday = function () {
var n = this.getDay();
n = n === 0 ? 7 : n;
var newDate = this.add({ day: -n + 1 });
return newDate;
};
}
if (!Date.prototype.toSunday) {
Date.prototype.toSunday = function () {
var n = this.getDay();
n = n === 0 ? 7 : n;
var newDate = this.add({ day: -n + 7 });
return newDate;
};
}

@@ -38,3 +38,7 @@ "use strict";

}, timeout);
headers = Object.assign({}, { 'Content-Type': contentType }, headers);
headers = Object.assign({}, {
"Content-Type": contentType,
"Cache-Control": "no-cache",
"Pragma": "no-cache"
}, headers);
json = {

@@ -41,0 +45,0 @@ method: method,

2

package.json
{
"name": "karl-common-util",
"version": "1.3.3",
"version": "1.3.5",
"description": "karl common lib for client and server",

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

@@ -44,3 +44,3 @@ if (!Date.prototype.add) {

let month = this.getMonth() + 1
let isLeapYear = this.getFullYear()
let isLeapYear = this.isLeapYear()
switch (month) {

@@ -67,1 +67,19 @@ case 1:

}
if (!Date.prototype.toMonday) {
Date.prototype.toMonday = function () {
let n = this.getDay()
n = n === 0 ? 7 : n
let newDate = this.add({day: -n + 1})
return newDate
}
}
if (!Date.prototype.toSunday) {
Date.prototype.toSunday = function () {
let n = this.getDay()
n = n === 0 ? 7 : n
let newDate = this.add({day: -n + 7})
return newDate
}
}

@@ -9,3 +9,5 @@ import "isomorphic-fetch"

}, timeout)
headers = Object.assign({}, {'Content-Type': contentType}, headers)
headers = Object.assign({}, {
"Content-Type": contentType,
}, headers)
let json = {

@@ -56,3 +58,3 @@ method: method,

//结果类型不为json(例如nginx直接返回404错误)
reject({status: status, message: e})
reject({status: status, message: responese})
return

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