febs-browser
Advanced tools
Comparing version 0.8.26 to 0.8.27
@@ -110,1 +110,9 @@ 'use strict'; | ||
}; | ||
exports.trim = function(str) { | ||
if (!str) | ||
return str; | ||
return str.replace(/(^\s*)|(\s*$)/g, "") | ||
} |
@@ -155,3 +155,3 @@ | ||
// trim. | ||
element.className = element.className.replace(/(^\s*)|(\s*$)/g, ""); | ||
element.className = stringUtils.trim(element.className); | ||
}; | ||
@@ -158,0 +158,0 @@ } |
@@ -37,2 +37,4 @@ 'use strict'; | ||
exports.trim = string.trim; | ||
/** | ||
@@ -39,0 +41,0 @@ * @desc: 对字符串中的 <> 标签进行转义为 <, > |
@@ -74,3 +74,3 @@ { | ||
"name": "febs-browser", | ||
"version": "0.8.26" | ||
"version": "0.8.27" | ||
} |
@@ -293,2 +293,7 @@ febs 库是一些常用的工具的合集; | ||
/** | ||
* @desc: 去除两端空格. | ||
* @return: string. | ||
*/ | ||
febs.string.trim(str) | ||
/** | ||
* @desc: 对字符串中的 <> 标签进行转义为 <, > | ||
@@ -295,0 +300,0 @@ * @return: string. |
@@ -7,10 +7,9 @@ // Type definitions for febs | ||
declare global { | ||
const __line: number; | ||
let __debug: boolean; | ||
export function requestAnimationFrame(cb:(tm:number)=>void):any; | ||
export function cancelAnimationFrame(timer:any):void; | ||
} | ||
export function requestAnimationFrame(cb:(tm:number)=>void):any; | ||
export function cancelAnimationFrame(timer:any):void; | ||
export interface WeekFmt { | ||
@@ -182,2 +181,5 @@ '0'?: string; | ||
function replace(str: string, strSrc: string, strDest: string): string; | ||
function trim(str: string) : string; | ||
/** | ||
@@ -314,2 +316,3 @@ * @desc: 对字符串中的 <> 标签进行转义为 <, > | ||
export type SELECTOR = any; /*string|dom|HTMLElement; */ | ||
@@ -329,3 +332,3 @@ // | ||
*/ | ||
constructor(selector?:string|dom|HTMLElement); | ||
constructor(selector?:SELECTOR); | ||
@@ -362,3 +365,3 @@ get(index:number): any; | ||
*/ | ||
append(selector?:string|dom|HTMLElement): dom; | ||
append(selector?:SELECTOR): dom; | ||
@@ -368,3 +371,3 @@ /** | ||
*/ | ||
appendTo(selector?:string|dom|HTMLElement): dom; | ||
appendTo(selector?:SELECTOR): dom; | ||
@@ -374,3 +377,3 @@ /** | ||
*/ | ||
prepend(selector?:string|dom|HTMLElement): dom; | ||
prepend(selector?:SELECTOR): dom; | ||
@@ -380,3 +383,3 @@ /** | ||
*/ | ||
prependTo(selector?:string|dom|HTMLElement): dom; | ||
prependTo(selector?:SELECTOR): dom; | ||
@@ -386,3 +389,3 @@ /** | ||
*/ | ||
before(selector?:string|dom|HTMLElement): dom; | ||
before(selector?:SELECTOR): dom; | ||
@@ -392,3 +395,3 @@ /** | ||
*/ | ||
insertBefore(selector?:string|dom|HTMLElement): dom; | ||
insertBefore(selector?:SELECTOR): dom; | ||
@@ -398,3 +401,3 @@ /** | ||
*/ | ||
after(selector?:string|dom|HTMLElement): dom; | ||
after(selector?:SELECTOR): dom; | ||
@@ -404,3 +407,3 @@ /** | ||
*/ | ||
insertAfter(selector?:string|dom|HTMLElement): dom; | ||
insertAfter(selector?:SELECTOR): dom; | ||
@@ -443,11 +446,11 @@ /** | ||
css(name:string, value:string): string; | ||
/** | ||
* html. | ||
*/ | ||
parent(selector?:string|dom|HTMLElement) : dom; | ||
parents(selector?:string|dom|HTMLElement) : dom; | ||
children(selector?:string|dom|HTMLElement) : dom; | ||
prev(selector?:string|dom|HTMLElement) : dom; | ||
next(selector?:string|dom|HTMLElement) : dom; | ||
parent(selector?:SELECTOR) : dom; | ||
parents(selector?:SELECTOR) : dom; | ||
children(selector?:SELECTOR) : dom; | ||
prev(selector?:SELECTOR) : dom; | ||
next(selector?:SELECTOR) : dom; | ||
@@ -510,3 +513,3 @@ | ||
*/ | ||
function getViewPort():{width:number, height:number};; | ||
function getViewPort():{width:number, height:number}; | ||
@@ -517,3 +520,3 @@ /** | ||
*/ | ||
function getDocumentPort():{width:number, height:number};; | ||
function getDocumentPort():{width:number, height:number}; | ||
@@ -534,8 +537,11 @@ /** | ||
declare global { | ||
export function $(n:any):dom; | ||
export namespace $ { | ||
var fn:any; | ||
export class $ { | ||
static fn:any; | ||
static extend(...any):$; | ||
function extend(...args:any[]):dom; | ||
function extend(deep: true, ...args:any[]):dom; | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
521
2169422
42
22388
2