You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
631 B
JavaScript
23 lines
631 B
JavaScript
6 years ago
|
/**
|
||
|
* espurify - Clone new AST without extra properties
|
||
|
*
|
||
|
* https://github.com/estools/espurify
|
||
|
*
|
||
|
* Copyright (c) 2014-2018 Takuto Wada
|
||
|
* Licensed under the MIT license.
|
||
|
* https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt
|
||
|
*/
|
||
|
'use strict';
|
||
|
|
||
|
var createWhitelist = require('./lib/create-whitelist');
|
||
|
var cloneWithWhitelist = require('./lib/clone-ast');
|
||
|
|
||
|
function createCloneFunction (options) {
|
||
|
return cloneWithWhitelist(createWhitelist(options));
|
||
|
}
|
||
|
|
||
|
var espurify = createCloneFunction();
|
||
|
espurify.customize = createCloneFunction;
|
||
|
espurify.cloneWithWhitelist = cloneWithWhitelist;
|
||
|
module.exports = espurify;
|