Skip to content

Commit 6dc2913

Browse files
tdeekenscure53
authored andcommitted
Refactor to ES201* syntax and fix UMD reliance.
1 parent b0a8314 commit 6dc2913

File tree

9 files changed

+2508
-970
lines changed

9 files changed

+2508
-970
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true

dist/purify.js

Lines changed: 1043 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.min.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@
3939
"singleQuote": true
4040
}
4141
]
42-
},
43-
"globals": ["self", "window"]
42+
},
43+
"globals": [
44+
"window"
45+
]
4446
},
4547
"devDependencies": {
4648
"babel": "^6.23.0",
@@ -49,6 +51,7 @@
4951
"babel-preset-env": "^1.2.2",
5052
"eslint-config-prettier": "^1.7.0",
5153
"eslint-plugin-prettier": "^2.0.1",
54+
"he": "^1.1.1",
5255
"jquery": "^2.2.3",
5356
"jsdom": "8.x.x",
5457
"json-loader": "^0.5.4",
@@ -61,8 +64,8 @@
6164
"karma-json-fixtures-preprocessor": "0.0.6",
6265
"karma-qunit": "^1.0.0",
6366
"karma-webpack": "^1.7.0",
64-
"prettier": "^1.2.2",
6567
"pre-commit": "^1.1.2",
68+
"prettier": "^1.2.2",
6669
"qunit-parameterize": "^0.4.0",
6770
"qunit-tap": "^1.5.0",
6871
"qunitjs": "^1.23.1",

src/attrs.js

Lines changed: 307 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,307 @@
1+
export const html = [
2+
'accept',
3+
'action',
4+
'align',
5+
'alt',
6+
'autocomplete',
7+
'background',
8+
'bgcolor',
9+
'border',
10+
'cellpadding',
11+
'cellspacing',
12+
'checked',
13+
'cite',
14+
'class',
15+
'clear',
16+
'color',
17+
'cols',
18+
'colspan',
19+
'coords',
20+
'datetime',
21+
'default',
22+
'dir',
23+
'disabled',
24+
'download',
25+
'enctype',
26+
'face',
27+
'for',
28+
'headers',
29+
'height',
30+
'hidden',
31+
'high',
32+
'href',
33+
'hreflang',
34+
'id',
35+
'ismap',
36+
'label',
37+
'lang',
38+
'list',
39+
'loop',
40+
'low',
41+
'max',
42+
'maxlength',
43+
'media',
44+
'method',
45+
'min',
46+
'multiple',
47+
'name',
48+
'noshade',
49+
'novalidate',
50+
'nowrap',
51+
'open',
52+
'optimum',
53+
'pattern',
54+
'placeholder',
55+
'poster',
56+
'preload',
57+
'pubdate',
58+
'radiogroup',
59+
'readonly',
60+
'rel',
61+
'required',
62+
'rev',
63+
'reversed',
64+
'role',
65+
'rows',
66+
'rowspan',
67+
'spellcheck',
68+
'scope',
69+
'selected',
70+
'shape',
71+
'size',
72+
'span',
73+
'srclang',
74+
'start',
75+
'src',
76+
'step',
77+
'style',
78+
'summary',
79+
'tabindex',
80+
'title',
81+
'type',
82+
'usemap',
83+
'valign',
84+
'value',
85+
'width',
86+
'xmlns',
87+
];
88+
89+
export const svg = [
90+
'accent-height',
91+
'accumulate',
92+
'additivive',
93+
'alignment-baseline',
94+
'ascent',
95+
'attributename',
96+
'attributetype',
97+
'azimuth',
98+
'basefrequency',
99+
'baseline-shift',
100+
'begin',
101+
'bias',
102+
'by',
103+
'clip',
104+
'clip-path',
105+
'clip-rule',
106+
'color',
107+
'color-interpolation',
108+
'color-interpolation-filters',
109+
'color-profile',
110+
'color-rendering',
111+
'cx',
112+
'cy',
113+
'd',
114+
'dx',
115+
'dy',
116+
'diffuseconstant',
117+
'direction',
118+
'display',
119+
'divisor',
120+
'dur',
121+
'edgemode',
122+
'elevation',
123+
'end',
124+
'fill',
125+
'fill-opacity',
126+
'fill-rule',
127+
'filter',
128+
'flood-color',
129+
'flood-opacity',
130+
'font-family',
131+
'font-size',
132+
'font-size-adjust',
133+
'font-stretch',
134+
'font-style',
135+
'font-variant',
136+
'font-weight',
137+
'fx',
138+
'fy',
139+
'g1',
140+
'g2',
141+
'glyph-name',
142+
'glyphref',
143+
'gradientunits',
144+
'gradienttransform',
145+
'image-rendering',
146+
'in',
147+
'in2',
148+
'k',
149+
'k1',
150+
'k2',
151+
'k3',
152+
'k4',
153+
'kerning',
154+
'keypoints',
155+
'keysplines',
156+
'keytimes',
157+
'lengthadjust',
158+
'letter-spacing',
159+
'kernelmatrix',
160+
'kernelunitlength',
161+
'lighting-color',
162+
'local',
163+
'marker-end',
164+
'marker-mid',
165+
'marker-start',
166+
'markerheight',
167+
'markerunits',
168+
'markerwidth',
169+
'maskcontentunits',
170+
'maskunits',
171+
'max',
172+
'mask',
173+
'mode',
174+
'min',
175+
'numoctaves',
176+
'offset',
177+
'operator',
178+
'opacity',
179+
'order',
180+
'orient',
181+
'orientation',
182+
'origin',
183+
'overflow',
184+
'paint-order',
185+
'path',
186+
'pathlength',
187+
'patterncontentunits',
188+
'patterntransform',
189+
'patternunits',
190+
'points',
191+
'preservealpha',
192+
'r',
193+
'rx',
194+
'ry',
195+
'radius',
196+
'refx',
197+
'refy',
198+
'repeatcount',
199+
'repeatdur',
200+
'restart',
201+
'result',
202+
'rotate',
203+
'scale',
204+
'seed',
205+
'shape-rendering',
206+
'specularconstant',
207+
'specularexponent',
208+
'spreadmethod',
209+
'stddeviation',
210+
'stitchtiles',
211+
'stop-color',
212+
'stop-opacity',
213+
'stroke-dasharray',
214+
'stroke-dashoffset',
215+
'stroke-linecap',
216+
'stroke-linejoin',
217+
'stroke-miterlimit',
218+
'stroke-opacity',
219+
'stroke',
220+
'stroke-width',
221+
'surfacescale',
222+
'targetx',
223+
'targety',
224+
'transform',
225+
'text-anchor',
226+
'text-decoration',
227+
'text-rendering',
228+
'textlength',
229+
'u1',
230+
'u2',
231+
'unicode',
232+
'values',
233+
'viewbox',
234+
'visibility',
235+
'vert-adv-y',
236+
'vert-origin-x',
237+
'vert-origin-y',
238+
'word-spacing',
239+
'wrap',
240+
'writing-mode',
241+
'xchannelselector',
242+
'ychannelselector',
243+
'x',
244+
'x1',
245+
'x2',
246+
'y',
247+
'y1',
248+
'y2',
249+
'z',
250+
'zoomandpan',
251+
];
252+
253+
export const mathMl = [
254+
'accent',
255+
'accentunder',
256+
'bevelled',
257+
'close',
258+
'columnsalign',
259+
'columnlines',
260+
'columnspan',
261+
'denomalign',
262+
'depth',
263+
'display',
264+
'displaystyle',
265+
'fence',
266+
'frame',
267+
'largeop',
268+
'length',
269+
'linethickness',
270+
'lspace',
271+
'lquote',
272+
'mathbackground',
273+
'mathcolor',
274+
'mathsize',
275+
'mathvariant',
276+
'maxsize',
277+
'minsize',
278+
'movablelimits',
279+
'notation',
280+
'numalign',
281+
'open',
282+
'rowalign',
283+
'rowlines',
284+
'rowspacing',
285+
'rowspan',
286+
'rspace',
287+
'rquote',
288+
'scriptlevel',
289+
'scriptminsize',
290+
'scriptsizemultiplier',
291+
'selection',
292+
'separator',
293+
'separators',
294+
'stretchy',
295+
'subscriptshift',
296+
'supscriptshift',
297+
'symmetric',
298+
'voffset',
299+
];
300+
301+
export const xml = [
302+
'xlink:href',
303+
'xml:id',
304+
'xlink:title',
305+
'xml:space',
306+
'xmlns:xlink',
307+
];

0 commit comments

Comments
 (0)