xattr -rd com.apple.quarantine [path-to-your-app]
xattr -l [path-to-your-app]
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script> | |
const encodeData = () => { | |
const longJson = JSON.stringify([{ |
const video = document.querySelector('video') | |
video.defaultPlaybackRate = 1.5 | |
video.playbackRate = 1.5 |
const formatToPattern = (value: string, pattern: string): string => { | |
const maskLength = [...pattern.matchAll(/#/g)].length | |
if (maskLength !== value.length) return value | |
let i = 0 | |
return pattern.replace(/#/g, () => value[i++]) | |
} | |
console.log(formatToPattern('99999999999', '(##) #####-####')) // (99) 99999-9999 | |
console.log(formatToPattern('12345678989', '###.###.###-##')) // 123.456.789-89 |
import { camelToSnakeCase, camelKeyToSnakeCase } from './camelToSnakeCase' | |
describe('camel to snake case', () => { | |
describe('camelToSnakeCase', () => { | |
it('should be convert camel case to snake case ', () => { | |
expect(camelToSnakeCase('camelToSnakeCase')).toBe('camel_to_snake_case') | |
}) | |
it('must return an argument value when it is not a valid string', () => { | |
// @ts-ignore |
function msToTime(duration = 0) { | |
const seconds = `0${Math.floor((duration / 1000) % 60)}`.slice(-2) | |
const minutes = `0${Math.floor((duration / (1000 * 60)) % 60)}`.slice(-2) | |
const hours = `0${Math.floor((duration / (1000 * 60 * 60)) % 24)}`.slice(-2) | |
return `${hours}:${minutes}:${seconds}`; | |
} | |
console.log(msToTime(97739)) // 00:01:37 |
describe('description', () => { | |
beforeEach(() => { | |
jest.useFakeTimers(); | |
}); | |
afterEach(() => { | |
jest.runOnlyPendingTimers(); | |
jest.useRealTimers(); | |
}); |
const request = require('request'); | |
const fs = require('fs'); | |
const package = require('./package.json'); | |
const dependencies = { | |
...package.dependencies, | |
...package.devDependencies, | |
}; | |
const getLastVersionOfPackage = packageName => new Promise((resolve, reject) => { |
const formatCPF = cpf => { | |
const invalidCPF = !cpf || cpf.length !== 11; | |
if (invalidCPF) return cpf; | |
return cpf | |
.replace(/[^\d]/g, '') | |
.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, '$1.$2.$3-$4'); | |
}; | |
const formatCNPJ = cnpj => { |
export const pad = ({ | |
value, | |
size, | |
fillWith, | |
}: { | |
value: string | number | |
size: number | |
fillWith: string | |
}): string => { | |
const filled: Array<string | number> = Array.from( |