Skip to content

Instantly share code, notes, and snippets.

View abdmmar's full-sized avatar
😼

Abdullah Ammar abdmmar

😼
View GitHub Profile
@abdmmar
abdmmar / tailwind-colors.ts
Created July 16, 2022 18:53
Tailwind CSS Colors Object and Type Definition
type ColorsNames =
| 'slate'
| 'gray'
| 'zinc'
| 'neutral'
| 'stone'
| 'red'
| 'orange'
| 'amber'
| 'yellow'
@abdmmar
abdmmar / difference.js
Created May 9, 2022 03:36 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
@abdmmar
abdmmar / react.json.code-snippets
Last active March 24, 2021 02:42
VSCode Snippet-React
{
"Create React function component": {
"scope": "javascript",
"prefix": "rfcomp",
"body": [
"import React from \"react\"",
"",
"const $1 = ($2) => {",
"\treturn (",
"\t\t$3",