1 esutils ([esutils](http://github.com/Constellation/esutils)) is
2 utility box for ECMAScript language tools.
4 ### Functions
6 #### code.isDecimalDigit(code)
8 Return true if provided code is decimal digit.
10 #### code.isHexDigit(code)
12 Return true if provided code is hexadecimal digit.
14 #### code.isOctalDigit(code)
16 Return true if provided code is octal digit.
18 #### code.isWhiteSpace(code)
20 Return true if provided code is white space. White space characters are formally defined in ECMA262.
22 #### code.isLineTerminator(code)
24 Return true if provided code is line terminator. Line terminator characters are formally defined in ECMA262.
26 #### code.isIdentifierStart(code)
28 Return true if provided code can be the first character of ECMA262 Identifier. They are formally defined in ECMA262.
30 #### code.isIdentifierPart(code)
32 Return true if provided code can be the trailing character of ECMA262 Identifier. They are formally defined in ECMA262.
34 ### keyword
36 #### keyword.isKeywordES5(id, strict)
38 Return true if provided identifier string is one of Keywords in ECMA262 5.1. They are formally defined in ECMA262.
39 If strict flag is true, this function additionally checks whether id is keyword under strict mode.
41 #### keyword.isKeywordES6(id, strict)
43 Return true if provided identifier string is one of Keywords in ECMA262 6. They are formally defined in ECMA262.
44 If strict flag is true, this function additionally checks whether id is keyword under strict mode.
46 #### keyword.isRestrictedWord(id)
48 Return true if provided identifier string is one of restricted words under strict mode: "eval" or "arguments".
49 They are formally defined in ECMA262.
51 #### keyword.isIdentifierName(id)
53 Return true if provided identifier string can be IdentifierName.
54 They are formally defined in ECMA262.
56 ### License
58 Copyright (C) 2013 [Yusuke Suzuki](http://github.com/Constellation)
59 (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
61 Redistribution and use in source and binary forms, with or without
62 modification, are permitted provided that the following conditions are met:
64 * Redistributions of source code must retain the above copyright
65 notice, this list of conditions and the following disclaimer.
67 * Redistributions in binary form must reproduce the above copyright
68 notice, this list of conditions and the following disclaimer in the
69 documentation and/or other materials provided with the distribution.
71 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
72 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
73 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
74 ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
75 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
76 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
77 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
78 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
79 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
80 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.