mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(tooling): remove unused tooling scripts
This commit is contained in:
@ -1,6 +1,4 @@
|
||||
|
||||
export function noop() {}
|
||||
|
||||
/**
|
||||
* Given a min and max, restrict the given number
|
||||
* to the range.
|
||||
@ -91,11 +89,13 @@ export function debounce(fn: Function, wait: number, immediate: boolean = false)
|
||||
* @param the destination to apply defaults to.
|
||||
*/
|
||||
export function defaults(dest: any, ...args: any[]) {
|
||||
for (let i = arguments.length - 1; i >= 1; i--) {
|
||||
let source = arguments[i] || {};
|
||||
for (let key in source) {
|
||||
if (source.hasOwnProperty(key) && !dest.hasOwnProperty(key)) {
|
||||
dest[key] = source[key];
|
||||
for (var i = arguments.length - 1; i >= 1; i--) {
|
||||
var source = arguments[i];
|
||||
if (source) {
|
||||
for (var key in source) {
|
||||
if (source.hasOwnProperty(key) && !dest.hasOwnProperty(key)) {
|
||||
dest[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -154,34 +154,6 @@ export function pascalCaseToDashCase(val: string = ''): string {
|
||||
});
|
||||
}
|
||||
|
||||
let uid = 0;
|
||||
export function nextUid(): number {
|
||||
return ++uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab all query strings keys and values.
|
||||
* @param url
|
||||
*/
|
||||
export function getQuerystring(url: string): any {
|
||||
var queryParams: any = {};
|
||||
if (url) {
|
||||
const startIndex = url.indexOf('?');
|
||||
if (startIndex !== -1) {
|
||||
const queries = url.slice(startIndex + 1).split('&');
|
||||
for (var i = 0; i < queries.length; i++) {
|
||||
if (queries[i].indexOf('=') > 0) {
|
||||
var split = queries[i].split('=');
|
||||
if (split.length > 1) {
|
||||
queryParams[split[0].toLowerCase()] = split[1].split('#')[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return queryParams;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -1,5 +0,0 @@
|
||||
var Generate = require('./generate');
|
||||
module.exports = {
|
||||
Generate: Generate,
|
||||
generate: Generate.generate
|
||||
};
|
Reference in New Issue
Block a user