Skip to content

CotalkerPartners/ccjs-imports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccjs-imports

Useful imports for Cotalker CCJS

import using the following example:

const cotimporter = async (mod, baseAPI) => {
  const githubPath = `CotalkerPartners/ccjs-imports/main/${mod}.js`
  const text = (await axios.get(`https://raw.githubusercontent.com/${githubPath}`)).data
  if (mod === 'BASE_API') return (new Function('axios','env','networkLogs','errors',text))(axios, env, networkLogs, errors)
  return (new Function('baseAPI',text))(baseAPI)
}
const errors = [], networkLogs = []
const baseAPI = await cotimporter('BASE_API')
const COTPropertyAPI = await cotimporter('COTProperty', baseAPI)

const banana = await COTPropertyAPI.getByCode('banana')
return { banana }

About

Useful imports for Cotalker CCJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published