How to use the lockr.get function in lockr

To help you get started, we’ve selected a few lockr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github roblav96 / robinhood.tools / src / client / adapters / security.ts View on Github external
const state = {
	ready: false,
	ishuman: false,
	rhusername: '',
}
store.register('security', state)
declare global { namespace Store { interface State { security: typeof state } } }



export const doc = {
	uuid: lockr.get('security.uuid'),
	finger: lockr.get('security.finger'),
} as Security.Doc

// export function headers() {
// 	let headers = {
// 		'x-uuid': `${doc.uuid}.${Date.now()}`,
// 		'x-finger': doc.finger,
// 	} as Dict
// 	return headers
// }

const copts = {
	domain: core.HOSTNAME,
	path: '/', sameSite: true,
} as cookie.CookieSerializeOptions

export function cookies() {
github tronscan / tronscan-frontend / src / components / exchange / dex20 / components / ExchangeList / Table.js View on Github external
Lockr.set("optional", list);
    }
    let newdataSource = dataSource.map(item => {
      if (record.exchange_id == item.exchange_id) {
        item.isChecked = !item.isChecked;
      }
      return item;
    });
    let newUnRecomendList = unRecomendList.map(item => {
      if (record.exchange_id == item.exchange_id) {
        item.isChecked = !item.isChecked;
      }
      return item;
    });
    if (Lockr.get("DEX") != "GEM") {
      this.setState({
        dataSource: newdataSource,
        unRecomendList: newUnRecomendList || []
      });
    }

    // if (Lockr.get("DEX") == "GEM") {
    //   let new20List = dataSource.filter(item => item.isChecked);
    //   let newUnrecoment = unRecomendList.filter(item => item.isChecked);
    //   this.setState({
    //     dataSource: new20List,
    //     unRecomendList: newUnrecoment || []
    //   });
    // } else {
    //   this.setState({ dataSource: newdataSource });
    // }
github tronscan / tronscan-frontend / src / components / blockchain / Compiler / index.js View on Github external
initCompile = () => {
        // code
        const compileCode = Lockr.get('CompileCode');
        // 编译状态
        const compileStatus = Lockr.get('CompileStatus');
        // contractNameList
        const contractNameList = Lockr.get('contractNameList');
        // compileInfo
        const compileInfo = Lockr.get('compileInfo');
        // 编译文件列表
        const compileFiles = Lockr.get('compileFiles');
        const files = compileFiles && this.dataUrlToFile(compileFiles);

        this.setState({
            code: compileCode && compileCode,
            CompileStatus: compileStatus || [],
            contractNameList: contractNameList || [],
            compileInfo: compileInfo || [],
            compileFiles: files || [],
            curFile: files && files[0] && files[0].name
        });
    }
github tronscan / tronscan-frontend / src / components / exchange / dex10 / components / ExchangeList / index.js View on Github external
}
                }
            }
        }
        if (Lockr.get('optional')) {
            let optional = Lockr.get('optional');
            for (let i in exchangesList) {
                for (let j in optional) {
                    if (exchangesList[i].exchange_id == optional[j]) {
                        exchangesList[i].optionalBok = true;
                    }
                }
            }
        }
        if (Lockr.get('dex20')) {
            let dex20list = Lockr.get('dex20');
            for (let i in exchange20List) {
                for (let j in dex20list) {
                    if (exchange20List[i].exchange_id == dex20list[j]) {
                        exchange20List[i].optionalBok = true;
                    }
                }
            }
        }

        let newlist = _.concat(exchange20List,exchangesAllList)
        let unreviewedTokenList = _(newlist)
            .filter(o => o['optionalBok'] == true)
            .value();
github xxdavid / lastfm-friends-who-listen / src / storage.js View on Github external
export function getFriendsExpiry() {
    var defaultValue = 60 * 24 * 7; //1 week
    return lockr.get('friendsExpiry', defaultValue);
}
github tronscan / tronscan-frontend / src / components / common / Price.js View on Github external
async loadPrices() {
    var dataEur = Lockr.get("dataEur");
    var dataEth = Lockr.get("dataEth");
    let eurURL = encodeURI(
      `https://api.coinmarketcap.com/v1/ticker/tronix/?convert=EUR`
    );
    let ethURL = encodeURI(
      `https://api.coinmarketcap.com/v1/ticker/tronix/?convert=ETH`
    );
    if (!Lockr.get("dataEur")) {
      var { data: dataEur } = await xhr.get(
        `${API_URL}/api/system/proxy?url=${eurURL}`
      );
    }

    if (!Lockr.get("dataEth")) {
      var { data: dataEth } = await xhr.get(
        `${API_URL}/api/system/proxy?url=${ethURL}`
github tronscan / tronscan-frontend / src / components / exchange / dex20 / components / ExchangeList / index.js View on Github external
constructor() {
    super();
    this.date = "2019-04-18T15:00:00.000Z";
    this.state = {
      dataSource: [],
      time: null,
      tokenAudited: true,
      exchangesList: [],
      optional: Lockr.get("optional") ? Lockr.get("optional") : [],
      optionalBok: true,
      search: "",
      searchExchangesList: [],
      showSearch: false,
      activeIndex: "",
      optionalDisable: false,
      searchAddId: false,
      listGrount: {
        dex: [],
        dex20: [],
        favorites: []
      },
      tagLock: true,
      open: false,
      id: alpha(24),
      day: "",
github learningequality / kolibri / kolibri / plugins / media_player / assets / src / utils / settings.js View on Github external
get() {
    return Object.assign({}, this._defaults, Lockr.get(MEDIA_PLAYER_SETTINGS_KEY) || {});
  }
github opentable / falcor-postman / src / app.jsx View on Github external
componentDidMount() {
    this.setState({ queries: Lockr.get('queries', []) });
  }
github learningequality / kolibri / kolibri / plugins / epub_viewer / assets / src / views / EpubRendererIndex.vue View on Github external
beforeMount() {
      global.ePub = Epub;
      this.book = new Epub(this.epubURL);

      const { theme = this.theme, fontSize = this.fontSize } =
        Lockr.get(EPUB_RENDERER_SETTINGS_KEY) || {};
      this.theme = theme;
      this.fontSize = fontSize;
    },
    mounted() {

lockr

![Lockr logo](http://i.imgur.com/m5kPjkB.png)

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis