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

ember-moment

Package Overview
Dependencies
Maintainers
0
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-moment - npm Package Compare versions

Comparing version 10.0.0 to 10.0.1

addon-main.cjs

2

dist/_app_/helpers/-base.js

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

export { default } from "ember-moment/helpers/-base.js";
export { default } from "ember-moment/helpers/-base";

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

export { default } from "ember-moment/helpers/is-after.js";
export { default } from "ember-moment/helpers/is-after";

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

export { default } from "ember-moment/helpers/is-before.js";
export { default } from "ember-moment/helpers/is-before";

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

export { default } from "ember-moment/helpers/is-between.js";
export { default } from "ember-moment/helpers/is-between";

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

export { default } from "ember-moment/helpers/is-same-or-after.js";
export { default } from "ember-moment/helpers/is-same-or-after";

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

export { default } from "ember-moment/helpers/is-same-or-before.js";
export { default } from "ember-moment/helpers/is-same-or-before";

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

export { default } from "ember-moment/helpers/is-same.js";
export { default } from "ember-moment/helpers/is-same";

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

export { default } from "ember-moment/helpers/moment-add.js";
export { default } from "ember-moment/helpers/moment-add";

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

export { default } from "ember-moment/helpers/moment-calendar.js";
export { default } from "ember-moment/helpers/moment-calendar";

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

export { default } from "ember-moment/helpers/moment-diff.js";
export { default } from "ember-moment/helpers/moment-diff";

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

export { default } from "ember-moment/helpers/moment-duration.js";
export { default } from "ember-moment/helpers/moment-duration";

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

export { default } from "ember-moment/helpers/moment-format.js";
export { default } from "ember-moment/helpers/moment-format";

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

export { default } from "ember-moment/helpers/moment-from-now.js";
export { default } from "ember-moment/helpers/moment-from-now";

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

export { default } from "ember-moment/helpers/moment-from.js";
export { default } from "ember-moment/helpers/moment-from";

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

export { default } from "ember-moment/helpers/moment-subtract.js";
export { default } from "ember-moment/helpers/moment-subtract";

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

export { default } from "ember-moment/helpers/moment-to-date.js";
export { default } from "ember-moment/helpers/moment-to-date";

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

export { default } from "ember-moment/helpers/moment-to-now.js";
export { default } from "ember-moment/helpers/moment-to-now";

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

export { default } from "ember-moment/helpers/moment-to.js";
export { default } from "ember-moment/helpers/moment-to";

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

export { default } from "ember-moment/helpers/moment.js";
export { default } from "ember-moment/helpers/moment";

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

export { default } from "ember-moment/helpers/now.js";
export { default } from "ember-moment/helpers/now";

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

export { default } from "ember-moment/helpers/unix.js";
export { default } from "ember-moment/helpers/unix";

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

export { default } from "ember-moment/helpers/utc.js";
export { default } from "ember-moment/helpers/utc";

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

export { default } from "ember-moment/services/moment.js";
export { default } from "ember-moment/services/moment";

@@ -6,10 +6,9 @@ import { run } from '@ember/runloop';

// eslint-disable-next-line ember/no-classic-classes
var BaseHelper = Helper.extend({
moment: inject(),
disableInterval: false,
get globalAllowEmpty() {
return this.moment.__config__.allowEmpty;
},
supportsGlobalAllowEmpty: true,

@@ -20,3 +19,2 @@ // eslint-disable-next-line ember/no-observers

}),
compute(value, {

@@ -28,5 +26,3 @@ interval

}
this.clearTimer();
if (interval) {

@@ -43,3 +39,2 @@ /*

},
morphMoment(time, {

@@ -52,26 +47,20 @@ locale,

timeZone = timeZone || momentService.timeZone;
if (locale && time.locale) {
time = time.locale(locale);
}
if (timeZone && time.tz) {
time = time.tz(timeZone);
}
return time;
},
clearTimer() {
clearTimeout(this.intervalTimer);
},
destroy() {
this.clearTimer();
this._super(...arguments);
}
});
export { BaseHelper as default };
//# sourceMappingURL=-base.js.map
import BaseHelper from './-base.js';
import { c as computeFn } from '../helper-compute-36ed98e8.js';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';
import '@ember/utils';
import { c as computeFn } from '../helper-compute-DXymp0II.js';

@@ -16,3 +11,2 @@ var isAfter = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +18,2 @@ const {

const comparisonArgs = [];
if (length === 1) {

@@ -32,3 +25,2 @@ comparisonArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -42,1 +34,2 @@ locale,

export { isAfter as default };
//# sourceMappingURL=is-after.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var isBefore = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +18,2 @@ const {

const comparisonArgs = [];
if (length === 1) {

@@ -32,3 +25,2 @@ comparisonArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -42,1 +34,2 @@ locale,

export { isBefore as default };
//# sourceMappingURL=is-before.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -17,21 +12,14 @@ var isBetween = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;
const _params = [].concat(params);
const {
length
} = params;
if (length < 2 || length > 3) {
throw new TypeError('ember-moment: Invalid Number of arguments, expected 2 or 3');
}
const args = [];
if (length > 2) {
args.push(_params.shift());
}
return this.morphMoment(moment.moment(...args), {

@@ -45,1 +33,2 @@ locale,

export { isBetween as default };
//# sourceMappingURL=is-between.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var isSameOrAfter = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +18,2 @@ const {

const comparisonArgs = [];
if (length === 1) {

@@ -32,3 +25,2 @@ comparisonArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -42,1 +34,2 @@ locale,

export { isSameOrAfter as default };
//# sourceMappingURL=is-same-or-after.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var isSameOrBefore = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +18,2 @@ const {

const comparisonArgs = [];
if (length === 1) {

@@ -32,3 +25,2 @@ comparisonArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -42,1 +34,2 @@ locale,

export { isSameOrBefore as default };
//# sourceMappingURL=is-same-or-before.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var isSame = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +18,2 @@ const {

const comparisonArgs = [];
if (length === 1) {

@@ -32,3 +25,2 @@ comparisonArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -42,1 +34,2 @@ locale,

export { isSame as default };
//# sourceMappingURL=is-same.js.map
import { typeOf } from '@ember/utils';
import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +12,2 @@ var momentAdd = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +19,2 @@ const {

const additionArgs = [];
if (length === 1) {

@@ -34,3 +28,2 @@ additionArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -44,1 +37,2 @@ locale,

export { momentAdd as default };
//# sourceMappingURL=moment-add.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -12,7 +7,5 @@ var momentCalendar = BaseHelper.extend({

this._super(...arguments);
if (!params || params && params.length > 3) {
throw new TypeError('ember-moment: Invalid Number of arguments, at most 3');
}
const moment = this.moment;

@@ -24,3 +17,4 @@ const {

const [date, referenceTime, formats] = params;
const mergedFormats = { ...formatHash,
const mergedFormats = {
...formatHash,
locale: null,

@@ -38,1 +32,2 @@ timeZone: null,

export { momentCalendar as default };
//# sourceMappingURL=moment-calendar.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -17,7 +12,5 @@ var momentDiff = BaseHelper.extend({

this._super(...arguments);
if (!params || params && params.length !== 2) {
throw new TypeError('ember-moment: Invalid Number of arguments, must be 2');
}
const moment = this.moment;

@@ -33,1 +26,2 @@ const [dateA, dateB] = params;

export { momentDiff as default };
//# sourceMappingURL=moment-diff.js.map
import BaseHelper from './-base.js';
import { momentOrMomentTimezone } from '../index.js';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';
import '@embroider/macros';

@@ -15,9 +10,6 @@ var momentDuration = BaseHelper.extend({

this._super(...arguments);
const momentService = this.moment;
if (!params || params && params.length > 2) {
throw new TypeError('ember-moment: Invalid Number of arguments, at most 2');
}
const result = momentService.moment(momentOrMomentTimezone.duration(...params));

@@ -29,5 +21,5 @@ return this.morphMoment(result._i, {

}
});
export { momentDuration as default };
//# sourceMappingURL=moment-duration.js.map
import { isEmpty } from '@ember/utils';
import { observer, get } from '@ember/object';
import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/service';

@@ -19,3 +16,2 @@ var momentFormat = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -25,13 +21,10 @@ const {

} = params;
if (length > 3) {
throw new TypeError('ember-moment: Invalid number of arguments, expected at most 3');
}
const args = [];
const formatArgs = []; // eslint-disable-next-line ember/no-get
const formatArgs = [];
// eslint-disable-next-line ember/no-get
const defaultFormat = get(this, 'moment.defaultFormat');
args.push(params[0]);
if (length === 1 && !isEmpty(defaultFormat)) {

@@ -45,3 +38,2 @@ formatArgs.push(defaultFormat);

}
return this.morphMoment(moment.moment(...args), {

@@ -55,1 +47,2 @@ locale,

export { momentFormat as default };
//# sourceMappingURL=moment-format.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var momentFromNow = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -27,1 +21,2 @@ return this.morphMoment(moment.moment(...params), {

export { momentFromNow as default };
//# sourceMappingURL=moment-from-now.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var momentFrom = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -27,1 +21,2 @@ return this.morphMoment(moment.moment(datetime), {

export { momentFrom as default };
//# sourceMappingURL=moment-from.js.map
import { typeOf } from '@ember/utils';
import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +12,2 @@ var momentSubtract = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -24,3 +19,2 @@ const {

const subtractionArgs = [];
if (length === 1) {

@@ -34,3 +28,2 @@ subtractionArgs.push(params[0]);

}
return this.morphMoment(moment.moment(...args), {

@@ -44,1 +37,2 @@ locale,

export { momentSubtract as default };
//# sourceMappingURL=moment-subtract.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var momentToDate = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -27,1 +21,2 @@ return this.morphMoment(moment.moment(), {

export { momentToDate as default };
//# sourceMappingURL=moment-to-date.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var momentToNow = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -28,1 +22,2 @@ const hide = hideAffix;

export { momentToNow as default };
//# sourceMappingURL=moment-to-now.js.map

@@ -1,8 +0,3 @@

import { c as computeFn } from '../helper-compute-36ed98e8.js';
import { c as computeFn } from '../helper-compute-DXymp0II.js';
import BaseHelper from './-base.js';
import '@ember/utils';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -16,3 +11,2 @@ var momentTo = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -27,1 +21,2 @@ return this.morphMoment(moment.moment(datetime), {

export { momentTo as default };
//# sourceMappingURL=moment-to.js.map
import BaseHelper from './-base.js';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -13,3 +9,2 @@ var moment = BaseHelper.extend({

this._super(...arguments);
const moment = this.moment;

@@ -21,5 +16,5 @@ return this.morphMoment(moment.moment(...params), {

}
});
export { moment as default };
//# sourceMappingURL=moment.js.map
import { momentOrMomentTimezone } from '../index.js';
import BaseHelper from './-base.js';
import '@embroider/macros';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -12,9 +7,8 @@ var now = BaseHelper.extend({

this._super(...arguments);
const momentService = this.moment;
return momentService.moment(momentOrMomentTimezone.now());
}
});
export { now as default };
//# sourceMappingURL=now.js.map
import { momentOrMomentTimezone } from '../index.js';
import BaseHelper from './-base.js';
import '@embroider/macros';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -12,8 +7,7 @@ var unix = BaseHelper.extend({

this._super(...arguments);
return this.moment.moment(momentOrMomentTimezone.unix(unixTimeStamp));
}
});
export { unix as default };
//# sourceMappingURL=unix.js.map
import { momentOrMomentTimezone } from '../index.js';
import BaseHelper from './-base.js';
import '@embroider/macros';
import '@ember/runloop';
import '@ember/component/helper';
import '@ember/object';
import '@ember/service';

@@ -12,8 +7,7 @@ var utc = BaseHelper.extend({

this._super(...arguments);
return this.moment.utc(momentOrMomentTimezone.utc(utcTime, format));
}
});
export { utc as default };
//# sourceMappingURL=utc.js.map
import { macroCondition, dependencySatisfies, importSync } from '@embroider/macros';
// This is the copy of moment or moment-timezone that ember-moment is using.
//

@@ -15,3 +16,2 @@ // Apps shouldn't need to use this, because they should pick one or the other

// this to get convenient access to whichever the app picked.
const momentOrMomentTimezone = (() => {

@@ -28,1 +28,2 @@ if (macroCondition(dependencySatisfies('moment-timezone', '*'))) {

export { momentOrMomentTimezone };
//# sourceMappingURL=index.js.map

@@ -6,4 +6,4 @@ import Service from '@ember/service';

import { computed, set, setProperties } from '@ember/object';
import '@embroider/macros';
// eslint-disable-next-line ember/no-classic-classes
var moment = Service.extend(Evented, {

@@ -14,9 +14,6 @@ _timeZone: null,

defaultFormat: null,
init() {
this._super();
this.defaultFormat = this.__config__.outputFormat;
},
__config__: computed(function () {

@@ -30,3 +27,2 @@ let config = getOwner(this).factoryFor('config:environment').class || {};

},
set(propertyKey, timeZone) {

@@ -38,17 +34,12 @@ if (!momentOrMomentTimezone.tz) {

}
set(this, '_timeZone', timeZone);
return timeZone;
}
}),
setLocale(locale) {
this.changeLocale(locale);
},
updateLocale(locale, localeOptions = {}) {
this.changeLocale(locale, localeOptions);
},
changeLocale(locale, localeOptions = {}) {

@@ -62,7 +53,5 @@ setProperties(this, {

},
setTimeZone(timeZone) {
this.changeTimeZone(timeZone);
},
changeTimeZone(timeZone) {

@@ -72,7 +61,5 @@ set(this, 'timeZone', timeZone);

},
isMoment(obj) {
return momentOrMomentTimezone.isMoment(obj);
},
moment() {

@@ -84,14 +71,10 @@ let momentObj = momentOrMomentTimezone(...arguments);

} = this;
if (locale && momentObj.locale) {
momentObj = momentObj.locale(locale);
}
if (timeZone && momentObj.tz) {
momentObj = momentObj.tz(timeZone);
}
return momentObj;
},
utc() {

@@ -102,12 +85,10 @@ let momentObj = momentOrMomentTimezone.utc(...arguments);

} = this;
if (locale && momentObj.locale) {
momentObj = momentObj.locale(locale);
}
return momentObj;
}
});
export { moment as default };
//# sourceMappingURL=moment.js.map
The MIT License (MIT)
Copyright (c) 2016
Copyright (c) 2024

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name": "ember-moment",
"version": "10.0.0",
"version": "10.0.1",
"description": "Moment.js template helpers Ember.js",

@@ -10,2 +10,3 @@ "keywords": [

],
"repository": "https://github.com/adopted-ember-addons/ember-moment.git",
"license": "MIT",

@@ -15,92 +16,32 @@ "author": "",

".": "./dist/index.js",
"./*": "./dist/*",
"./addon-main.js": "./addon-main.js"
"./*": "./dist/*.js",
"./addon-main.js": "./addon-main.cjs"
},
"files": [
"addon-main.js",
"addon-main.cjs",
"declarations",
"dist"
],
"repository": "https://github.com/adopted-ember-addons/ember-moment.git",
"scripts": {
"clean": "rm -rf dist node_modules test-app/node_modules",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"lint:devdeps": "addon-dev sync-dev-deps --lint",
"scenario:list": "scenario-tester list --files test-app/scenarios.js",
"scenario:output": "scenario-tester output --files test-app/scenarios.js --outdir scenario --scenario ",
"scenario:run": "cd test-app && qunit scenarios.js --filter ",
"start": "npm-run-all --parallel start:*",
"start:test-app": "cd test-app && ember serve",
"start:build": "rollup --config --watch",
"sync-dev-deps": "addon-dev sync-dev-deps",
"test": "npm-run-all lint:* test:*",
"test:ember": "cd test-app && ember test",
"test:ember-compatibility": "cd test-app && qunit scenarios.js",
"prepare": "npm-run-all prepublishOnly link-test-app",
"link-test-app": "addon-dev link-test-app",
"prepublishOnly": "rollup --config"
},
"dependencies": {
"@embroider/addon-shim": "^0.50.2"
"@embroider/addon-shim": "^1.8.9"
},
"devDependencies": {
"@babel/core": "^7.16.7",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@embroider/addon-dev": "^0.50.2",
"@embroider/compat": "npm:@embroider/compat@latest",
"@embroider/core": "npm:@embroider/core@latest",
"@embroider/test-setup": "npm:@embroider/test-setup@latest",
"@embroider/webpack": "npm:@embroider/webpack@latest",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"@rollup/plugin-babel": "^5.3.0",
"babel-eslint": "^10.1.0",
"ember-auto-import": "^2.3.0",
"ember-cli-3.16": "npm:ember-cli@~3.16.0",
"ember-cli-3.20": "npm:ember-cli@~3.20.0",
"ember-cli-3.24": "npm:ember-cli@~3.24.0",
"ember-cli-babel": "^7.26.10",
"ember-cli-beta": "npm:ember-cli@beta",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-latest": "npm:ember-cli@latest",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-cli": "~3.28.5",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "0.1.6",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source-3.16": "npm:ember-source@~3.16.0",
"ember-source-3.20": "npm:ember-source@~3.20.0",
"ember-source-3.24": "npm:ember-source@~3.24.0",
"ember-source-beta": "npm:ember-source@beta",
"ember-source-canary": "npm:ember-source@alpha",
"ember-source-channel-url": "^3.0.0",
"ember-source-latest": "npm:ember-source@latest",
"ember-source": "~3.28.8",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"eslint": "^7.32.0",
"jquery": "^3.6.0",
"loader.js": "^4.7.0",
"moment-timezone": "^0.5.33",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"qunit-console-grouper": "^0.3.0",
"qunit-dom": "^1.6.0",
"qunit": "^2.17.2",
"rollup": "^2.63.0",
"scenario-tester": "^2.0.1",
"webpack": "^5.65.0"
"@babel/core": "^7.24.7",
"@babel/eslint-parser": "^7.24.7",
"@babel/runtime": "^7.24.7",
"@embroider/addon-dev": "^4.3.1",
"@rollup/plugin-babel": "^6.0.4",
"babel-plugin-ember-template-compilation": "^2.2.5",
"concurrently": "^8.2.2",
"ember-template-lint": "^6.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^12.1.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.9.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.3.2",
"prettier-plugin-ember-template-tag": "^2.0.2",
"rollup": "^4.18.0",
"rollup-plugin-copy": "^3.5.0"
},

@@ -119,9 +60,12 @@ "peerDependencies": {

},
"engines": {
"node": ">= 12"
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"version": 2,
"type": "addon",
"main": "addon-main.js",
"main": "addon-main.cjs",
"app-js": {

@@ -153,6 +97,13 @@ "./helpers/-base.js": "./dist/_app_/helpers/-base.js",

},
"volta": {
"node": "14.17.5",
"yarn": "1.22.11"
"scripts": {
"build": "rollup --config",
"lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:'",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "rollup --config --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app-4.x'"
}
}
}

@@ -8,15 +8,7 @@ # ember-moment

## Compatibility
* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Node.js v10 or above
* ember-auto-import 2.0 or above
## Table of Contents
<!-- toc -->
- [Using Moment in Ember Apps](#using-moment)
- [Installing](#installing)
- [Compatibility](#compatibility)
- [Using Moment.js in Ember Apps & Addons](#using-momentjs-in-ember-apps--addons)
- [Controlling Locale and Timezone Data](#controlling-locale-and-timezone-data)
- [Installing or Upgrading ember-moment](#installing-or-upgrading-ember-moment)
- [Usage](#usage)

@@ -39,11 +31,5 @@ - [Helpers](#helpers)

- [Common optional named arguments](#common-optional-named-arguments)
- [ES6 Moment](#es6-moment)
- [Configuration Options](#configuration-options)
- [Include Moment Timezone](#include-moment-timezone)
- [Global Default Output Format](#global-default-output-format)
- [Global Allow Empty Dates](#global-allow-empty-dates)
- [i18n support](#i18n-support)
- [Cherry pick locales (optimal)](#cherry-pick-locales-optimal)
- [Include all locales into build](#include-all-locales-into-build)
- [Write all the locales to a folder relative to `dist`](#write-all-the-locales-to-a-folder-relative-to-dist)
- [Configure default runtime locale/timeZone](#configure-default-runtime-localetimezone)

@@ -53,5 +39,11 @@ - [Globally set locale](#globally-set-locale)

- [Frequently Asked Questions](#frequently-asked-questions)
- [Contributing](#contributing)
- [Docs to add](#docs-to-add)
<!-- tocstop -->
## Compatibility
* Ember.js v3.16 or above
* Embroider or ember-auto-import 2.0
## Using Moment.js in Ember Apps & Addons

@@ -485,3 +477,3 @@

return {
moment: {
'ember-moment': {
outputFormat: 'L'

@@ -515,3 +507,3 @@ }

return {
moment: {
'ember-moment': {
allowEmpty: true // default: false

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