README.md (1633B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2018 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # Max Code Point 22 23 > Maximum [Unicode][unicode] code point in the Basic Multilingual Plane (BMP). 24 25 <section class="usage"> 26 27 ## Usage 28 29 ```javascript 30 var UNICODE_MAX_BMP = require( '@stdlib/constants/unicode/max-bmp' ); 31 ``` 32 33 #### UNICODE_MAX_BMP 34 35 Maximum [Unicode][unicode] code point in the Basic Multilingual Plane (BMP). 36 37 ```javascript 38 var bool = ( UNICODE_MAX_BMP === 65535 ); 39 // returns true 40 ``` 41 42 </section> 43 44 <!-- /.usage --> 45 46 <section class="examples"> 47 48 ## Examples 49 50 <!-- eslint no-undef: "error" --> 51 52 ```javascript 53 var randu = require( '@stdlib/random/base/randu' ); 54 var floor = require( '@stdlib/math/base/special/floor' ); 55 var fromCodePoint = require( '@stdlib/string/from-code-point' ); 56 var UNICODE_MAX_BMP = require( '@stdlib/constants/unicode/max-bmp' ); 57 58 var x; 59 var i; 60 61 for ( i = 0; i < 100; i++ ) { 62 x = floor( randu() * UNICODE_MAX_BMP ); 63 console.log( fromCodePoint( x ) ); 64 } 65 ``` 66 67 </section> 68 69 <!-- /.examples --> 70 71 <section class="links"> 72 73 [unicode]: https://en.wikipedia.org/wiki/Unicode 74 75 </section> 76 77 <!-- /.links -->