Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

touchui-api

Package Overview
Dependencies
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

touchui-api - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

38

api.js

@@ -19,2 +19,8 @@ // 文件临时路径

}
function isAndroid() {
return !!navigator.userAgent.match(/android/i);
}
function isIos() {
return !!navigator.userAgent.match(/iPhone|iPad|iPod/i);
}
// 通用返回处理

@@ -62,4 +68,9 @@ function callback(data, successData, failData) {

// 从用户地址转换
function fromUserPath(path) {
return path.replace('file://', '')
function fromUserPath(path, absolute) {
var path = path.replace('file://', '')
if(!absolute) {
path = plus.io.convertAbsoluteFileSystem(path)
}
return path
}

@@ -72,3 +83,3 @@ // 获取持久存储目录对象

}, function(error) {
if(error.code === 12) {
if(error.code === isAndroid() ? 12 : 1) {
plus.io.resolveLocalFileSystemURL(BASEPATH, function(entry) {

@@ -372,2 +383,3 @@ entry.getDirectory(SAVEDFILEPATH.replace(BASEPATH, ''), {

api.uploadFile = function(data) {
console.log(data)
var url = data.url

@@ -893,3 +905,3 @@ var filePath = data.filePath

}, function(error) {
if(error.code === 12) {
if(error.code === isAndroid() ? 12 : 1) {
plus.io.resolveLocalFileSystemURL(BASEPATH, function(entry) {

@@ -911,10 +923,12 @@ entry.getDirectory(TEMPFILEPATH.replace(BASEPATH, ''), {

})
module.exports = api
// 修复console
if(isIos()) {
window.console.log = window.console.warn = window.console.error = function() {
for(var index = 0; index < arguments.length; index++) {
var element = arguments[index];
console.dir(element)
}
}
}
api.startRecord({
success: function(res) {
console.log(res)
},
})
api.stopRecord()
module.exports = api
{
"name": "touchui-api",
"version": "0.0.2",
"version": "0.0.3",
"description": "touchui api",

@@ -5,0 +5,0 @@ "main": "api.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc