Submit
Path:
~
/
/
usr
/
share
/
nodejs
/
es-abstract
/
2021
/
File Content:
UTF16EncodeCodePoint.js
'use strict'; var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); var floor = require('./floor'); var modulo = require('./modulo'); var isCodePoint = require('../helpers/isCodePoint'); // https://ecma-international.org/ecma-262/12.0/#sec-utf16encoding module.exports = function UTF16EncodeCodePoint(cp) { if (!isCodePoint(cp)) { throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); } if (cp <= 65535) { return $fromCharCode(cp); } var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800); var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00); return cu1 + cu2; };
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
BigInt
---
0755
Number
---
0755
AbstractEqualityComparison.js
1873 bytes
0644
AbstractRelationalComparison.js
2121 bytes
0644
AddEntriesFromIterable.js
1519 bytes
0644
AddToKeptObjects.js
645 bytes
0644
AdvanceStringIndex.js
1010 bytes
0644
ApplyStringOrNumericBinaryOperator.js
3187 bytes
0644
ArrayCreate.js
1700 bytes
0644
ArraySetLength.js
2665 bytes
0644
ArraySpeciesCreate.js
1370 bytes
0644
BigIntBitwiseOp.js
1741 bytes
0644
BinaryAnd.js
364 bytes
0644
BinaryOr.js
362 bytes
0644
BinaryXor.js
364 bytes
0644
ByteListBitwiseOp.js
1323 bytes
0644
ByteListEqual.js
913 bytes
0644
Call.js
623 bytes
0644
CanonicalNumericIndexString.js
654 bytes
0644
CharacterRange.js
782 bytes
0644
ClearKeptObjects.js
302 bytes
0644
CodePointAt.js
1740 bytes
0644
CodePointsToString.js
788 bytes
0644
CompletePropertyDescriptor.js
989 bytes
0644
CopyDataProperties.js
2072 bytes
0644
CreateDataProperty.js
1297 bytes
0644
CreateDataPropertyOrThrow.js
734 bytes
0644
CreateHTML.js
927 bytes
0644
CreateIterResultObject.js
432 bytes
0644
CreateListFromArrayLike.js
1363 bytes
0644
CreateMethodProperty.js
979 bytes
0644
CreateRegExpStringIterator.js
3738 bytes
0644
DateFromTime.js
1036 bytes
0644
DateString.js
1055 bytes
0644
Day.js
234 bytes
0644
DayFromYear.js
256 bytes
0644
DayWithinYear.js
286 bytes
0644
DaysInYear.js
301 bytes
0644
DefinePropertyOrThrow.js
1466 bytes
0644
DeletePropertyOrThrow.js
699 bytes
0644
EnumerableOwnPropertyNames.js
1109 bytes
0644
FlattenIntoArray.js
1752 bytes
0644
FromPropertyDescriptor.js
797 bytes
0644
Get.js
732 bytes
0644
GetIterator.js
1737 bytes
0644
GetMethod.js
922 bytes
0644
GetOwnPropertyKeys.js
817 bytes
0644
GetPromiseResolve.js
692 bytes
0644
GetPrototypeFromConstructor.js
921 bytes
0644
GetSubstitution.js
4463 bytes
0644
GetV.js
569 bytes
0644
HasOwnProperty.js
553 bytes
0644
HasProperty.js
517 bytes
0644
HourFromTime.js
382 bytes
0644
InLeapYear.js
510 bytes
0644
InstanceofOperator.js
918 bytes
0644
Invoke.js
715 bytes
0644
IsAccessorDescriptor.js
465 bytes
0644
IsArray.js
410 bytes
0644
IsBigIntElementType.js
194 bytes
0644
IsCallable.js
108 bytes
0644
IsCompatiblePropertyDescriptor.js
367 bytes
0644
IsConcatSpreadable.js
626 bytes
0644
IsConstructor.js
1149 bytes
0644
IsDataDescriptor.js
464 bytes
0644
IsExtensible.js
504 bytes
0644
IsGenericDescriptor.js
560 bytes
0644
IsIntegralNumber.js
473 bytes
0644
IsNoTearConfiguration.js
467 bytes
0644
IsPromise.js
485 bytes
0644
IsPropertyKey.js
207 bytes
0644
IsRegExp.js
545 bytes
0644
IsSharedArrayBuffer.js
461 bytes
0644
IsStringPrefix.js
940 bytes
0644
IsUnclampedIntegerElementType.js
328 bytes
0644
IsUnsignedElementType.js
290 bytes
0644
IterableToList.js
721 bytes
0644
IteratorClose.js
1481 bytes
0644
IteratorComplete.js
498 bytes
0644
IteratorNext.js
493 bytes
0644
IteratorStep.js
353 bytes
0644
IteratorValue.js
443 bytes
0644
LengthOfArrayLike.js
495 bytes
0644
MakeDate.js
328 bytes
0644
MakeDay.js
1012 bytes
0644
MakeTime.js
763 bytes
0644
MinFromTime.js
396 bytes
0644
MonthFromTime.js
1014 bytes
0644
NumberBitwiseOp.js
757 bytes
0644
NumberToBigInt.js
690 bytes
0644
OrdinaryCreateFromConstructor.js
827 bytes
0644
OrdinaryDefineOwnProperty.js
2390 bytes
0644
OrdinaryGetOwnProperty.js
1257 bytes
0644
OrdinaryGetPrototypeOf.js
539 bytes
0644
OrdinaryHasInstance.js
627 bytes
0644
OrdinaryHasProperty.js
531 bytes
0644
OrdinaryObjectCreate.js
1445 bytes
0644
OrdinarySetPrototypeOf.js
1201 bytes
0644
OrdinaryToPrimitive.js
1065 bytes
0644
PromiseResolve.js
457 bytes
0644
QuoteJSONString.js
1420 bytes
0644
RegExpCreate.js
643 bytes
0644
RegExpExec.js
887 bytes
0644
RequireObjectCoercible.js
70 bytes
0644
SameValue.js
307 bytes
0644
SameValueNonNumeric.js
635 bytes
0644
SameValueZero.js
223 bytes
0644
SecFromTime.js
402 bytes
0644
Set.js
1255 bytes
0644
SetFunctionLength.js
1107 bytes
0644
SetFunctionName.js
1381 bytes
0644
SetIntegrityLevel.js
1850 bytes
0644
SpeciesConstructor.js
844 bytes
0644
SplitMatch.js
895 bytes
0644
StrictEqualityComparison.js
361 bytes
0644
StringCreate.js
1109 bytes
0644
StringGetOwnProperty.js
1409 bytes
0644
StringIndexOf.js
1121 bytes
0644
StringPad.js
1263 bytes
0644
StringToBigInt.js
581 bytes
0644
StringToCodePoints.js
760 bytes
0644
SymbolDescriptiveString.js
526 bytes
0644
TestIntegrityLevel.js
1272 bytes
0644
TimeClip.js
468 bytes
0644
TimeFromYear.js
261 bytes
0644
TimeString.js
808 bytes
0644
TimeWithinDay.js
247 bytes
0644
ToBigInt.js
631 bytes
0644
ToBigInt64.js
948 bytes
0644
ToBigUint64.js
703 bytes
0644
ToBoolean.js
130 bytes
0644
ToDateString.js
498 bytes
0644
ToIndex.js
695 bytes
0644
ToInt16.js
260 bytes
0644
ToInt32.js
173 bytes
0644
ToInt8.js
247 bytes
0644
ToIntegerOrInfinity.js
340 bytes
0644
ToLength.js
362 bytes
0644
ToNumber.js
2136 bytes
0644
ToNumeric.js
550 bytes
0644
ToObject.js
334 bytes
0644
ToPrimitive.js
287 bytes
0644
ToPropertyDescriptor.js
1452 bytes
0644
ToPropertyKey.js
405 bytes
0644
ToString.js
396 bytes
0644
ToUint16.js
564 bytes
0644
ToUint32.js
175 bytes
0644
ToUint8.js
578 bytes
0644
ToUint8Clamp.js
522 bytes
0644
TrimString.js
804 bytes
0644
Type.js
297 bytes
0644
UTF16EncodeCodePoint.js
713 bytes
0644
UTF16SurrogatePairToCodePoint.js
765 bytes
0644
UnicodeEscape.js
839 bytes
0644
ValidateAndApplyPropertyDescriptor.js
5243 bytes
0644
WeakRefDeref.js
625 bytes
0644
WeekDay.js
208 bytes
0644
YearFromTime.js
407 bytes
0644
abs.js
207 bytes
0644
clamp.js
576 bytes
0644
floor.js
217 bytes
0644
modulo.js
168 bytes
0644
msFromTime.js
253 bytes
0644
substring.js
740 bytes
0644
thisBigIntValue.js
551 bytes
0644
thisBooleanValue.js
367 bytes
0644
thisNumberValue.js
390 bytes
0644
thisStringValue.js
361 bytes
0644
thisSymbolValue.js
514 bytes
0644
thisTimeValue.js
66 bytes
0644
N4ST4R_ID | Naxtarrr