Socket
Socket
Sign inDemoInstall

12fromto24hours

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

12fromto24hours - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0

2

index.js

@@ -10,3 +10,3 @@ //

*/
module.exports = function Switch12FromTo24Hours (time) {
module.exports = function _12FromTo24Hours (time) {
let hours, minutes, suffix, result,

@@ -13,0 +13,0 @@ _24HourPattern = /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/,

{
"name": "12fromto24hours",
"version": "0.0.0",
"version": "1.0.0",
"description": " Switch between 24 and 12 hours made easy .. ",

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

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

# Switch 12 From To 24 Hours
# 12 From To 24 Hours
[![Build Status](https://travis-ci.org/3imed-jaberi/switch-12-from-to-24-hours.svg?branch=master)](https://travis-ci.org/3imed-jaberi/switch-12-from-to-24-hours)    [![Coverage Status](https://coveralls.io/repos/github/3imed-jaberi/switch-12-from-to-24-hours/badge.svg?branch=master)](https://coveralls.io/github/3imed-jaberi/switch-12-from-to-24-hours?branch=master)
[![Build Status](https://travis-ci.org/3imed-jaberi/12-from-to-24-hours.svg?branch=master)](https://travis-ci.org/3imed-jaberi/12-from-to-24-hours)    [![Coverage Status](https://coveralls.io/repos/github/3imed-jaberi/12-from-to-24-hours/badge.svg?branch=master)](https://coveralls.io/github/3imed-jaberi/12-from-to-24-hours?branch=master)

@@ -13,3 +13,3 @@ ### Switch between 24 and 12 hours made easy ..

```bash
$ npm install switch-12-from-to-24-hours
$ npm install 12fromto24hours
```

@@ -19,3 +19,3 @@

```bash
$ yarn add switch-12-from-to-24-hours
$ yarn add 12fromto24hours
```

@@ -30,3 +30,3 @@

const _12FromTo24Hours = require('switch-12-from-to-24-hours');
const _12FromTo24Hours = require('12fromto24hours');

@@ -33,0 +33,0 @@ // From 12 to 24 ..

const { expect } = require('chai');
const { __resolve, __reject } = require('./_data.json');
const Switch12FromTo24Hours = require('..');
const _12FromTo24Hours = require('..');

@@ -9,9 +9,9 @@

it ('Check All Success Resulat ✔️', () => {
__resolve.map(({ _24Time, _12Time }) => { expect(Switch12FromTo24Hours(_24Time)).to.equal(_12Time) });
__resolve.map(({ _24Time, _12Time }) => { expect(_12FromTo24Hours(_24Time)).to.equal(_12Time) });
});
it ('Check All Failed Resulat ❌', () => {
__reject.map(({ _24Time, _12Time }) => { expect(() => Switch12FromTo24Hours(_24Time)).to.throw(new Error(_12Time).message) });
__reject.map(({ _24Time, _12Time }) => { expect(() => _12FromTo24Hours(_24Time)).to.throw(new Error(_12Time).message) });
});
});
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