nav tabs on admin dashboard
This commit is contained in:
+7
-7
@@ -1,11 +1,11 @@
|
||||
'use strict';
|
||||
var htmlCommentRegex = require('html-comment-regex');
|
||||
const htmlCommentRegex = require('html-comment-regex');
|
||||
|
||||
function isBinary(buf) {
|
||||
var isBuf = Buffer.isBuffer(buf);
|
||||
const isBuf = Buffer.isBuffer(buf);
|
||||
|
||||
for (var i = 0; i < 24; i++) {
|
||||
var charCode = isBuf ? buf[i] : buf.charCodeAt(i);
|
||||
for (let i = 0; i < 24; i++) {
|
||||
const charCode = isBuf ? buf[i] : buf.charCodeAt(i);
|
||||
|
||||
if (charCode === 65533 || charCode <= 8) {
|
||||
return true;
|
||||
@@ -15,6 +15,6 @@ function isBinary(buf) {
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = function (buf) {
|
||||
return !isBinary(buf) && /^\s*(?:<\?xml[^>]*>\s*)?(?:<!doctype svg[^>]*\s*(?:<![^>]*>)*[^>]*>\s*)?<svg[^>]*>[^]*<\/svg>\s*$/i.test(buf.toString().replace(htmlCommentRegex, ''));
|
||||
};
|
||||
const regex = /^\s*(?:<\?xml[^>]*>\s*)?(?:<!doctype svg[^>]*\s*(?:\[?(?:\s*<![^>]*>\s*)*\]?)*[^>]*>\s*)?<svg[^>]*>[^]*<\/svg>\s*$/i;
|
||||
|
||||
module.exports = input => Boolean(input) && !isBinary(input) && regex.test(input.toString().replace(htmlCommentRegex, ''));
|
||||
|
||||
+4
-16
@@ -1,21 +1,9 @@
|
||||
The MIT License (MIT)
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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:
|
||||
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 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.
|
||||
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.
|
||||
|
||||
+12
-12
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"_from": "is-svg@^2.0.0",
|
||||
"_id": "is-svg@2.1.0",
|
||||
"_from": "is-svg@^3.0.0",
|
||||
"_id": "is-svg@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=",
|
||||
"_integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==",
|
||||
"_location": "/is-svg",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-svg@^2.0.0",
|
||||
"raw": "is-svg@^3.0.0",
|
||||
"name": "is-svg",
|
||||
"escapedName": "is-svg",
|
||||
"rawSpec": "^2.0.0",
|
||||
"rawSpec": "^3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
"fetchSpec": "^3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/postcss-svgo"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz",
|
||||
"_shasum": "cf61090da0d9efbcab8722deba6f032208dbb0e9",
|
||||
"_spec": "is-svg@^2.0.0",
|
||||
"_resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
|
||||
"_shasum": "9321dbd29c212e5ca99c4fa9794c714bcafa2f75",
|
||||
"_spec": "is-svg@^3.0.0",
|
||||
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\postcss-svgo",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
@@ -38,10 +38,10 @@
|
||||
"description": "Check if a string or buffer is SVG",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "^0.16.0"
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
@@ -72,5 +72,5 @@
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
"version": "3.0.0"
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
# is-svg [](https://travis-ci.org/sindresorhus/is-svg)
|
||||
|
||||
> Check if a string or buffer is [SVG](http://en.wikipedia.org/wiki/Scalable_Vector_Graphics)
|
||||
> Check if a string or buffer is [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save is-svg
|
||||
$ npm install is-svg
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user