New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

alga-js

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alga-js - npm Package Compare versions

Comparing version 0.1.0-stone-2 to 0.1.0-stone-3

14

lib/time/time.cjs.js

@@ -61,9 +61,7 @@ 'use strict';

if (Number(compareDate) <= 28) {
if (nowDate.getDate() === valDate.getDate()) {
if (nowDate.getHours() === valDate.getHours()) {
if (nowDate.getMinutes() === valDate.getMinutes()) {
if (nowDate.getSeconds() !== valDate.getSeconds()) {
var subSecondVal = Number(valDate.getSeconds()) - Number(nowDate.getSeconds());
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subSecondVal, 'second');
}
if (Number(nowDate.getDate()) === Number(valDate.getDate())) {
if (Number(nowDate.getHours()) === Number(valDate.getHours())) {
if (Number(nowDate.getMinutes()) === Number(valDate.getMinutes())) {
var subSecondVal = Number(valDate.getSeconds()) - Number(nowDate.getSeconds());
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subSecondVal, 'second');
}

@@ -77,3 +75,3 @@ else {

var subHourVal = Number(valDate.getHours()) - Number(nowDate.getHours());
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subHourVal, 'day');
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subHourVal, 'hour');
}

@@ -80,0 +78,0 @@ }

@@ -57,9 +57,7 @@ var modeDateHelper = function (date, mode) {

if (Number(compareDate) <= 28) {
if (nowDate.getDate() === valDate.getDate()) {
if (nowDate.getHours() === valDate.getHours()) {
if (nowDate.getMinutes() === valDate.getMinutes()) {
if (nowDate.getSeconds() !== valDate.getSeconds()) {
var subSecondVal = Number(valDate.getSeconds()) - Number(nowDate.getSeconds());
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subSecondVal, 'second');
}
if (Number(nowDate.getDate()) === Number(valDate.getDate())) {
if (Number(nowDate.getHours()) === Number(valDate.getHours())) {
if (Number(nowDate.getMinutes()) === Number(valDate.getMinutes())) {
var subSecondVal = Number(valDate.getSeconds()) - Number(nowDate.getSeconds());
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subSecondVal, 'second');
}

@@ -73,3 +71,3 @@ else {

var subHourVal = Number(valDate.getHours()) - Number(nowDate.getHours());
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subHourVal, 'day');
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subHourVal, 'hour');
}

@@ -76,0 +74,0 @@ }

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

var time=function(e){"use strict";var t=function(e,t){var r=new Date(e).toJSON().split(/T|\./);return"date"===t?Number(r[0].replaceAll("-","")):"time"===t?Number(r[1].replaceAll(":","")):new Date(e).valueOf()},r=function(e,r,a){void 0===a&&(a="dateTime");var n=t(e,a),u=t(r,a),o=Number(u)-Number(n);return Math.floor(o/864e5)},a=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.relative=function(e,n,u,o,i){void 0===n&&(n="utc"),void 0===u&&(u="en-US"),void 0===o&&(o={}),void 0===i&&(i="new");var m=new Date,l=new Date(e);"utc"!==n&&(l=new Date(new Date(e).toJSON()));var v="".concat(i),c=r(l,m);if(Number(c)<=365)if(Number(c)<=28)if(m.getDate()===l.getDate())if(m.getHours()===l.getHours())if(m.getMinutes()===l.getMinutes()){if(m.getSeconds()!==l.getSeconds()){var g=Number(l.getSeconds())-Number(m.getSeconds());v=new Intl.RelativeTimeFormat(u,o).format(g,"second")}}else{var s=Number(l.getMinutes())-Number(m.getMinutes());v=new Intl.RelativeTimeFormat(u,o).format(s,"minute")}else{var f=Number(l.getHours())-Number(m.getHours());v=new Intl.RelativeTimeFormat(u,o).format(f,"day")}else c=function(e,r,a){void 0===a&&(a="dateTime");var n=!1;return t(e,a)<t(r,a)&&(n=!0),n}(l,m)?Number("-"+r(l,m)):r(l,m),v=new Intl.RelativeTimeFormat(u,o).format(c,"day");else{var N=Number("".concat(l.getFullYear()).concat(a(l.getMonth())))-Number("".concat(m.getFullYear()).concat(a(m.getMonth())));v=new Intl.RelativeTimeFormat(u,o).format(N,"month")}else{var b=Number(l.getFullYear())-Number(m.getFullYear());v=new Intl.RelativeTimeFormat(u,o).format(b,"year")}return v},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var time=function(e){"use strict";var t=function(e,t){var r=new Date(e).toJSON().split(/T|\./);return"date"===t?Number(r[0].replaceAll("-","")):"time"===t?Number(r[1].replaceAll(":","")):new Date(e).valueOf()},r=function(e,r,a){void 0===a&&(a="dateTime");var n=t(e,a),u=t(r,a),m=Number(u)-Number(n);return Math.floor(m/864e5)},a=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.relative=function(e,n,u,m,o){void 0===n&&(n="utc"),void 0===u&&(u="en-US"),void 0===m&&(m={}),void 0===o&&(o="new");var i=new Date,l=new Date(e);"utc"!==n&&(l=new Date(new Date(e).toJSON()));var v="".concat(o),c=r(l,i);if(Number(c)<=365)if(Number(c)<=28)if(Number(i.getDate())===Number(l.getDate()))if(Number(i.getHours())===Number(l.getHours()))if(Number(i.getMinutes())===Number(l.getMinutes())){var N=Number(l.getSeconds())-Number(i.getSeconds());v=new Intl.RelativeTimeFormat(u,m).format(N,"second")}else{var b=Number(l.getMinutes())-Number(i.getMinutes());v=new Intl.RelativeTimeFormat(u,m).format(b,"minute")}else{var f=Number(l.getHours())-Number(i.getHours());v=new Intl.RelativeTimeFormat(u,m).format(f,"hour")}else c=function(e,r,a){void 0===a&&(a="dateTime");var n=!1;return t(e,a)<t(r,a)&&(n=!0),n}(l,i)?Number("-"+r(l,i)):r(l,i),v=new Intl.RelativeTimeFormat(u,m).format(c,"day");else{var g=Number("".concat(l.getFullYear()).concat(a(l.getMonth())))-Number("".concat(i.getFullYear()).concat(a(i.getMonth())));v=new Intl.RelativeTimeFormat(u,m).format(g,"month")}else{var s=Number(l.getFullYear())-Number(i.getFullYear());v=new Intl.RelativeTimeFormat(u,m).format(s,"year")}return v},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
{
"name": "alga-js",
"version": "0.1.0-stone-2",
"version": "0.1.0-stone-3",
"description": "Alga.js is a JavaScript helper to help build UI components by using any of modern web frameworks or libraries",

@@ -12,2 +12,4 @@ "module": "./dist/alga.min.js",

},
"./lib/*": "./lib/*.es.js",
"./lib/*.js": "./lib/*.js",
"./date": {

@@ -14,0 +16,0 @@ "import": "./lib/date/date.es.js",

@@ -16,9 +16,7 @@ import { isBefore } from '../date/isDate'

if(Number(compareDate) <= 28) {
if(nowDate.getDate() === valDate.getDate()) {
if(nowDate.getHours() === valDate.getHours()) {
if(nowDate.getMinutes() === valDate.getMinutes()) {
if(nowDate.getSeconds() !== valDate.getSeconds()) {
const subSecondVal = Number(valDate.getSeconds()) - Number(nowDate.getSeconds())
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subSecondVal, 'second')
}
if(Number(nowDate.getDate()) === Number(valDate.getDate())) {
if(Number(nowDate.getHours()) === Number(valDate.getHours())) {
if(Number(nowDate.getMinutes()) === Number(valDate.getMinutes())) {
const subSecondVal = Number(valDate.getSeconds()) - Number(nowDate.getSeconds())
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subSecondVal, 'second')
} else {

@@ -30,3 +28,3 @@ const subMinuteVal = Number(valDate.getMinutes()) - Number(nowDate.getMinutes())

const subHourVal = Number(valDate.getHours()) - Number(nowDate.getHours())
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subHourVal, 'day')
newTimeRelative = new Intl.RelativeTimeFormat(locale, options).format(subHourVal, 'hour')
}

@@ -33,0 +31,0 @@ } else {

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