Skip to content

Instantly share code, notes, and snippets.

View xalakox's full-sized avatar
🗺️
Working from anywhere

Salvador Aceves Osuna xalakox

🗺️
Working from anywhere
View GitHub Profile
const { equals } = require('expect/build/jasmineUtils');
expect.extend({
toContainObject(received, argument) {
const pass = (() => {
if (Array.isArray(argument)) {
return equals(received,
expect.arrayContaining(argument.map(arg => expect.objectContaining(arg)))
);
}
@xalakox
xalakox / couchdb csv list
Created June 30, 2012 23:28
CouchDB JSON to CSV view converter use ?include_docs=true&reduce=false
{
"csv":"function(head, req){
start({
'headers': {
'Content-Type': 'text/csv'
}
});
Array.prototype.unique = function() {
var a = this.concat();