let loadFile = (module, filename) => { let {outputText, diagnostics} = ts.transpileModule(fs.readFileSync(filename).toString(), {compilerOptions: _.extend({}, compilerOptions, global.Mancy.preferences.typescript), reportDiagnostics: true }); // revisit diagnostics result return module._compile(JSON.stringify(outputText), filename); }
it('user stupid subclassing', async done => { const SuperUser = Parse.Object.extend('User'); const user = new SuperUser(); user.set('username', 'bob'); user.set('password', 'welcome'); ok(user instanceof Parse.User, 'Subclassing User should have worked'); await user.signUp(); done(); });
function getColStyle(col, style) { style = style ? $.extend({}, style) : {}; style.width = col.minWidth ? Math.max(col.width, col.minWidth) : col.width; return style; }
function ensureCtor(comp, base) { if ( comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module') ) { comp = comp.default } return isObject(comp) ? base.extend(comp) : comp }
connection .then(db => { ctx.connect(db); self.client = db.client; extend(ctx, self); return self; })
jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } );
/** * Merge an Array of Objects into a single Object. */ export function toObject(arr) { const res = {} for (let i = 0; i < arr.length; i++) { if (arr[i]) { extend(res, arr[i]) } } return res }
it('should be able to get own PII via API with object', done => { const userObj = new (Parse.Object.extend(Parse.User))(); userObj.id = user.id; userObj.fetch().then(fetchedUser => { expect(fetchedUser.get('email')).toBe(EMAIL); expect(fetchedUser.get('zip')).toBe(ZIP); expect(fetchedUser.get('ssn')).toBe(SSN); done(); }, done.fail); });
SyntheticEvent.extend({ clipboardData: function (event) { return 'clipboardData' in event ? event.clipboardData : window.clipboardData; } })
reportback.extend(cb, { error: cb.error, success: () => {}, notStrapiApp: () => {}, alreadyExists: () => { return cb.error(); }, })
jQuery.fn.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } );
function Test( settings ) { extend( this, settings ); this.assertions = []; this.testNumber = ++Test.count; }
Parse.User.extend({ extended: function () { return true; }, });
jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; } ); } } );
let resetButEntry = (cmd) => { cache = _.extend(cache, cmd || { command: '', cursor: 0, historyIndex: -1, historyStaged: '' }); }