Home
last modified time | relevance | path

Searched refs:ToPrimitive (Results 1 – 19 of 19) sorted by relevance

/third_party/rust/crates/num-traits/src/
Dcast.rs19 pub trait ToPrimitive { interface
24 self.to_i64().as_ref().and_then(ToPrimitive::to_isize) in to_isize()
31 self.to_i64().as_ref().and_then(ToPrimitive::to_i8) in to_i8()
38 self.to_i64().as_ref().and_then(ToPrimitive::to_i16) in to_i16()
45 self.to_i64().as_ref().and_then(ToPrimitive::to_i32) in to_i32()
70 self.to_u64().as_ref().and_then(ToPrimitive::to_usize) in to_usize()
77 self.to_u64().as_ref().and_then(ToPrimitive::to_u8) in to_u8()
84 self.to_u64().as_ref().and_then(ToPrimitive::to_u16) in to_u16()
91 self.to_u64().as_ref().and_then(ToPrimitive::to_u32) in to_u32()
117 self.to_f64().as_ref().and_then(ToPrimitive::to_f32) in to_f32()
[all …]
Dlib.rs37 pub use cast::{cast, AsPrimitive, FromPrimitive, NumCast, ToPrimitive};
Dfloat.rs8 use {Num, NumCast, ToPrimitive};
/third_party/node/deps/npm/node_modules/es-abstract/test/
Des5.js29 st.ok(is(ES.ToPrimitive(primitive), primitive), primitive + ' is returned correctly');
36 …st.equal(ES.ToPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject coerces to v…
37 …st.equal(ES.ToPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with…
38 …st.equal(ES.ToPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject wit…
39 …st.equal(ES.ToPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerc…
40 …st.equal(ES.ToPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject re…
41 …st.equal(ES.ToPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject return…
42 st.equal(ES.ToPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString');
43 …st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toS…
44 …st.equal(ES.ToPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toS…
[all …]
Dtests.js50 st.ok(is(ES.ToPrimitive(primitive), primitive), debug(primitive) + ' is returned correctly');
57 … st.equal(ES.ToPrimitive(v.coercibleObject), 3, 'coercibleObject with no hint coerces to valueOf');
58 st.ok(is(ES.ToPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString');
59 …st.equal(ES.ToPrimitive(v.coercibleObject, Number), 3, 'coercibleObject with hint Number coerces t…
60 st.ok(is(ES.ToPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to NaN');
61 …st.equal(ES.ToPrimitive(v.coercibleObject, String), 42, 'coercibleObject with hint String coerces …
62 …st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toS…
63 …st.equal(ES.ToPrimitive(v.toStringOnlyObject), 7, 'toStringOnlyObject returns non-stringified toSt…
64 st.equal(ES.ToPrimitive(v.valueOfOnlyObject), 4, 'valueOfOnlyObject returns valueOf');
65 …st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleO…
[all …]
/third_party/node/deps/npm/node_modules/es-to-primitive/
DCHANGELOG.md12 …* [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless…
27 …* [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless…
Des5.js37 module.exports = function ToPrimitive(input) { class
Des2015.js43 module.exports = function ToPrimitive(input) { class
DREADME.md11 ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.
/third_party/rust/crates/num-traits/tests/
Dcast.rs64 fn require_toprimitive<T: ToPrimitive>(_: &T) {} in wrapping_is_toprimitive()
367 impl<T: ToPrimitive> ToPrimitive for New<T> { in newtype_to_primitive()
386 fn check<T: PartialEq + Debug + Bounded + ToPrimitive>() { in newtype_to_primitive() argument
/third_party/node/deps/npm/node_modules/es-abstract/operations/
D2015.js11 ToPrimitive: 'https://ecma-international.org/ecma-262/6.0/#sec-toprimitive', property
D2016.js11 ToPrimitive: 'https://ecma-international.org/ecma-262/7.0/#sec-toprimitive', property
D2017.js11 ToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-toprimitive', property
/third_party/rust/crates/num-traits/
DRELEASES.md143 - [The default methods in `FromPrimitive` and `ToPrimitive` are more robust.][73]
172 and `ToPrimitive` traits now also have corresponding 128-bit methods, which
187 function and the traits `NumCast`, `FromPrimitive`, and `ToPrimitive`.
/third_party/node/deps/npm/node_modules/es-abstract/
Des5.js22 ToPrimitive: toPrimitive, property
Des2015.js81 ToPrimitive: toPrimitive,
169 var key = this.ToPrimitive(argument, $String);
DCHANGELOG.md150 * Use `es-to-primitive` for ToPrimitive methods.
/third_party/jerryscript/docs/
D02.API-REFERENCE.md3302 Call ToPrimitive operation on the api value.
/third_party/rust/crates/bindgen/bindgen-tests/tests/
Dstylo.hpp99751 ToPrimitive(JSContext* cx, JS::HandleObject obj, JSType hint, JS::MutableHandleValue vp);