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

@bufferapp/components

Package Overview
Dependencies
Maintainers
9
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bufferapp/components - npm Package Compare versions

Comparing version 0.4.15-beta03 to 0.4.15-beta04

49

InputTime/index.jsx

@@ -9,3 +9,30 @@ import React, { PropTypes } from 'react';

/* eslint-disable react/prop-types */
/*
0: 12 midnight am
1: 1 am
2: 2 a
3: 3 a
4: 4 a
5: 5 a
6: 6 a
7: 7 a
8: 8 a
9: 9 a
10: 10 a
11: 11 a
12: 12 noon pm
13: 1 p
14: 2 p
15: 3 p
16: 4 p
17: 5 p
18: 6 p
19: 7 p
20: 8 p
21: 9 p
22 10 p
23: 11 p
*/
const renderAmPm = ({ value, onChange }) =>

@@ -16,3 +43,3 @@ <select

...value,
hours: e.target.value === 'am' && value.hours - 12 >= 0
hours: e.target.value === 'am' && value.hours < 12
? value.hours - 12

@@ -28,2 +55,11 @@ : value.hours + 12,

const displayHour = (hour, select24Hours) => {
if (select24Hours) {
return hour;
} else if (hour === 0) {
return 12;
}
return hour % 12;
};
const InputTime = ({

@@ -46,8 +82,11 @@ select24Hours,

>
{genArray(0, select24Hours ? 23 : 11).map(hour =>
{genArray(
select24Hours || value.hours < 12 ? 0 : 12,
select24Hours || value.hours > 11 ? 23 : 11,
).map(hour =>
<option
key={!select24Hours && value.hours > 11 ? hour + 12 : hour}
value={!select24Hours && value.hours > 11 ? hour + 12 : hour}
key={hour}
value={hour}
>
{leftPadTimeUnit(select24Hours ? hour : hour + 1)}
{leftPadTimeUnit(displayHour(hour, select24Hours))}
</option>)

@@ -54,0 +93,0 @@ }

2

package.json
{
"name": "@bufferapp/components",
"version": "0.4.15-beta03",
"version": "0.4.15-beta04",
"description": "A shared set of UI Components",

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

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