You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
oatkiller edited this page Sep 13, 2010
·
5 revisions
pass mask an object. it returns a new object with the passed object in its prototype
(function () {
var book = {
title: 'Anna Karenina',
author: 'Leo Tolstoy'
};
// my book appears to have all the same properties as book
var my_book = o.mask(book);
// book isn't altered. only my_book
my_book.notes = 'this book rocks';
book.notes; // undefined
my_book.notes; // 'this book rocks';
my_book.title; // 'Anna Karenina'
})();