/
githubmirror
/
express
Обзор
Документация
Войти
/
githubmirror
/
express
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/mvc/db.js
16 строк
420 B
Douglas Christopher Wilson
examples: use strict mode
02 фев 2022, 09:30
02 фев 2022, 09:30
20047bb
Код
Авторство
О чём код?
'use strict' // faux database var pets = exports.pets = []; pets.push({ name: 'Tobi', id: 0 }); pets.push({ name: 'Loki', id: 1 }); pets.push({ name: 'Jane', id: 2 }); pets.push({ name: 'Raul', id: 3 }); var users = exports.users = []; users.push({ name: 'TJ', pets: [pets[0], pets[1], pets[2]], id: 0 }); users.push({ name: 'Guillermo', pets: [pets[3]], id: 1 }); users.push({ name: 'Nathan', pets: [], id: 2 });