Last active
December 13, 2020 07:05
-
-
Save GautamPanickar/dd91435378af0ca07eeb28a24725492c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connection = indexedDB.open('testdb', 1); | |
connection.onupgradeneeded = (e) => { | |
var db = e.target.result; | |
var routineStore = db.createObjectStore('contacts'); | |
routineStore.onerror = (evt) => { | |
console.log('Contacts store could not be created.'); | |
}; | |
}; | |
var contact = { | |
active: true, | |
baddress: { | |
line1: "Home 123/456", | |
line2: "4th Street, XYZ Road", | |
phone: "1234567890", | |
zip: "123456", | |
city: "Kochi", | |
state: "Kerala" | |
}, | |
company: "Medium Corporation", | |
currency: 145, | |
name: "Gautam Panickar SS", | |
email: "panickarhasamail@gmail.com", | |
mobile: "123456789", | |
saddress: { | |
line1: "Home 123/456", | |
line2: "4th Street, XYZ Road", | |
phone: "1234567890", | |
zip: "123456", | |
city: "Kochi", | |
state: "Kerala" | |
}, | |
type: 1 | |
}; | |
var totalLength = 1000; | |
var contacts = []; | |
for (let i = 0; i < 1250; i++) { | |
const contactCopy = {...contact, id: i+1}; | |
contacts.push(contactCopy); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment