Search completed in 0.96 seconds.
40 results for "valueOf":
Your results are loading. Please wait...
Object.prototype.valueOf() - JavaScript
the valueof() method returns the primitive value of the specified object.
... the valueof() method returns the primitive value of the specified object.
...f the specified object.
...And 17 more matches
Symbol.prototype.valueOf() - JavaScript
the valueof() method returns the primitive value of a symbol object.
... the valueof() method returns the primitive value of a symbol object.
... the valueof() method returns the primitive value of a symbol object.
...And 5 more matches
Boolean.prototype.valueOf() - JavaScript
the valueof() method returns the primitive value of a boolean object.
... the valueof() method returns the primitive value of a boolean object.
...e valueof() method returns the primitive value of a boolean object.
...And 3 more matches
Date.prototype.valueOf() - JavaScript
the valueof() method returns the primitive value of a date object.
... the valueof() method returns the primitive value of a date object.
... the valueof() method returns the primitive value of a date object.
...And 3 more matches
String.prototype.valueOf() - JavaScript
the valueof() method returns the primitive value of a string object.
... the valueof() method returns the primitive value of a string object.
... the valueof() method returns the primitive value of a string object.
...And 3 more matches
BigInt.prototype.valueOf() - JavaScript
the valueof() method returns the wrapped primitive value of a bigint object.
... the valueof() method returns the wrapped primitive value of a bigint object.
...d primitive value of a bigint object.
...And 2 more matches
Number.prototype.valueOf() - JavaScript
the valueof() method returns the wrapped primitive value of a number object.
... the valueof() method returns the wrapped primitive value of a number object.
...thub repository.
...And 2 more matches
Bytecode Descriptions
pe: typeof x compiles to getgname "x"; typeof.
...ry + operator.
... not.) format: jof_ic neg stack: val ⇒ (-val) the unary - operator.
...And 9 more matches
StringView - Archive of obsolete content
se { nrawidx = isfinite(nchroffset) ?
...gned long startfrom); domstring stringview.tobase64(optional boolean wholebuffer); stringview stringview.subview(unsigned long characteroffset, optional unsigned long characterslength); void stringview.foreachchar(function callback, optional object thisobject, optional unsigned long characteroffset, optional unsigned long characterslength); domstring stringview.valueof(); domstring stringview.tostring(); properties overview attribute type description encoding read only domstring a string expressing the encoding type.
...utf8charlength(nchrcode), nchridx++) { nchrcode = stringview.loadutf8charcode(mystringview.rawdata, nrawidx); /* do something with each character...
...And 4 more matches
Object prototypes - Learn web development
, 'smith', 32, 'male', ['music', 'skiing']); if you type "person1." into your javascript console, you should see the browser try to auto-complete this with the member names available on this object: in this list, you will see the members defined on person1's constructor — person() — name, age, gender, interests, bio, and greeting.
...the members defined on person1's constructor — person() — name, age, gender, interests, bio, and greeting.
... defined on person1's constructor — person() — name, age, gender, interests, bio, and greeting.
...And 3 more matches
JXON - Archive of obsolete content
oattrib = oxmlparent.attributes.item(nattrlen); this.keyattributes[oattrib.name.tolowercase()] = parsetext(oattrib.value.trim()); } } /* * optional properties...
...st(svalue)) { return null; } if (/^(?:true|false)$/i.test(svalue)) { return svalue.tolowercase() === "true"; } if (isfinite(svalue)) { return parsefloat(svalue); } if (isfinite(date.parse(svalue))) { return new date(svalue); } return svalue; } function objectify (vvalue) { if (vvalue === null) { return new (function() { this.tostring = function() { return "null"; } this.valueof = function() { return null; } })(); } return vvalue instanceof object ?
...l-3.0-standalone.html |*| \*/ function createxml (oobjtree) { function loadobjtree (oparentel, oparentobj) { var vvalue, ochild; if (oparentobj.constructor === string || oparentobj.constructor === number || oparentobj.constructor === boolean) { oparentel.appendchild(onewdoc.createtextnode(oparentobj.tostring())); /* verbosity level is 0 or 1 */ if (oparentobj === oparentobj.valueof()) { return; } } else if (oparentobj.constructor === date) { oparentel.appendchild(onewdoc.createtextnode(oparentobj.togmtstring())); } for (var sname in oparentobj) { if (isfinite(sname)) { continue; } /* verbosity level is 0 */ vvalue = oparentobj[sname]; if (sname === "keyvalue") { if (vvalue !== null && vvalue !== true) { oparentel.appendchild(onewd...
...And 2 more matches
Inheritance and the prototype chain - JavaScript
s code, the console should have displayed an object that looks similar to this.
...console should have displayed an object that looks similar to this.
... "bar"; console.log( dosomething.prototype ); this results in: { foo: "bar", constructor: ƒ dosomething(), __proto__: { constructor: ƒ object(), hasownproperty: ƒ hasownproperty(), isprototypeof: ƒ isprototypeof(), propertyisenumerable: ƒ propertyisenumerable(), tolocalestring: ƒ tolocalestring(), tostring: ƒ tostring(), valueof: ƒ valueof() } } we can now use the new operator to create an instance of dosomething() based on this prototype.
...e value", __proto__: { foo: "bar", constructor: ƒ dosomething(), __proto__: { constructor: ƒ object(), hasownproperty: ƒ hasownproperty(), isprototypeof: ƒ isprototypeof(), propertyisenumerable: ƒ propertyisenumerable(), tolocalestring: ƒ tolocalestring(), tostring: ƒ tostring(), valueof: ƒ valueof() } } } as seen above, the __proto__ of dosomeinstancing is dosomething.prototype.
Object - JavaScript
ototype chain of the specified object.
...xample, in the call myfn(a, b, c), the arguments within myfn's body will contain 3 array-like elements corresponding to (a, b, c).
...hooks, pass this and the arguments (the call state) to the current behavior by calling apply() on the function.
...chain, i want to modify object.prototype: object.prototype.valueof = function() { if (this.hasownproperty('-prop-value')) { return this['-prop-value']; } else { // it doesn't look like one of my objects, so let's fall back on // the default behavior by reproducing the current behavior as best we can.
String - JavaScript
reates a string object console.log(eval(s1)) // returns the number 4 console.log(eval(s2)) // returns the string "2 + 2" for these reasons, the code may break when it encounters string objects when it expects a primitive string instead, although generally, authors need not worry about the distinction.
...(s1)) // returns the number 4 console.log(eval(s2)) // returns the string "2 + 2" for these reasons, the code may break when it encounters string objects when it expects a primitive string instead, although generally, authors need not worry about the distinction.
...tring() method.
...uppercase.
Date.prototype[@@toPrimitive] - JavaScript
e value of the given date object.
...object.
...of the date object returns a primitive value, that is either of type number or of type string.
Introducing the Audio API extension - Archive of obsolete content
uto-detect the minimal duration of the pre-buffer, such that the sound is played without interruptions, and lag between writing and playback is minimal.
...tween writing and playback is minimal.
JSObjectOps.defaultValue
alue here.
...ror or exception.
JS_ValueToObject
in *objp and returns true.
...be the same object as v.
Deprecated and obsolete features - JavaScript
ble matches in a string, or only against the first.
...norecase whether or not to ignore case while attempting a match in a string.
BigInt - JavaScript
nteger between 0 and 2width - 1.
...ns a string with a language-sensitive representation of this number.
Boolean - JavaScript
for this constructor, the result is a boolean object with the value false.
...egacy and non-standard and should not be used.
Date - JavaScript
tation of the time portion of this date, based on system settings.
...ing() returns a string representing the specified date object.
Number - JavaScript
umber.
...ecision) returns a string representing the number to a specified precision in fixed-point or exponential notation.
Object.create() - JavaScript
ocn // throws error: cannot convert object to primitive value testing just a few of the many most basic built-in functions shows the magnitude of the problem more clearly: > alert(oco) // shows [object object] > alert(ocn) // throws error: cannot convert object to primitive value > oco.tostring() // shows [object object] > ocn.tostring() // throws error: ocn.tostring is not a function > oco.valueof() // shows {} > ocn.valueof() // throws error: ocn.valueof is not a function > oco.hasownproperty("p") // shows "true" > ocn.hasownproperty("p") // throws error: ocn.hasownproperty is not a function > oco.constructor // shows "object() { [native code] }" > ocn.constructor // shows "undefined" as said, these differences can make debugging even simple-seeming problems quickly go astray.
...ect object] however, setting the generic prototype as the new object's prototype works even better: ocn = object.create( null ); // create "null" object (same as before) object.setprototypeof(ocn, object.prototype); // set new object's prototype to the "generic" object (not standard-object) (in addition to all the string-related functions shown above, this also adds:) > ocn.valueof() // shows {} > ocn.hasownproperty("x") // shows "false" > ocn.constructor // shows "object() { [native code] }" // ...and all the rest of the properties and methods of object.prototype.
Symbol - JavaScript
totype.description a read-only string containing the description of the symbol.
...methods symbol.prototype.tosource() returns a string containing the source of the symbol object.
WebAssembly.Global - JavaScript
ction that created this object's instance.
... 69firefox android full support 62opera android no support nosafari ios no support nosamsung internet android full support 10.0nodejs no support novalueofchrome full support 69edge no support nofirefox full support 62ie no support noopera no support nosafari no support nowebview andr...
jspage - Archive of obsolete content
;}};(function(){var a={array:array,date:date,function:function,number:number,regexp:regexp,string:string};for(var h in a){new native({name:h,initialize:a[h],protect:true}); }var d={"boolean":boolean,"native":native,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["concat","indexof","join","lastindexof","pop","push","reverse","shift","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindexof","match","replace","search","slice","split","substr","substring","tolowercase","touppercase","valueof"]}; for(var e in f){for(var b=f[e].length;b--;){native.genericize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return t...
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
re modifying a copy, without affecting the original.
JS_PropertyStub
ck that accepts the default property behavior: it does nothing and returns true.
JS_ValueToNumber
ut the following steps to convert it to a number.
JS_ValueToString
lemented by v's jsobjectops.defaultvalue method, so host objects can override it all.) if v.tostring() is a function, it is called.
TransformStream - Web APIs
stream is done i guess if (chunk === null) controller.terminate() else if (arraybuffer.isview(chunk)) controller.enqueue(new uint8array(chunk.buffer, chunk.byteoffset, chunk.bytelength)) else if (array.isarray(chunk) && chunk.every(value => typeof value === 'number')) controller.enqueue(new uint8array(chunk)) else if ('function' === typeof chunk.valueof && chunk.valueof() !== chunk) this.transform(chunk.valueof(), controller) // hack else if ('tojson' in chunk) this.transform(json.stringify(chunk), controller) break case 'symbol': controller.error("cannot send a symbol as a chunk part") break case 'undefined': controller.error("cannot send undefined as a chunk part") default: ...
Equality comparisons and sameness - JavaScript
e false toprimitive(a) == b toprimitive(a) == b toprimitive(a) == tonumber(b) a === b in the above table, tonumber(a) attempts to convert its argument to a number before comparison.
Date.prototype.getTime() - JavaScript
unix epoch.
Object.keys() - JavaScript
ly support it, copy the following snippet: // from /docs/web/javascript/reference/global_objects/object/keys if (!object.keys) { object.keys = (function() { 'use strict'; var hasownproperty = object.prototype.hasownproperty, hasdontenumbug = !({ tostring: null }).propertyisenumerable('tostring'), dontenums = [ 'tostring', 'tolocalestring', 'valueof', 'hasownproperty', 'isprototypeof', 'propertyisenumerable', 'constructor' ], dontenumslength = dontenums.length; return function(obj) { if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) { throw new typeerror('object.keys called on non-object'); } var result = [], prop, i; for ...
String.prototype.toString() - JavaScript
d returns a string representing the specified object.
parseFloat() - JavaScript
ove characters), parsefloat returns nan.
Equality (==) - JavaScript
nt types, try to convert them to the same type before comparing: when comparing a number to a string, try to convert the string to a numeric value.
Logical NOT (!) - JavaScript
corresponding boolean primitive.
throw - JavaScript
9 * 123456789 * 12345 6789 * * if the argument passed to the zipcode constructor does not * conform to one of these patterns, an exception is thrown.