@@ -172,9 +172,9 @@ extern "C" {
172
172
#[ wasm_bindgen( method) ]
173
173
pub fn find ( this : & Array , predicate : & mut FnMut ( JsValue , u32 , Array ) -> bool ) -> JsValue ;
174
174
175
- /// The findIndex() method returns the index of the first element in the array that
175
+ /// The findIndex() method returns the index of the first element in the array that
176
176
/// satisfies the provided testing function. Otherwise -1 is returned.
177
- ///
177
+ ///
178
178
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
179
179
#[ wasm_bindgen( method, js_name = findIndex) ]
180
180
pub fn find_index ( this : & Array , predicate : & mut FnMut ( JsValue , u32 , Array ) -> bool ) -> u32 ;
@@ -223,12 +223,12 @@ extern "C" {
223
223
#[ wasm_bindgen( method, getter, structural) ]
224
224
pub fn length ( this : & Array ) -> u32 ;
225
225
226
- /// map calls a provided callback function once for each element in an array,
227
- /// in order, and constructs a new array from the results. callback is invoked
228
- /// only for indexes of the array which have assigned values, including undefined.
229
- /// It is not called for missing elements of the array (that is, indexes that have
226
+ /// map calls a provided callback function once for each element in an array,
227
+ /// in order, and constructs a new array from the results. callback is invoked
228
+ /// only for indexes of the array which have assigned values, including undefined.
229
+ /// It is not called for missing elements of the array (that is, indexes that have
230
230
/// never been set, which have been deleted or which have never been assigned a value).
231
- ///
231
+ ///
232
232
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
233
233
#[ wasm_bindgen( method) ]
234
234
pub fn map ( this : & Array , predicate : & mut FnMut ( JsValue , u32 , Array ) -> JsValue ) -> Array ;
@@ -247,16 +247,16 @@ extern "C" {
247
247
#[ wasm_bindgen( method) ]
248
248
pub fn push ( this : & Array , value : JsValue ) -> u32 ;
249
249
250
- /// The reduce() method applies a function against an accumulator and each element in
250
+ /// The reduce() method applies a function against an accumulator and each element in
251
251
/// the array (from left to right) to reduce it to a single value.
252
- ///
252
+ ///
253
253
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
254
254
#[ wasm_bindgen( method) ]
255
255
pub fn reduce ( this : & Array , predicate : & mut FnMut ( JsValue , JsValue , u32 , Array ) -> JsValue , initial_value : JsValue ) -> JsValue ;
256
256
257
- /// The reduceRight() method applies a function against an accumulator and each value
257
+ /// The reduceRight() method applies a function against an accumulator and each value
258
258
/// of the array (from right-to-left) to reduce it to a single value.
259
- ///
259
+ ///
260
260
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight
261
261
#[ wasm_bindgen( method, js_name = reduceRight) ]
262
262
pub fn reduce_right ( this : & Array , predicate : & mut FnMut ( JsValue , JsValue , u32 , Array ) -> JsValue , initial_value : JsValue ) -> JsValue ;
@@ -301,10 +301,10 @@ extern "C" {
301
301
#[ wasm_bindgen( method) ]
302
302
pub fn sort ( this : & Array ) -> Array ;
303
303
304
- /// The toLocaleString() method returns a string representing the elements of the array.
304
+ /// The toLocaleString() method returns a string representing the elements of the array.
305
305
/// The elements are converted to Strings using their toLocaleString methods and these
306
306
/// Strings are separated by a locale-specific String (such as a comma “,”).
307
- ///
307
+ ///
308
308
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString
309
309
#[ wasm_bindgen( method, js_name = toLocaleString) ]
310
310
pub fn to_locale_string ( this : & Array , locales : & JsValue , options : & JsValue ) -> JsString ;
@@ -342,7 +342,7 @@ extern "C" {
342
342
343
343
/// The `isView()` method returns true if arg is one of the `ArrayBuffer`
344
344
/// views, such as typed array objects or a DataView; false otherwise.
345
- ///
345
+ ///
346
346
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
347
347
#[ wasm_bindgen( static_method_of = ArrayBuffer , js_name = isView) ]
348
348
pub fn is_view ( value : JsValue ) -> bool ;
@@ -412,7 +412,7 @@ extern "C" {
412
412
extern "C" {
413
413
pub type DataView ;
414
414
415
- /// The `DataView` view provides a low-level interface for reading and
415
+ /// The `DataView` view provides a low-level interface for reading and
416
416
/// writing multiple number types in an `ArrayBuffer` irrespective of the
417
417
/// platform's endianness.
418
418
///
@@ -421,7 +421,7 @@ extern "C" {
421
421
pub fn new ( buffer : & ArrayBuffer , byteOffset : usize , byteLength : usize ) -> DataView ;
422
422
423
423
/// The ArrayBuffer referenced by this view. Fixed at construction time and thus read only.
424
- ///
424
+ ///
425
425
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/buffer
426
426
#[ wasm_bindgen( method, getter, structural) ]
427
427
pub fn buffer ( this : & DataView ) -> ArrayBuffer ;
@@ -435,12 +435,12 @@ extern "C" {
435
435
436
436
/// The offset (in bytes) of this view from the start of its ArrayBuffer.
437
437
/// Fixed at construction time and thus read only.
438
- ///
438
+ ///
439
439
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteOffset
440
440
#[ wasm_bindgen( method, getter, structural, js_name = byteOffset) ]
441
441
pub fn byte_offset ( this : & DataView ) -> usize ;
442
442
443
- /// The getInt8() method gets a signed 8-bit integer (byte) at the
443
+ /// The getInt8() method gets a signed 8-bit integer (byte) at the
444
444
/// specified byte offset from the start of the DataView.
445
445
///
446
446
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getInt8
@@ -463,7 +463,7 @@ extern "C" {
463
463
464
464
/// The getUint16() an unsigned 16-bit integer (unsigned byte) at the specified
465
465
/// byte offset from the start of the view.
466
- ///
466
+ ///
467
467
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint16
468
468
#[ wasm_bindgen( method, js_name = getUint16) ]
469
469
pub fn get_uint16 ( this : & DataView , byte_offset : usize ) -> u16 ;
@@ -477,21 +477,21 @@ extern "C" {
477
477
478
478
/// The getUint32() an unsigned 16-bit integer (unsigned byte) at the specified
479
479
/// byte offset from the start of the view.
480
- ///
480
+ ///
481
481
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint32
482
482
#[ wasm_bindgen( method, js_name = getUint32) ]
483
483
pub fn get_uint32 ( this : & DataView , byte_offset : usize ) -> u32 ;
484
484
485
- /// The getFloat32() method gets a signed 32-bit float (float) at the specified
485
+ /// The getFloat32() method gets a signed 32-bit float (float) at the specified
486
486
/// byte offset from the start of the DataView.
487
- ///
487
+ ///
488
488
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat32
489
489
#[ wasm_bindgen( method, js_name = getFloat32) ]
490
490
pub fn get_float32 ( this : & DataView , byte_offset : usize ) -> f32 ;
491
491
492
- /// The getFloat64() method gets a signed 32-bit float (float) at the specified
492
+ /// The getFloat64() method gets a signed 32-bit float (float) at the specified
493
493
/// byte offset from the start of the DataView.
494
- ///
494
+ ///
495
495
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat64
496
496
#[ wasm_bindgen( method, js_name = getFloat64) ]
497
497
pub fn get_float64 ( this : & DataView , byte_offset : usize ) -> f64 ;
@@ -505,7 +505,7 @@ extern "C" {
505
505
506
506
/// The setUint8() method stores an unsigned 8-bit integer (byte) value at the
507
507
/// specified byte offset from the start of the DataView.
508
- ///
508
+ ///
509
509
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setUint8
510
510
#[ wasm_bindgen( method, js_name = setUint8) ]
511
511
pub fn set_uint8 ( this : & DataView , byte_offset : usize , value : u8 ) ;
@@ -519,7 +519,7 @@ extern "C" {
519
519
520
520
/// The setUint16() method stores an unsigned 16-bit integer (byte) value at the
521
521
/// specified byte offset from the start of the DataView.
522
- ///
522
+ ///
523
523
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setUint16
524
524
#[ wasm_bindgen( method, js_name = setUint16) ]
525
525
pub fn set_uint16 ( this : & DataView , byte_offset : usize , value : u16 ) ;
@@ -533,21 +533,21 @@ extern "C" {
533
533
534
534
/// The setUint32() method stores an unsigned 32-bit integer (byte) value at the
535
535
/// specified byte offset from the start of the DataView.
536
- ///
536
+ ///
537
537
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setUint32
538
538
#[ wasm_bindgen( method, js_name = setUint32) ]
539
539
pub fn set_uint32 ( this : & DataView , byte_offset : usize , value : u32 ) ;
540
540
541
- /// The setFloat32() method stores a signed 32-bit float (float) value at the
541
+ /// The setFloat32() method stores a signed 32-bit float (float) value at the
542
542
/// specified byte offset from the start of the DataView.
543
- ///
543
+ ///
544
544
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setFloat32
545
545
#[ wasm_bindgen( method, js_name = setFloat32) ]
546
546
pub fn set_float32 ( this : & DataView , byte_offset : usize , value : f32 ) ;
547
547
548
- /// The setFloat64() method stores a signed 64-bit float (float) value at the
548
+ /// The setFloat64() method stores a signed 64-bit float (float) value at the
549
549
/// specified byte offset from the start of the DataView.
550
- ///
550
+ ///
551
551
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setFloat64
552
552
#[ wasm_bindgen( method, js_name = setFloat64) ]
553
553
pub fn set_float64 ( this : & DataView , byte_offset : usize , value : f64 ) ;
@@ -1897,6 +1897,24 @@ extern "C" {
1897
1897
#[ wasm_bindgen( method, js_class = "String" , js_name = lastIndexOf) ]
1898
1898
pub fn last_index_of ( this : & JsString , search_value : & JsString , from_index : i32 ) -> i32 ;
1899
1899
1900
+ /// The `padEnd()` method pads the current string with a given string
1901
+ /// (repeated, if needed) so that the resulting string reaches a given
1902
+ /// length. The padding is applied from the end (right) of the current
1903
+ /// string.
1904
+ ///
1905
+ /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd
1906
+ #[ wasm_bindgen( method, js_class = "String" , js_name = padEnd) ]
1907
+ pub fn pad_end ( this : & JsString , target_length : u32 , pad_string : & JsString ) -> JsString ;
1908
+
1909
+ /// The `padStart()` method pads the current string with another string
1910
+ /// (repeated, if needed) so that the resulting string reaches the given
1911
+ /// length. The padding is applied from the start (left) of the current
1912
+ /// string.
1913
+ ///
1914
+ /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart
1915
+ #[ wasm_bindgen( method, js_class = "String" , js_name = padStart) ]
1916
+ pub fn pad_start ( this : & JsString , target_length : u32 , pad_string : & JsString ) -> JsString ;
1917
+
1900
1918
/// The `slice()` method extracts a section of a string and returns it as a
1901
1919
/// new string, without modifying the original string.
1902
1920
///
0 commit comments