This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+9
View File
@@ -0,0 +1,9 @@
'use strict';
var xmlChars = require('xml-char-classes');
function getRange(re) {
return re.source.slice(1, -1);
}
// http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName
module.exports = new RegExp('^[' + getRange(xmlChars.letter) + '_][' + getRange(xmlChars.letter) + getRange(xmlChars.digit) + '\\.\\-_' + getRange(xmlChars.combiningChar) + getRange(xmlChars.extender) + ']*$');
+101
View File
@@ -0,0 +1,101 @@
{
"_args": [
[
{
"raw": "ncname@1.0.x",
"scope": null,
"escapedName": "ncname",
"name": "ncname",
"rawSpec": "1.0.x",
"spec": ">=1.0.0 <1.1.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\html-minifier"
]
],
"_from": "ncname@>=1.0.0 <1.1.0",
"_id": "ncname@1.0.0",
"_inCache": true,
"_location": "/ncname",
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "1.4.14",
"_phantomChildren": {},
"_requested": {
"raw": "ncname@1.0.x",
"scope": null,
"escapedName": "ncname",
"name": "ncname",
"rawSpec": "1.0.x",
"spec": ">=1.0.0 <1.1.0",
"type": "range"
},
"_requiredBy": [
"/html-minifier"
],
"_resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz",
"_shasum": "5b57ad18b1ca092864ef62b0b1ed8194f383b71c",
"_shrinkwrap": null,
"_spec": "ncname@1.0.x",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\html-minifier",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/ncname/issues"
},
"dependencies": {
"xml-char-classes": "^1.0.0"
},
"description": "Regular expression for matching XML NCName",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "5b57ad18b1ca092864ef62b0b1ed8194f383b71c",
"tarball": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "222beb93b25f6f57c667823a0d3755354518a5c2",
"homepage": "https://github.com/sindresorhus/ncname",
"keywords": [
"ncname",
"ncnamechar",
"xml",
"re",
"regex",
"name",
"element",
"tag",
"match",
"unicode"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "ncname",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/ncname.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.0"
}
+28
View File
@@ -0,0 +1,28 @@
# ncname [![Build Status](https://travis-ci.org/sindresorhus/ncname.svg?branch=master)](https://travis-ci.org/sindresorhus/ncname)
> Regular expression for matching [XML NCName](http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName)
## Install
```sh
$ npm install --save ncname
```
## Usage
```js
var ncname = require('ncname');
ncname.test('hællæ');
//=> true
ncname.test('$unicorn');
//=> false
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)