Skip to content

Instantly share code, notes, and snippets.

View foxted's full-sized avatar
🦊

Valentin Prugnaud foxted

🦊
View GitHub Profile
@foxted
foxted / maintenance-status-badges.md
Created June 13, 2023 23:43 — forked from taiki-e/maintenance-status-badges.md
Markdown Maintenance status badges
@foxted
foxted / apollo-config.js
Created January 19, 2022 07:41 — forked from KazW/apollo-config.js
Hasura, Nuxt (Vue), Nuxt Auth, Auth0 and Apollo
import { SubscriptionClient } from 'subscriptions-transport-ws'
import { onError } from 'apollo-link-error'
import { setContext } from 'apollo-link-context'
import { split, from } from 'apollo-link'
import { WebSocketLink } from 'apollo-link-ws'
import { getMainDefinition } from 'apollo-utilities'
import { createUploadLink } from 'apollo-upload-client'
import * as ws from 'ws'
export default (context) => {
@foxted
foxted / difference.js
Created August 8, 2020 23:10 — 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])) {