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

thinkful-ui

Package Overview
Dependencies
Maintainers
5
Versions
281
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thinkful-ui - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "thinkful-ui",
"version": "1.0.4",
"version": "1.0.5",
"description": "Shared navigation and UI resources for Thinkful.",

@@ -5,0 +5,0 @@ "main": "src/index.es6",

@@ -180,12 +180,19 @@ require('./availability_grid.less');

_digestBitmap(bitmap) {
const MAX_SLOTS_HOUR = 4;
const HOURS_DAY = 24;
const BITS_SLOT = MAX_SLOTS_HOUR / this.props.slotsHour;
// split the bitmap into day-size chunks
let dayRegex = new RegExp(`.{1,${this.props.slotsHour * 24}}`, 'g')
let dayBitmaps = bitmap.match(dayRegex)
let dayRegex = new RegExp(`.{1,${MAX_SLOTS_HOUR * HOURS_DAY}}`, 'g');
let slotRegex = new RegExp(`.{1,${BITS_SLOT}}`, 'g');
let availableString = '1'.repeat(BITS_SLOT);
let daysData = this.state.days;
let dayBitmaps = bitmap.match(dayRegex);
if (dayBitmaps) {
dayBitmaps.map((dayBitmap, dayIndex) => {
dayBitmap.split('').map((slotValue, slotIndex) => {
daysData[dayIndex].slots[slotIndex].selected = slotValue === '1';
let slotBitmaps = dayBitmap.match(slotRegex);
slotBitmaps.map((slotValue, slotIndex) => {
daysData[dayIndex].slots[slotIndex].selected = slotValue === availableString;
})

@@ -192,0 +199,0 @@ })

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