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

luxon-parser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luxon-parser - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

2

index.js

@@ -52,3 +52,3 @@ const parser = require('any-date-parser');

} else if (typeof date === 'object') {
return DateTime.fromObject(date);
return DateTime.fromObject(date, options);
}

@@ -55,0 +55,0 @@ // String

{
"name": "luxon-parser",
"version": "0.9.3",
"version": "0.9.4",
"description": "Add DateTime.fromHuman() and DateTime.fromAny() functions to Luxon that can parse a wide range of date formats including human-input dates",

@@ -38,9 +38,9 @@ "keywords": [

"peerDependencies": {
"luxon": "^1.26.0"
"luxon": ">=1.28.0"
},
"devDependencies": {
"eslint": "8.7.0",
"jest": "27.4.7",
"prettier": "2.5.1"
"eslint": "8.32.0",
"jest": "29.3.1",
"prettier": "2.8.3"
}
}
# luxon-parser
[![NPM Link](https://img.shields.io/npm/v/luxon-parser?v=0.9.3)](https://npmjs.com/package/luxon-parser)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/kensnyder/luxon-parser?branch=master&svg=true&v=0.9.3)](https://ci.appveyor.com/project/kensnyder/luxon-parser/branch/master)
[![Code Coverage](https://codecov.io/gh/kensnyder/luxon-parser/branch/master/graph/badge.svg?v=0.9.3)](https://codecov.io/gh/kensnyder/luxon-parser)
[![ISC License](https://img.shields.io/npm/l/luxon-parser.svg?v=0.9.3)](https://opensource.org/licenses/ISC)
[![NPM Link](https://img.shields.io/npm/v/luxon-parser?v=0.9.4)](https://npmjs.com/package/luxon-parser)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/kensnyder/luxon-parser?branch=master&svg=true&v=0.9.4)](https://ci.appveyor.com/project/kensnyder/luxon-parser/branch/master)
[![Code Coverage](https://codecov.io/gh/kensnyder/luxon-parser/branch/master/graph/badge.svg?v=0.9.4)](https://codecov.io/gh/kensnyder/luxon-parser)
[![ISC License](https://img.shields.io/npm/l/luxon-parser.svg?v=0.9.4)](https://opensource.org/licenses/ISC)

@@ -98,3 +98,3 @@ A comprehensive and extensible date parsing plugin for

`luxon-parser` relies on
[any-date-format](https://www.npmjs.com/package/any-date-parser) which supports
[any-date-parser](https://www.npmjs.com/package/any-date-parser) which supports
even more formats. See the

@@ -106,3 +106,3 @@ [exhaustive list](https://www.npmjs.com/package/any-date-parser#exhaustive-list-of-date-formats).

See
[any-date-format's instructions](https://www.npmjs.com/package/any-date-parser#adding-custom-formats).
[any-date-parser's instructions](https://www.npmjs.com/package/any-date-parser#adding-custom-formats).

@@ -140,5 +140,5 @@ Example:

- Standalone Parser:
[any-date-format](http://npmjs.com/packages/any-date-format)
- DayJS: [dayjs-parser](http://npmjs.com/package/dayjs-parse)
- Moment: [moment-parseplus](http://npmjs.com/package/moment-parseplus)
[any-date-parser](http://npmjs.com/packages/any-date-parser)
- DayJS Parser: [dayjs-parser](http://npmjs.com/package/dayjs-parser)
- Moment Parser: [moment-parseplus](http://npmjs.com/package/moment-parseplus)

@@ -145,0 +145,0 @@ ## Unit Testing

@@ -86,2 +86,24 @@ const { DateTime } = require('luxon');

});
it('should handle object with options', () => {
const object = {
year: 2021,
month: 4,
day: 17,
hour: 0,
minute: 0,
second: 0,
};
const optionsFiji = {
zone: 'Pacific/Fiji',
};
const optionsFaroe = {
zone: 'Atlantic/Faroe',
};
const actualFiji = DateTime.fromAny(object, optionsFiji);
const expectedFiji = DateTime.fromObject(object, optionsFiji);
expect(actualFiji.toString()).toBe(expectedFiji.toString());
const actualFaroe = DateTime.fromAny(object, optionsFaroe);
const expectedFaroe = DateTime.fromObject(object, optionsFaroe);
expect(actualFaroe.toString()).toBe(expectedFaroe.toString());
});
it('should default to invalid', () => {

@@ -88,0 +110,0 @@ const actual = DateTime.fromAny('my toys are sticky');

Sorry, the diff of this file is not supported yet

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