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

chrono-node

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrono-node - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

package.json

@@ -15,3 +15,3 @@ {

"license": "MIT",
"version": "2.1.0",
"version": "2.1.1",
"directories": {

@@ -18,0 +18,0 @@ "source": "./src",

@@ -48,3 +48,3 @@ # Chrono (v2)

```javascript
import * as chrono from 'chrono-node';
import chrono from 'chrono-node';

@@ -51,0 +51,0 @@ chrono.parseDate('An appointment on Sep 12-13');

@@ -16,3 +16,2 @@ import {Parser, ParsingContext} from "../../../chrono";

const STRICT_PATTERN = new RegExp('' +
'(?<=\\W|^)' +
'(?:within\\s*)?' +

@@ -19,0 +18,0 @@ '(' + TIME_UNITS_PATTERN + ')' +

@@ -23,5 +23,11 @@ import * as chrono from '../../src';

})
});
testSingleCase(chrono, '9:00 PST', new Date(2020,7-1,6), (result) => {
expect(result.text).toBe('9:00 PST')
expect(result.start.get('hour')).toBe(9)
expect(result.start.get('minute')).toBe(0)
expect(result.start.get('timezoneOffset')).toBe(-480)
})
});

@@ -28,0 +34,0 @@ test('Test - Random text', function() {

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