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

fefe

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fefe - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

dist/parse-date.js

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

const errors_1 = require("./errors");
const isoDateRegex = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;
const isoDateRegex = /^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(\.\d+)?([+-][0-2]\d:[0-5]\d|Z)$/;
function parseDate({ iso = false } = {}) {

@@ -8,0 +8,0 @@ return (value) => {

@@ -15,2 +15,7 @@ "use strict";

});
it('should parse an ISO date string without milliseconds', () => {
const date = '2018-10-22T09:40:40Z';
const parsedDate = parse_date_1.parseDate({ iso: true })(date);
chai_1.expect(parsedDate.getTime()).to.equal(new Date(date).getTime());
});
it('return parsed date', () => {

@@ -17,0 +22,0 @@ const date = new Date();

{
"name": "fefe",
"version": "2.1.0",
"version": "2.1.1",
"description": "Validate, sanitize and transform values with proper types.",

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

@@ -17,2 +17,8 @@ import { expect } from 'chai'

it('should parse an ISO date string without milliseconds', () => {
const date = '2018-10-22T09:40:40Z'
const parsedDate = parseDate({ iso: true })(date)
expect(parsedDate.getTime()).to.equal(new Date(date).getTime())
})
it('return parsed date', () => {

@@ -19,0 +25,0 @@ const date = new Date()

import { FefeError } from './errors'
const isoDateRegex = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/
const isoDateRegex = /^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(\.\d+)?([+-][0-2]\d:[0-5]\d|Z)$/

@@ -5,0 +5,0 @@ export function parseDate ({ iso = false }: { iso?: boolean } = {}) {

Sorry, the diff of this file is not supported yet

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