5343}
Updated:
| package | bump type |
|---|---|
| "@f/fkit" | patch |
| var // should be a not so common char | |
| // possibly one JSON does not encode | |
| // possibly one encodeURIComponent does not encode | |
| // right now this char is '~' but this might change in the future | |
| specialChar = "~", | |
| safeSpecialChar = "\\x" + ("0" + specialChar.charCodeAt(0).toString(16)).slice(-2), | |
| escapedSafeSpecialChar = "\\" + safeSpecialChar, | |
| specialCharRG = new RegExp(safeSpecialChar, "g"), | |
| safeSpecialCharRG = new RegExp(escapedSafeSpecialChar, "g"), | |
| safeStartWithSpecialCharRG = new RegExp("(?:^|([^\\\\]))" + escapedSafeSpecialChar), |
| {} |
| /* eslint eqeqeq: 0 */ | |
| import React from 'react'; | |
| function computeHeight(node) { | |
| const totalHeight = parseInt(getComputedStyle(node).height, 10); | |
| const padding = | |
| parseInt(getComputedStyle(node).paddingTop, 10) + | |
| parseInt(getComputedStyle(node).paddingBottom, 10); | |
| return totalHeight - padding; | |
| } |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const walk = function(dir, done) { | |
| let results = []; | |
| fs.readdir(dir, function(err, list) { | |
| if (err) return done(err); | |
| let pending = list.length; | |
| if (!pending) return done(null, results); | |
| list.forEach(function(file) { |
| const isObject = obj => obj === Object(obj); | |
| const merge = (obj1, obj2) => { | |
| Object.keys(obj1).forEach(key => { | |
| if (Array.isArray(obj1[key])) { | |
| if (obj2[key]) obj1[key] = [...obj1[key], ...obj2[key]]; | |
| } else if (isObject(obj1[key])) { | |
| if (obj2[key]) obj1[key] = { ...obj1[key], ...obj2[key] }; | |
| } else { | |
| if (obj2[key] !== undefined) { |
| /** | |
| * Return a timestamp with the format "m-d-yy" | |
| * @type {Date} | |
| */ | |
| function timeStamp() { | |
| // Create a date object with the current time | |
| let now = new Date(); | |
| // Create an array with the current month, day and time |
| const arr1 = [1, 2, 3, 4, 5]; | |
| if (arr1.indexOf(1) !== -1) { | |
| console.log("Arr1 HAS the integer 1!"); | |
| } | |
| if (arr1.includes(1)) { | |
| console.log("Arr1 HAS the integer 1!"); | |
| } |
| find . -name "node_modules" -exec rm -rf '{}' + |
| const iterateObject = (obj, executeOnValue) => { | |
| Object.keys(obj).forEach(name=> { | |
| let val = obj[name]; | |
| if (typeof val === "object") { | |
| return iterateObject(val, executeOnValue); | |
| } else if (val === undefined) { | |
| obj[name] = ""; | |
| } else { | |
| obj[name] = executeOnValue(val); | |
| } |