🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

get-date-format

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-date-format - npm Package Compare versions

Comparing version

to
0.1.1

3

dist/getDateFormat.js

@@ -27,2 +27,5 @@ "use strict";

exports.default = function (dates, options) {
if (!Array.isArray(dates)) {
throw new Error('Date samples should be type of Array');
}
var allFormats = options ? (0, _getAllFormats2.default)(options) : allFormatsPrefetched;

@@ -29,0 +32,0 @@ var extractedDateFormat = allFormats.find(function (format) {

@@ -54,2 +54,6 @@ 'use strict';

(0, _chai.expect)(result).to.be.null;
});
test('Should throw if sample of dates is not an array', function () {
(0, _chai.expect)(_getDateFormat2.default.bind(null, 'someString')).to.throw('Date samples should be type of Array');
});

2

package.json
{
"name": "get-date-format",
"version": "0.1.0",
"version": "0.1.1",
"description": "Module that tries to get the date format out of sample of dates",

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