What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-30 12:25:37
how to use json schema faker
import { schema } from './mockDataSchema'; import chalk from 'chalk'; const {resolve, extend} = require('json-schema-faker'); const fs = require('fs'); extend('faker', () => require('faker')); resolve(schema).then(sample => { console.log(... Add solution -
TypeScript 2022-01-29 10:47:31
how to Store Objects in HTML5 localStorage
var testObject = { 'one': 1, 'two': 2, 'three': 3 }; // Put the object into storage localStorage.setItem('testObject', JSON.stringify(testObject)); // Retrieve the object from storage var retrievedObject = localStorage.getItem('testObject'); console.lo... Add solution -
Javascript 2022-01-28 08:11:43
formidable express example
// make this a middleware function, // then put it on the route like you used jwt, // then get the value with req.users. const { IncomingForm } = require('formidable') const { resolve } = require('path') const { existsSync, writeFileSync } = require('fs... Add solution -
Javascript 2022-01-26 11:30:22
example route in koa and controller
// user.controoler.js exports.resultsController = async(ctx, next) => { ctx.body = "Hello Wordl from get"; await next(); } exports.createController = async (ctx, next) => { ctx.body = JSON.stringify(ctx.request.body); awa... Add solution -
Javascript 2022-01-26 07:40:31
Working with XLSX in JavaScript
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=TDGsVqVzW4A */ // Import dependencies const fs = require("fs"); const XLSX = require("xlsx"); const jsontoxml = requir... Add solution
Best helpers
Snagulus
+5
Adam Dexter
+5
Gbarry
+5
ANeves
+5
Hi-yi
+5
Tick tock
+5
Wolf
+5
Ent
+5
Rajesh Paul
+5
Scared Guy
+5
Jela
+5
Nathaniel
+5
Jason Heo
+5
Freddie
+5
Naved Ame
+5
John Kuhl
+5
IberoMedia
+5