[Pkg-javascript-commits] [node-unicode-canonical-property-names-ecmascript] 01/02: New upstream version 1.0.2

Julien Puydt julien.puydt at laposte.net
Sat Aug 19 20:19:48 UTC 2017


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository node-unicode-canonical-property-names-ecmascript.

commit 46d8854f60fef2bc3173b4be9395d0ed33307e23
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Sat Aug 19 21:58:14 2017 +0200

    New upstream version 1.0.2
---
 .editorconfig   | 12 ++++++++++++
 .gitattributes  |  1 +
 .gitignore      | 14 ++++++++++++++
 .travis.yml     | 10 ++++++++++
 LICENSE-MIT.txt | 20 +++++++++++++++++++
 README.md       | 36 ++++++++++++++++++++++++++++++++++
 index.js        | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 package.json    | 34 ++++++++++++++++++++++++++++++++
 tests/tests.js  | 25 ++++++++++++++++++++++++
 9 files changed, 212 insertions(+)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..dbd9e6b
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,12 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = tab
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[{README.md,package.json,.travis.yml}]
+indent_style = space
+indent_size = 2
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..176a458
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ca85bae
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+# Installed npm modules
+node_modules
+
+# Folder view configuration files
+.DS_Store
+Desktop.ini
+
+# Thumbnail cache files
+._*
+Thumbs.db
+
+# Files that might appear on external disks
+.Spotlight-V100
+.Trashes
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..812df51
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+node_js:
+  - '4'
+  - '5'
+  - '6'
+  - '7'
+script:
+  - 'npm test'
+git:
+  depth: 1
diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt
new file mode 100644
index 0000000..a41e0a7
--- /dev/null
+++ b/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright Mathias Bynens <https://mathiasbynens.be/>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5c36ccc
--- /dev/null
+++ b/README.md
@@ -0,0 +1,36 @@
+# unicode-canonical-property-names-ecmascript [![Build status](https://travis-ci.org/mathiasbynens/unicode-canonical-property-names-ecmascript.svg?branch=master)](https://travis-ci.org/mathiasbynens/unicode-canonical-property-names-ecmascript)
+
+_unicode-canonical-property-names-ecmascript_ exports the set of canonical Unicode property names that are supported in [ECMAScript RegExp property escapes](https://github.com/tc39/proposal-regexp-unicode-property-escapes).
+
+## Installation
+
+To use _unicode-canonical-property-names-ecmascript_, install it as a dependency via [npm](https://www.npmjs.com/):
+
+```bash
+$ npm install unicode-canonical-property-names-ecmascript
+```
+
+Then, `require` it:
+
+```js
+const properties = require('unicode-canonical-property-names-ecmascript');
+```
+
+## Example
+
+```js
+properties.has('ID_Start');
+// → true
+properties.has('IDS');
+// → false
+```
+
+## Author
+
+| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|
+| [Mathias Bynens](https://mathiasbynens.be/) |
+
+## License
+
+_unicode-canonical-property-names-ecmascript_ is available under the [MIT](https://mths.be/mit) license.
diff --git a/index.js b/index.js
new file mode 100755
index 0000000..e54193d
--- /dev/null
+++ b/index.js
@@ -0,0 +1,60 @@
+module.exports = new Set([
+	// Non-binary properties:
+	'General_Category',
+	'Script',
+	'Script_Extensions',
+	// Binary properties:
+	'Alphabetic',
+	'Any',
+	'ASCII',
+	'ASCII_Hex_Digit',
+	'Assigned',
+	'Bidi_Control',
+	'Bidi_Mirrored',
+	'Case_Ignorable',
+	'Cased',
+	'Changes_When_Casefolded',
+	'Changes_When_Casemapped',
+	'Changes_When_Lowercased',
+	'Changes_When_NFKC_Casefolded',
+	'Changes_When_Titlecased',
+	'Changes_When_Uppercased',
+	'Dash',
+	'Default_Ignorable_Code_Point',
+	'Deprecated',
+	'Diacritic',
+	'Emoji',
+	'Emoji_Component',
+	'Emoji_Modifier',
+	'Emoji_Modifier_Base',
+	'Emoji_Presentation',
+	'Extended_Pictographic',
+	'Extender',
+	'Grapheme_Base',
+	'Grapheme_Extend',
+	'Hex_Digit',
+	'ID_Continue',
+	'ID_Start',
+	'Ideographic',
+	'IDS_Binary_Operator',
+	'IDS_Trinary_Operator',
+	'Join_Control',
+	'Logical_Order_Exception',
+	'Lowercase',
+	'Math',
+	'Noncharacter_Code_Point',
+	'Pattern_Syntax',
+	'Pattern_White_Space',
+	'Quotation_Mark',
+	'Radical',
+	'Regional_Indicator',
+	'Sentence_Terminal',
+	'Soft_Dotted',
+	'Terminal_Punctuation',
+	'Unified_Ideograph',
+	'Uppercase',
+	'Variation_Selector',
+	'White_Space',
+	'XID_Continue',
+	'XID_Start'
+]);
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..f46da8f
--- /dev/null
+++ b/package.json
@@ -0,0 +1,34 @@
+{
+  "name": "unicode-canonical-property-names-ecmascript",
+  "version": "1.0.2",
+  "description": "The set of canonical Unicode property names supported in ECMAScript RegExp property escapes.",
+  "homepage": "https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript",
+  "main": "index.js",
+  "engines": {
+    "node": ">=4"
+  },
+  "files": [
+    "LICENSE-MIT.txt",
+    "index.js"
+  ],
+  "keywords": [
+    "unicode",
+    "unicode properties"
+  ],
+  "license": "MIT",
+  "author": {
+    "name": "Mathias Bynens",
+    "url": "https://mathiasbynens.be/"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript.git"
+  },
+  "bugs": "https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript/issues",
+  "devDependencies": {
+    "ava": "*"
+  },
+  "scripts": {
+    "test": "ava ./tests"
+  }
+}
diff --git a/tests/tests.js b/tests/tests.js
new file mode 100644
index 0000000..69e78da
--- /dev/null
+++ b/tests/tests.js
@@ -0,0 +1,25 @@
+import test from 'ava';
+import canonicalProperties from '../index.js';
+
+test(t => {
+	// Test non-binary properties.
+	t.true(canonicalProperties.has('General_Category'));
+	t.false(canonicalProperties.has('gc'));
+	t.true(canonicalProperties.has('Script'));
+	t.false(canonicalProperties.has('sc'));
+	t.true(canonicalProperties.has('Script_Extensions'));
+	t.false(canonicalProperties.has('scx'));
+	// Test binary properties.
+	t.true(canonicalProperties.has('ASCII'));
+	t.false(canonicalProperties.has('ascii'));
+	t.true(canonicalProperties.has('Any'));
+	t.false(canonicalProperties.has('any'));
+	t.true(canonicalProperties.has('Assigned'));
+	t.false(canonicalProperties.has('assigned'));
+	t.true(canonicalProperties.has('ID_Start'));
+	t.false(canonicalProperties.has('IDS'));
+	t.true(canonicalProperties.has('Emoji_Modifier'));
+	t.false(canonicalProperties.has('emojimodifier'));
+	t.true(canonicalProperties.has('Emoji_Component'));
+	t.false(canonicalProperties.has('emojicomponent'));
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-unicode-canonical-property-names-ecmascript.git



More information about the Pkg-javascript-commits mailing list